[Kde-bindings] KDE/kdebindings
Thomas Moenicke
tm at ippfp.org
Wed Feb 7 12:33:50 UTC 2007
SVN commit 631222 by moenicke:
* Configured gtguess.pl for cmake and removed moc instructions in smokekde
* Added RUBY_SITE_LIB_DIR, RUB_SITE_ARCH_DIR to cmake in qtruby which is now qtruby4.so
CCMAIL: kde-bindings at kde.org
M +4 -6 qtruby/rubylib/qtruby/CMakeLists.txt
M +1 -4 qtruby/rubylib/qtruby/lib/CMakeLists.txt
M +2 -2 qtruby/rubylib/qtruby/lib/Qt/CMakeLists.txt
M +15 -4 smoke/kde/CMakeLists.txt
M +18 -18 smoke/kde/qtguess.pl.cmake
--- trunk/KDE/kdebindings/qtruby/rubylib/qtruby/CMakeLists.txt #631221:631222
@@ -10,16 +10,14 @@
marshall_types.cpp
)
-kde4_automoc(${qtruby_LIB_SRCS})
+kde4_add_library(qtruby4 SHARED ${qtruby_LIB_SRCS})
-kde4_add_library(qtruby SHARED ${qtruby_LIB_SRCS})
+target_link_libraries(qtruby4 ${KDE4_KDECORE_LIBS} ${RUBY_LIBRARY} ${QT_QTNETWORK_LIBRARY} smokeqt )
-target_link_libraries(qtruby ${KDE4_KDECORE_LIBS} ${RUBY_LIBRARY} ${QT_QTNETWORK_LIBRARY} smokeqt )
+set_target_properties(qtruby4 PROPERTIES VERSION 0.0.0 SOVERSION 0 PREFIX "")
+install(TARGETS qtruby4 DESTINATION ${RUBY_SITE_ARCH_DIR} )
-set_target_properties(qtruby PROPERTIES VERSION 0.0.0 SOVERSION 0 )
-install(TARGETS qtruby DESTINATION ${LIB_INSTALL_DIR} )
-
########### next target ###############
--- trunk/KDE/kdebindings/qtruby/rubylib/qtruby/lib/CMakeLists.txt #631221:631222
@@ -1,11 +1,8 @@
add_subdirectory( Qt )
-#Laurent verify it
-install( FILES Qt4.rb Qt3.rb DESTINATION ${LIB_INSTALL_DIR} )
+install( FILES Qt.rb Qt4.rb Qt3.rb DESTINATION ${RUBY_SITE_LIB_DIR} )
-
-
#original Makefile.am contents follow:
#SUBDIRS = Qt
--- trunk/KDE/kdebindings/qtruby/rubylib/qtruby/lib/Qt/CMakeLists.txt #631221:631222
@@ -1,8 +1,8 @@
-#Laurent Verify it!
-install( FILES qtruby4.rb DESTINATION ${LIB_INSTALL_DIR} )
+install( FILES qtruby4.rb DESTINATION ${RUBY_SITE_LIB_DIR}/Qt )
+
#original Makefile.am contents follow:
#qtrubylibdir = $(RUBY_SITEDIR)/Qt
--- trunk/KDE/kdebindings/smoke/kde/CMakeLists.txt #631221:631222
@@ -11,10 +11,19 @@
set(KDE_HAVE_GL "no")
endif(OPENGL_FOUND AND OPENGL_GLU_FOUND)
+# for qtguess.pl
+set(qt_test_threshold 10)
+set(qtflags "-lQtCore -lQtGui")
+FOREACH(filename ${QT_INCLUDES})
+ set(all_includes "-I${filename} ${all_includes}")
+ENDFOREACH(filename)
+
configure_file(generate.pl.cmake ${CMAKE_CURRENT_BINARY_DIR}/generate.pl @ONLY )
-#Laurent readd it.
-#configure_file(qtguess.pl.cmake ${CMAKE_CURRENT_BINARY_DIR}/qtguess.pl @ONLY)
+configure_file(qtguess.pl.cmake ${CMAKE_CURRENT_BINARY_DIR}/qtguess.pl @ONLY)
+# macro is defined in qt-copy/src/qbase.pri but couldn't be found by qtguess, so I append it manually
+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/qtdefines "QT_NO_CAST_TO_ASCII\n")
+
########### next target ###############
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/smokedata.cpp
@@ -38,6 +47,10 @@
${CMAKE_CURRENT_BINARY_DIR}/x_18.cpp
${CMAKE_CURRENT_BINARY_DIR}/x_19.cpp
${CMAKE_CURRENT_BINARY_DIR}/x_20.cpp
+
+ COMMAND ${PERL_EXECUTABLE} ARGS ${CMAKE_CURRENT_BINARY_DIR}/qtguess.pl
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qtguess.pl
+
COMMAND ${PERL_EXECUTABLE} ARGS ${CMAKE_CURRENT_BINARY_DIR}/generate.pl
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/generate.pl
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
@@ -68,8 +81,6 @@
${CMAKE_CURRENT_BINARY_DIR}/x_20.cpp
)
-kde4_automoc(${smokekde_LIB_SRCS})
-
kde4_add_library(smokekde SHARED ${smokekde_LIB_SRCS})
target_link_libraries(smokekde ${KDE4_KDECORE_LIBS} QtSvg QtUiTools ${KDE4_KHTML_LIBS} kjs fontconfig ${KDE4_KUTILS_LIBS} ${KDE4_KDEPRINT_LIBS} )
--- trunk/KDE/kdebindings/smoke/kde/qtguess.pl.cmake #631221:631222
@@ -26,8 +26,8 @@
# 15 - test goodies (default)
my $default_threshold = @qt_test_threshold@;
-my $cc = "@CXX@";
-my $ccflags = $opt_f || "@CXXFLAGS@";
+my $cc = "@CMAKE_CXX_COMPILER@";
+my $ccflags = $opt_f || "@CMAKE_CXX_FLAGS@";
my $nspaces = 50;
@@ -35,23 +35,23 @@
my %qtundefs=();
my $tmp = gettmpfile();
-my $qtinc = '@qt_includes@';
+my $qtinc = '@QT_INCLUDE_DIR@';
my $allinc = '@all_includes@';
-my $alllib = '@all_libraries@';
-my $qtflags ='@LIB_QTCORE@ @LIB_QTGUI@ @LIB_QTNETWORK@ @LIB_QTXML@ @LIB_QTSQL@ @LIB_QTOPENGL@';
-my %x;
-$x{'LIBPNG'} = '@LIBPNG@';
-$x{'LIBJPEG'} = '@LIBJPEG@';
-$x{'LIBSM'} = '@LIBSM@';
-$x{'LIBSOCKET'} = '@LIBSOCKET@';
-$x{'LIBDL'} = '@LIBDL@';
-$x{'LIBRESOLV'} = '@LIBRESOLV@';
-$x{'LIB_X11'} = '@LIB_X11@';
-$x{'X_PRE_LIBS'} = '@X_PRE_LIBS@';
-$x{'LIB_X11'} =~ s/\$\((.*?)\)/$x{$1}/g;
+my $alllib = '-L at QT_LIBRARY_DIR@';
+my $qtflags = '@qtflags@';
+#my %x;
+#$x{'LIBPNG'} = '@LIBPNG@';
+#$x{'LIBJPEG'} = '@LIBJPEG@';
+#$x{'LIBSM'} = '@LIBSM@';
+#$x{'LIBSOCKET'} = '@LIBSOCKET@';
+#$x{'LIBDL'} = '@LIBDL@';
+#$x{'LIBRESOLV'} = '@LIBRESOLV@';
+#$x{'LIB_X11'} = '@LIB_X11@';
+#$x{'X_PRE_LIBS'} = '@X_PRE_LIBS@';
+#$x{'LIB_X11'} =~ s/\$\((.*?)\)/$x{$1}/g;
+#
+#$qtflags =~ s/\$\((.*?)\)/$x{$1}/g;
-$qtflags =~ s/\$\((.*?)\)/$x{$1}/g;
-
-e "$qtinc/QtCore/qglobal.h" or die "Invalid Qt include directory.\n";
my $ccmd = "$cc $ccflags $allinc $alllib -o $tmp $tmp.cpp $qtflags";
@@ -66,7 +66,7 @@
map{ $tests{$_}->[2]>=$threshold ? ($used++, $total++):$total++ } keys %tests;
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";
+open( QTDEFS, ">>".($opt_o || "qtdefines") ) or die "Can't open output file: $!\n";
grab_qglobal_symbols();
preliminary_test();
More information about the Kde-bindings
mailing list