KDE/kdelibs/cmake/modules

Thiago Macieira thiago at kde.org
Tue Feb 27 19:08:57 CET 2007


SVN commit 637764 by thiago:

Initial support for the IMHO "broken" way of compiling KDE in Qt 4.3:
if QtScript is detected, we assume that QtUiTools needs to link to it.

This detects QtScript correctly.

But this does not work. For whatever reason, the last block simply
doesn't work: SET(QT_QTUITOOLS_LIBRARY ...) and nothing is exactly the
same. I don't have time to investigate why SET doesn't set.

If you're building KDE with Qt 4.3, for the moment you have to set
QT_QTUITOOLS_LIBRARY manually to "-lQtUiTools -lQtScript".

CCMAIL:kde-buildsystem at kde.org


 M  +22 -1     FindQt4.cmake  


--- trunk/KDE/kdelibs/cmake/modules/FindQt4.cmake #637763:637764
@@ -73,6 +73,7 @@
 #  QT_QTSQL_FOUND         True if QtSql was found.
 #  QT_QTXML_FOUND         True if QtXml was found.
 #  QT_QTSVG_FOUND         True if QtSvg was found.
+#  QT_QTSCRIPT_FOUND      True if QtScript was found.
 #  QT_QTTEST_FOUND        True if QtTest was found.
 #  QT_QTUITOOLS_FOUND     True if QtUiTools was found.
 #                      
@@ -100,6 +101,7 @@
 #  QT_QTSQL_INCLUDE_DIR        Path to "include/QtSql" 
 #  QT_QTXML_INCLUDE_DIR        Path to "include/QtXml" 
 #  QT_QTSVG_INCLUDE_DIR        Path to "include/QtSvg"
+#  QT_QTSCRIPT_INCLUDE_DIR     Path to "include/QtScript"
 #  QT_QTTEST_INCLUDE_DIR       Path to "include/QtTest"
 #                            
 #  QT_LIBRARY_DIR              Path to "lib" of Qt4
@@ -137,6 +139,8 @@
 #
 # The QtSvg library:          QT_QTSVG_LIBRARY
 #
+# The QtScript library:       QT_QTSCRIPT_LIBRARY
+#
 # The QtTest library:         QT_QTTEST_LIBRARY
 #
 # The qtmain library for Windows QT_QTMAIN_LIBRARY
@@ -429,6 +433,14 @@
     NO_DEFAULT_PATH
     )
 
+  # Set QT_QTSVG_INCLUDE_DIR
+  FIND_PATH(QT_QTSCRIPT_INCLUDE_DIR QtScript
+    PATHS
+    ${QT_INCLUDE_DIR}/QtScript
+    ${QT_LIBRARY_DIR}/QtScript.framework/Headers
+    NO_DEFAULT_PATH
+    )
+
   # Set QT_QTTEST_INCLUDE_DIR
   FIND_PATH(QT_QTTEST_INCLUDE_DIR QtTest
     PATHS
@@ -549,6 +561,7 @@
     SET(QT_QTSQL_LIBRARY      "-framework QtSql"      CACHE STRING "The QtSql library.")
     SET(QT_QTXML_LIBRARY      "-framework QtXml"      CACHE STRING "The QtXml library.")
     SET(QT_QTSVG_LIBRARY      "-framework QtSvg"      CACHE STRING "The QtSvg library.")
+    SET(QT_QTSCRIPT_LIBRARY   "-framework QtScript"   CACHE STRING "The QtScript library.")
     SET(QT_QTDBUS_LIBRARY     "-framework QtDBus"     CACHE STRING "The QtDBus library.")
     SET(QT_QTTEST_LIBRARY     "-framework QtTest"     CACHE STRING "The QtTest library.")
 
@@ -589,6 +602,9 @@
     # Set QT_QTSVG_LIBRARY
     FIND_LIBRARY(QT_QTSVG_LIBRARY NAMES QtSvg QtSvg4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
 
+    # Set QT_QTSCRIPT_LIBRARY
+    FIND_LIBRARY(QT_QTSCRIPT_LIBRARY NAMES QtScript QtScript4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
+
     # Set QT_QTUITOOLS_LIBRARY
     FIND_LIBRARY(QT_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
 
@@ -606,6 +622,7 @@
       FIND_LIBRARY(QT_QTSQL_LIBRARY_DEBUG       NAMES QtSqld4             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
       FIND_LIBRARY(QT_QTXML_LIBRARY_DEBUG       NAMES QtXmld4             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
       FIND_LIBRARY(QT_QTSVG_LIBRARY_DEBUG       NAMES QtSvgd4             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+      FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_DEBUG    NAMES QtScriptd4          PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
       FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_DEBUG   NAMES QtUiToolsd QtUiToolsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
       FIND_LIBRARY(QT_QTTEST_LIBRARY_DEBUG      NAMES QtTestd4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
       FIND_LIBRARY(QT_QTDBUS_LIBRARY_DEBUG      NAMES QtDBusd4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
@@ -693,6 +710,7 @@
   _QT4_ADJUST_LIB_VARS(QTSQL)
   _QT4_ADJUST_LIB_VARS(QTXML)
   _QT4_ADJUST_LIB_VARS(QTSVG)
+  _QT4_ADJUST_LIB_VARS(QTSCRIPT)
   _QT4_ADJUST_LIB_VARS(QTUITOOLS)
   _QT4_ADJUST_LIB_VARS(QTTEST)
   _QT4_ADJUST_LIB_VARS(QTDBUS)
@@ -705,8 +723,11 @@
   IF(WIN32)
     _QT4_ADJUST_LIB_VARS(QTMAIN)
   ENDIF(WIN32)
-  
 
+  IF(QT_QTSCRIPT_LIBRARY AND QT_QTUITOOLS_LIBRARY)
+    SET(QT_QTUITOOLS_LIBRARY      "-L${QT_LIBRARY_DIR} -lQtUiTools -lQtScript"      CACHE STRING "The QtUiTools library.")
+  ENDIF(QT_QTSCRIPT_LIBRARY AND QT_QTUITOOLS_LIBRARY)
+
   #######################################
   #
   #       Check the executables of Qt 


More information about the Kde-buildsystem mailing list