invitation: try compiling kdelibs using cmake

William A. Hoffman billlist at nycap.rr.com
Thu Jan 26 22:13:26 CET 2006


At 03:51 PM 1/26/2006, Peter Kümmel wrote:
>Am Donnerstag, 26. Januar 2006 20:57 schrieb William A. Hoffman:
>
>> Yes, this a problem.   It should work by doing this:
>>
>> find_package(Qt4 required)
>>
>> include(${QT_USE_FILE})
>> target_link_libraries(target ${QT_LIBRARIES})
>
>I've added
>set(CMAKE_BUILD_TYPE Debug)
>to the master CMakeList.txt

You should change that value in the cmake cache not in
the CMakeList.txt file.

cmake -DCMAKE_BUILD_TYPE=Debug ../kdelibs


>and 
>find_package(Qt4 required)
>include(${QT_USE_FILE})
>
>in front of the the usage of  e.g.
>
>target_link_libraries(kdefx  ${QT_QTCORE_LIBRARY}  m${QT_QTGUI_LIBRARY} )

No, it should be used like this:

include(${QT_USE_FILE})
target_link_libraries(kdefx  ${QT_LIBRARIES})

I am working with Alex to fix this right now.


For documentation:
../CMake-build/bin/cmake --help-module FindQt4  


    This module can be used to find Qt4.  This module defines a number of
       key variables and macros.  First is QT_USE_FILE which is the path to a
       CMake file that can be included to compile Qt 4 applications and
       libraries.  By default, the QtCore and QtGui libraries are loaded.
       This behavior can be changed by setting one or more of the following
       variables to true:

                           QT_DONT_USE_QTCORE
                           QT_DONT_USE_QTGUI
                           QT_USE_QT3SUPPORT
                           QT_USE_QTASSISTANT
                           QT_USE_QTDESIGNER
                           QT_USE_QTMOTIF
                           QT_USE_QTNETWORK
                           QT_USE_QTNSPLUGIN
                           QT_USE_QTOPENGL
                           QT_USE_QTSQL
                           QT_USE_QTXML

       All the libraries required are stored in a variable called
       QT_LIBRARIES.  Add this variable to your TARGET_LINK_LIBRARIES.

....

-Bill



More information about the Kde-buildsystem mailing list