[Kde-bindings] KDE/kdebindings

Thomas Moenicke tm at ippfp.org
Mon Feb 5 12:00:17 UTC 2007


SVN commit 630427 by moenicke:

* added cmake support for Qwt in smokeqt

CCMAIL: kde-bindings at kde.org



 A             cmake/modules/FindQwt.cmake  
 M  +6 -1      smoke/qt/CMakeLists.txt  
 M  +21 -1     smoke/qt/generate.pl.cmake  


--- trunk/KDE/kdebindings/smoke/qt/CMakeLists.txt #630426:630427
@@ -1,5 +1,6 @@
 
 include(FindQScintilla)
+include(FindQwt)
 
 include_directories( ${QT_INCLUDES}  ${CMAKE_CURRENT_SOURCE_DIR}/../ )
 
@@ -7,6 +8,10 @@
     include_directories( ${QSCINTILLA_INCLUDE_DIR} )
 endif(QSCINTILLA_FOUND)
 
+if(QWT_FOUND)
+    include_directories( ${QWT_INCLUDE_DIR} )
+endif(QWT_FOUND)
+
 # for qtguess.pl
 set(qt_test_threshold 10)
 set(qtflags "-lQtCore -lQtGui")
@@ -80,7 +85,7 @@
 kde4_add_library(smokeqt SHARED ${smokeqt_LIB_SRCS})
 # add_library(smokeqt SHARED ${smokeqt_LIB_SRCS})
 
-target_link_libraries(smokeqt ${QT_QTCORE_LIBRARY} QtSvg QtGui QtNetwork QtSql QtOpenGL QtXml QtUiTools ${QSCINTILLA2_LIBRARIES} )
+target_link_libraries(smokeqt ${QT_QTCORE_LIBRARY} QtSvg QtGui QtNetwork QtSql QtOpenGL QtXml QtUiTools ${QSCINTILLA_LIBRARIES} ${QWT_LIBRARIES} )
 
 set_target_properties(smokeqt PROPERTIES VERSION 2.0.0 SOVERSION 2 )
 install(TARGETS smokeqt DESTINATION ${LIB_INSTALL_DIR} )
--- trunk/KDE/kdebindings/smoke/qt/generate.pl.cmake #630426:630427
@@ -127,10 +127,11 @@
  close HEADERS;
 }
 
+my %qwt_includes;
 if("@QWT_FOUND@" eq "YES")
 {
  open(HEADERS, $qwt_headerlistpath) or die "Couldn't open $qwt_headerlistpath: $!\n";
- map { chomp ; $includes{$_} = 1 } <HEADERS>;
+ map { chomp ; $qwt_includes{$_} = 1 } <HEADERS>;
  close HEADERS;
 }
  
@@ -187,6 +188,25 @@
     }, $qtinc
  );
 
+$qwtinc = '@QWT_INCLUDE_DIR@';
+
+find(
+    {   wanted => sub {
+	    (-e || -l and !-d) and do {
+	        $f = substr($_, 1 + length $qwtinc);
+		push ( @headers, $_ )
+                if( !defined $excludes{$f} # Not excluded
+                     && $qwt_includes{$f}        # Known header
+                     && /\.h$/);     # Not a backup file etc. Only headers.
+	    	undef $qwt_includes{$f}   
+	     };
+	},
+	follow_fast => 1,
+	follow_skip => 2,
+	no_chdir => 1
+    }, $qwtinc
+ );
+ 
 # Launch kalyptus
 chdir "../smoke/qt";
 system "perl -I at kdebindings_SOURCE_DIR@/kalyptus @kdebindings_SOURCE_DIR@/kalyptus/kalyptus @ARGV --qt4 --globspace -fsmoke --name=qt $macros --no-cache --outputdir=$outdir @headers";



More information about the Kde-bindings mailing list