[CMake] CMake & FindQT4.cmake
xavier delannoy
xavier.delannoy at gmail.com
Tue Jan 17 10:39:50 EST 2006
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_PLATFORM_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/e993a61a/attachment.html
More information about the CMake
mailing list