Hello everyone,
It seems that, in Qt 4.8.1 (at least in the Debian packages), the QtWebKit
module isn't shipped in a separated .so (libQtWebKit.so).
Thus, this makes FindQt4.cmake fails to find the QtWebkit modules, beucase
a module is considered found when both its libraries files and directories
are found. As a consequence, include directories are not set if the
QT_USE_QTWEBKIT variable is set to TRUE (for instance), and code fails to
compile.
I don't know if this is an issue with the Debian packages of Qt (last
packages in sid as of today), or if Qt decided to build QtWebkit within
QtGui.
Attached to this mail is a temporary patch (well, an ugly *hack* actually)
that I am using (against FindQt4.cmake) :
Thanks for any help or comments about this !
Regards,
--
Adrien.
--- FindQt4.cmake 2012-04-18 20:10:54.000000000 +0200
+++ FindQt4.cmake 2012-05-15 11:24:32.153505008 +0200
@@ -748,8 +748,13 @@
#
########################################
+# SET(QT_MODULES QtGui Qt3Support QtSvg QtScript QtTest QtUiTools
+# QtHelp QtWebKit QtXmlPatterns phonon QtNetwork QtMultimedia
+# QtNsPlugin QtOpenGL QtSql QtXml QtDesigner QtDBus QtScriptTools
+# QtDeclarative)
+
SET(QT_MODULES QtGui Qt3Support QtSvg QtScript QtTest QtUiTools
- QtHelp QtWebKit QtXmlPatterns phonon QtNetwork QtMultimedia
+ QtHelp QtXmlPatterns phonon QtNetwork QtMultimedia
QtNsPlugin QtOpenGL QtSql QtXml QtDesigner QtDBus QtScriptTools
QtDeclarative)
@@ -844,6 +849,13 @@
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
+ FIND_PATH(QT_QTWEBKIT_INCLUDE_DIR QtWebKit
+ PATHS
+ ${QT_HEADERS_DIR}/QtWebKit
+ ${QT_LIBRARY_DIR}/QtWebKit.framework/Headers
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
+ )
+
########################################
#
# Setting the LIBRARY-Variables
@@ -894,6 +906,10 @@
FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
+ # Set QT_QTWEBKIT_LIBRARY
+ SET(QT_QTWEBKIT_LIBRARY_RELEASE "")
+ SET(QT_QTWEBKIT_LIBRARY_DEBUG "")
+
############################################
#
@@ -914,6 +930,10 @@
_QT4_ADJUST_LIB_VARS(QtAssistantClient)
_QT4_ADJUST_LIB_VARS(QtCLucene)
_QT4_ADJUST_LIB_VARS(QtDesignerComponents)
+ _QT4_ADJUST_LIB_VARS(QtWebKit)
+ IF(QT_QTWEBKIT_INCLUDE_DIR)
+ SET(QT_QTWEBKIT_FOUND 1)
+ ENDIF(QT_QTWEBKIT_INCLUDE_DIR)
# platform dependent libraries
IF(Q_WS_WIN)
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers