[CMake] CMake & FindQT4.cmake
Moreland, Kenneth
kmorel at sandia.gov
Tue Jan 17 10:53:13 EST 2006
The function you are looking for is called QT4_WRAP_UI (not WARP).
You will also need to add an INCLUDE(${QT_USE_FILE}) after finding Qt 4.
-Ken
________________________________
From: cmake-bounces+kmorel=sandia.gov at cmake.org
[mailto:cmake-bounces+kmorel=sandia.gov at cmake.org] On Behalf Of xavier
delannoy
Sent: Tuesday, January 17, 2006 8:40 AM
To: cmake at cmake.org
Subject: [CMake] CMake & FindQT4.cmake
Hi all,
I try to use CMake with a QT project. I have include
FindQT4.cmake but CMake doesn't know : QT4_WARP_UI && QT4_ADD_RESOURCE.
here is the ouput of CMake :
-- This is a CVS repository
-- Using Buildname: Darwin-c++
-- Found Qt-Version ..
CMake Error: Error in cmake code at
Projects/src/gui/CMakeLists.txt:35:
Unknown CMake command "QT4_WARP_UI".
CMake Error: Error in cmake code at
Projects/src/gui/CMakeLists.txt:39:
Unknown CMake command "QT4_ADD_RESOURCE".
-- Configuring done
here is my CMakeLists :
PROJECT(MYPROJECT CXX)
INCLUDE(${CMAKE_ROOT}/Modules/FindQT4.cmake)
ADD_DEFINITIONS(-DQT_THREAD_SUPPORT)
AUX_SOURCE_DIRECTORY( common MYPROJECT_COMMON_SRCS)
AUX_SOURCE_DIRECTORY( customwidget MYPROJECT_CUSTOMWIDGET_SRCS)
AUX_SOURCE_DIRECTORY(${PLATFORM_SUBDIR_SRC}
MYPROJECT_PLATFORM_SRCS)
SET(MYPROJECT_SRCS
"${MYPROJECT_COMMON_SRCS};${MYPROJECT_CUSTOMWIDGET_SRCS};${MYPROJECT_PLA
TFORM_SRCS}")
SET(UI_FILES ui/file1.ui ui/file2.ui)
QT4_WARP_UI(UIHeaders ${UI_FILES})
SET_SOURCE_FILES_PROPERTIES(${MYPROJECT_SRCS} PROPERTIES
OBJECT_DEPENDS "${UIHeaders}")
QT4_ADD_RESOURCE(ResourceFiles res/resources.rc)
# include directory
INCLUDE_DIRECTORIES(common customwidget ui)
ADD_EXECUTABLE(MyProject ${MYPROJECT_SRCS})
# link with libs
TARGET_LINK_LIBRARIES(MyProject ${QT_LIBRARIES})
Thanks,
Xavier Delannoy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060117/bdf46a04/attachment.htm
More information about the CMake
mailing list