[PATCH 1 of 5] Fix dependency handling for messages files

Wald Commits scm-commit at wald.intevation.org
Fri Jun 20 12:53:21 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1403250566 -7200
# Node ID 5d6e86cf3b8794c4ec1122c9da83b6206235780b
# Parent  bc02ee484067b4bcad83c5b39f7352aad3c967e2
Fix dependency handling for messages files.

    This causes the messages to be recompiled when they are modified

diff -r bc02ee484067 -r 5d6e86cf3b87 ui/CMakeLists.txt
--- a/ui/CMakeLists.txt	Thu Jun 19 17:48:10 2014 +0200
+++ b/ui/CMakeLists.txt	Fri Jun 20 09:49:26 2014 +0200
@@ -7,7 +7,8 @@
 
 include_directories(${Qt5Widgets_INCLUDE_DIRS})
 include_directories(${POLARSSL_INCLUDE_DIR})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../common)
+include_directories(${CMAKE_SOURCE_DIR}/common)
+include_directories(${CMAKE_BINARY_DIR}/common)
 add_definitions(${Qt5Widgets_DEFINITIONS})
 
 find_package(Qt5LinguistTools)
@@ -133,9 +134,9 @@
               ${CMAKE_BINARY_DIR}/common/events.rc
               ${CMAKE_BINARY_DIR}/common/MSG00407.bin
               ${CMAKE_BINARY_DIR}/common/MSG00409.bin
-       COMMAND ${MC_COMPILER} ${CMAKE_SOURCE_DIR}/common/events.mc -a -U -r ${CMAKE_BINARY_DIR}/common -h ${CMAKE_BINARY_DIR}/common
+       COMMAND ${MC_COMPILER} ${CMAKE_SOURCE_DIR}/common/events.mc -r ${CMAKE_BINARY_DIR}/common -h ${CMAKE_BINARY_DIR}/common
        DEPENDS ${CMAKE_SOURCE_DIR}/common/events.mc)
-    add_custom_target(create_events DEPENDS ${CMAKE_BINARY_DIR}/common/events.rc)
+    set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/img/icon.rc APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/common/events.rc)
 endif()
 
 if(Qt5LinguistTools_FOUND)
@@ -175,10 +176,6 @@
       ${TRUSTBRIDGE_MAIN_WITH_RESOURCES})
 endif()
 
-if (WIN32)
-   add_dependencies(trustbridge create_events)
-endif()
-
 add_library(ui_common STATIC ${UICOMMON_SOURCES})
 add_library(tbadminlib STATIC ${ADMINISTRATOR_SOURCES})
 add_library(tblib STATIC ${TRUSTBRIDGE_SOURCES})


More information about the Trustbridge-commits mailing list