CMake GUI build - fix adding resources to GUI.

This commit is contained in:
Kimmo Varis 2009-12-14 18:43:44 +02:00
parent e010575398
commit 3437242ea7
2 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,7 @@
# - static library from lib directory # - static library from lib directory
# - commandline executable # - commandline executable
# - test suite # - test suite
# - Qt GUI
# To build with CMake: # To build with CMake:
# - install CMake 2.6 or later # - install CMake 2.6 or later

View File

@ -62,6 +62,11 @@ SET(CHECK_UIS
settings.ui settings.ui
) )
SET(CHECK_RCCS gui.qrc)
# Generate rules for building source files from the resources
QT4_ADD_RESOURCES(CHECK_RCC_SRCS ${CHECK_RCCS})
# Process UI files # Process UI files
QT4_WRAP_UI(CHECK_UIS_H ${CHECK_UIS}) QT4_WRAP_UI(CHECK_UIS_H ${CHECK_UIS})
@ -73,6 +78,6 @@ include_directories (${CPPCHECK_SOURCE_DIR}/lib)
# Include binary directory where code from UI files gets created # Include binary directory where code from UI files gets created
include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR})
ADD_EXECUTABLE(gui ${CHECKGUI_SRCS} ${CHECK_MOC_SRCS} ${CHECK_UIS_H}) ADD_EXECUTABLE(gui ${CHECKGUI_SRCS} ${CHECK_MOC_SRCS} ${CHECK_UIS_H} ${CHECK_RCC_SRCS})
TARGET_LINK_LIBRARIES(gui checklib ${QT_LIBRARIES}) TARGET_LINK_LIBRARIES(gui checklib ${QT_LIBRARIES})