[CMake] cmake qt4 Lplates

luxInteg lux-integ at btconnect.com
Fri Dec 10 17:09:29 EST 2010


Greetings,

I   have my cmake L-plates firmly on ( with a Qt4  project I am stumbling on )

I have these in   CMakeLists.txt file:-
 FIND_PACKAGE( Qt4 REQUIRED )
  INCLUDE( ${QT_USE_FILE} )
  set(QT_USE_OPENGL TRUE)
  set(QT_USE_QTSVG  TRUE )
  SET( QT_USE_QTXML TRUE )
  SET( QT_USE_QT3SUPPORT TRUE )
  SET( QT_USE_QTNETWORK  TRUE )
  SET( QT_USE_QTASSISTANT TRUE )
  SET(QT_USE_QTSCRIPT TRUE)

include_directories( ${CMAKE_BINARY_DIR} ${QT_INCLUDE_DIR} )

Two sets pf problems I have encountered include:'

A:- I cannot set   the includes for Qt4  as 'found' by FindQt4.cmake.  I 
looked through  the said file for such a variable  under mark_as_advanced()  
or somesuch but I could not discern any  related functions nor  variable 
names.  I tried  ${QT_INCLUDE_DIR}, ${QT_HEADERS_DIR} aand ${QT_INCLUDES} to 
no avail.    I had to resort to  setting these manually as 
/opt/qt4/include/XXXX

B:- This might be due to the manual setting of   the Qt4_INCLUDE 
(directory(s), but I seem to get duplication in the preprocessors    
(generated automatically):   Below is an example

-DQT_NO_DEBUG 
-DQT_SVG_LIB 
-DQT_QT3SUPPORT_LIB 
-DQT3_SUPPORT 
-DQT_XML_LIB 
-DQT_OPENGL_LIB 
-DQT_GUI_LIB 
-DQT_NETWORK_LIB 
-DQT_CORE_LIB 
-DQT_SHARED 
-DQT_NO_DEBUG 
-DQT_GUI_LIB 
-DQT_CORE_LIB 
-DQT_SHARED

(REMARK I have  -DQT_SHARED   -DQT_NO_DEBUG   both duplicated) 

advice would be appreciated

luxInteg


More information about the CMake mailing list