Mercurial > trustbridge
comparison ui/CMakeLists.txt @ 621:5d6e86cf3b87
Fix dependency handling for messages files.
This causes the messages to be recompiled when they are modified
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 20 Jun 2014 09:49:26 +0200 |
parents | bc02ee484067 |
children | 129e611eaf50 |
comparison
equal
deleted
inserted
replaced
620:bc02ee484067 | 621:5d6e86cf3b87 |
---|---|
5 # and comes with ABSOLUTELY NO WARRANTY! | 5 # and comes with ABSOLUTELY NO WARRANTY! |
6 # See LICENSE.txt for details. | 6 # See LICENSE.txt for details. |
7 | 7 |
8 include_directories(${Qt5Widgets_INCLUDE_DIRS}) | 8 include_directories(${Qt5Widgets_INCLUDE_DIRS}) |
9 include_directories(${POLARSSL_INCLUDE_DIR}) | 9 include_directories(${POLARSSL_INCLUDE_DIR}) |
10 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../common) | 10 include_directories(${CMAKE_SOURCE_DIR}/common) |
11 include_directories(${CMAKE_BINARY_DIR}/common) | |
11 add_definitions(${Qt5Widgets_DEFINITIONS}) | 12 add_definitions(${Qt5Widgets_DEFINITIONS}) |
12 | 13 |
13 find_package(Qt5LinguistTools) | 14 find_package(Qt5LinguistTools) |
14 | 15 |
15 # Common code is used in either the client or the administrator | 16 # Common code is used in either the client or the administrator |
131 add_custom_command( | 132 add_custom_command( |
132 OUTPUT ${CMAKE_BINARY_DIR}/common/events.h | 133 OUTPUT ${CMAKE_BINARY_DIR}/common/events.h |
133 ${CMAKE_BINARY_DIR}/common/events.rc | 134 ${CMAKE_BINARY_DIR}/common/events.rc |
134 ${CMAKE_BINARY_DIR}/common/MSG00407.bin | 135 ${CMAKE_BINARY_DIR}/common/MSG00407.bin |
135 ${CMAKE_BINARY_DIR}/common/MSG00409.bin | 136 ${CMAKE_BINARY_DIR}/common/MSG00409.bin |
136 COMMAND ${MC_COMPILER} ${CMAKE_SOURCE_DIR}/common/events.mc -a -U -r ${CMAKE_BINARY_DIR}/common -h ${CMAKE_BINARY_DIR}/common | 137 COMMAND ${MC_COMPILER} ${CMAKE_SOURCE_DIR}/common/events.mc -r ${CMAKE_BINARY_DIR}/common -h ${CMAKE_BINARY_DIR}/common |
137 DEPENDS ${CMAKE_SOURCE_DIR}/common/events.mc) | 138 DEPENDS ${CMAKE_SOURCE_DIR}/common/events.mc) |
138 add_custom_target(create_events DEPENDS ${CMAKE_BINARY_DIR}/common/events.rc) | 139 set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/img/icon.rc APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/common/events.rc) |
139 endif() | 140 endif() |
140 | 141 |
141 if(Qt5LinguistTools_FOUND) | 142 if(Qt5LinguistTools_FOUND) |
142 # Include translation as a resource | 143 # Include translation as a resource |
143 # This works in the source directory to enable the rcc dependencies to be found | 144 # This works in the source directory to enable the rcc dependencies to be found |
173 add_executable(trustbridge | 174 add_executable(trustbridge |
174 ${_add_executable_params} | 175 ${_add_executable_params} |
175 ${TRUSTBRIDGE_MAIN_WITH_RESOURCES}) | 176 ${TRUSTBRIDGE_MAIN_WITH_RESOURCES}) |
176 endif() | 177 endif() |
177 | 178 |
178 if (WIN32) | |
179 add_dependencies(trustbridge create_events) | |
180 endif() | |
181 | |
182 add_library(ui_common STATIC ${UICOMMON_SOURCES}) | 179 add_library(ui_common STATIC ${UICOMMON_SOURCES}) |
183 add_library(tbadminlib STATIC ${ADMINISTRATOR_SOURCES}) | 180 add_library(tbadminlib STATIC ${ADMINISTRATOR_SOURCES}) |
184 add_library(tblib STATIC ${TRUSTBRIDGE_SOURCES}) | 181 add_library(tblib STATIC ${TRUSTBRIDGE_SOURCES}) |
185 | 182 |
186 target_link_libraries(trustbridge-admin | 183 target_link_libraries(trustbridge-admin |