[Kde-bindings] KDE/kdebindings/smoke/kde

Richard Dale Richard_Dale at tipitina.demon.co.uk
Wed Oct 10 09:57:03 UTC 2007


SVN commit 723648 by rdale:

* Add a 'INCLUDE(${QT_USE_FILE})' line to the kde smoke CMakeLists.txt file so that
  the ${QT_LIBRARIES} macro is set up. This allows the same qtguess.pl.cmake file to
  be use as for the qt smoke lib build.

CCMAIL: kde-bindings at kde.org


 M  +4 -0      CMakeLists.txt  
 M  +6 -7      qtguess.pl.cmake  


--- trunk/KDE/kdebindings/smoke/kde/CMakeLists.txt #723647:723648
@@ -82,6 +82,10 @@
 # Needed to make QSqlRelationalDelegate compile
 ADD_DEFINITIONS (-DQT_GUI_LIB)
 
+INCLUDE(${QT_USE_FILE})
+# At this point, QT_LIBRARIES will contain a list of the found Qt Libs
+# and QT_INCLUDES contains the directories of the found includes
+
 FOREACH(filename ${QT_INCLUDES})
     set(all_includes "-I${filename} ${all_includes}")
 ENDFOREACH(filename)
--- trunk/KDE/kdebindings/smoke/kde/qtguess.pl.cmake #723647:723648
@@ -38,8 +38,7 @@
 my $qtcoreinc = '@QT_QTCORE_INCLUDE_DIR@';
 my $qtinc = '@QT_INCLUDE_DIR@';
 my $allinc = '@all_includes@';
-my $alllib = '-L at QT_LIBRARY_DIR@ @QT_QTGUI_LIBRARY@';
-# my $alllib = '@all_libs@';
+my $alllib = '@all_libs@';
 
  -e "$qtcoreinc/qglobal.h" or die "Invalid Qt include directory.\n";
 
@@ -57,7 +56,7 @@
 print "Number of defines to be tested : $used/$total\n\n" unless $opt_q;
 open( QTDEFS, ">>".($opt_o || "qtdefines") ) or die "Can't open output file: $!\n";
 
-# grab_qglobal_symbols();
+grab_qglobal_symbols();
 preliminary_test();
 perform_all_tests();
 
@@ -71,13 +70,11 @@
 sub grab_qglobal_symbols
 {
 	my $cmd = "$cc -E -D__cplusplus -dM -I$qtinc -I$qtcoreinc $qtcoreinc/qglobal.h 2>/dev/null";
-print("cmd: '$cmd'\n");
 	my $symbols = `$cmd`;
         for(0..1)
         {
 	    if( check_exit_status($?) )
 	    {
-print("In grab_qglobal_symbols()\n");
 		while( $symbols =~/^#\s*define\s*(QT_\S+)/gm )
 		{
 			$qtdefs{$1} = 1;
@@ -93,7 +90,7 @@
 	    elsif(! $_) # first try
 	    {
 		print  "Failed to run $cmd.\nTrying without __cplusplus (might be already defined)\n";
-                $cmd = "$cc -E -dM -I$qtinc/QtCore $qtinc/QtCore/qglobal.h 2>/dev/null";
+                $cmd = "$cc -E -dM -I$qtinc -I$qtcoreinc $qtcoreinc/qglobal.h 2>/dev/null";
                 $symbols = `$cmd`;
                 next;
 	    }
@@ -167,7 +164,9 @@
 		open( OUT, ">${tmp}.cpp" ) or die "Failed to open temp file ${tmp}.cpp: $!\n";
 		foreach $def(keys %qtdefs)
 		{
-			print OUT "#define $def\n";
+			if ( $def !~ /QT_EDITION/ ) {
+				print OUT "#define $def\n";
+			}
 		}
 		foreach $inc(split /,\s*/, $tests{$_}->[0])
 		{



More information about the Kde-bindings mailing list