comparison ui/CMakeLists.txt @ 617:63a128400bf3

Add message compiler logic and messages file
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 19 Jun 2014 14:43:53 +0200
parents 292c590ba9cb
children bc02ee484067
comparison
equal deleted inserted replaced
616:0172740f5c6e 617:63a128400bf3
117 117
118 if(WIN32) 118 if(WIN32)
119 # This option causes cmake to use the appropiate liker flags to hide 119 # This option causes cmake to use the appropiate liker flags to hide
120 # the console Window on Windows 120 # the console Window on Windows
121 set (_add_executable_params WIN32) 121 set (_add_executable_params WIN32)
122
123 # Add the event messages
124 if (MINGW)
125 STRING(REGEX REPLACE "windres" "windmc" MC_COMPILER ${CMAKE_RC_COMPILER})
126 else()
127 # untested
128 set(MC_COMPILER "mc.exe")
129 endif()
130
131 add_custom_command(
132 OUTPUT ${CMAKE_BINARY_DIR}/common/events.h
133 ${CMAKE_BINARY_DIR}/common/events.rc
134 ${CMAKE_BINARY_DIR}/common/MSG00407.bin
135 ${CMAKE_BINARY_DIR}/common/MSG00409.bin
136 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 set(EXTRA_SOURCES ${CMAKE_BINARY_DIR}/common/events.h)
139 set(TRUSTBRIDGE_MAIN_WITH_RESOURCES ${TRUSTBRIDGE_MAIN_WITH_RESOURCES} ${CMAKE_BINARY_DIR}/common/events.rc)
122 endif() 140 endif()
123 141
124 if(Qt5LinguistTools_FOUND) 142 if(Qt5LinguistTools_FOUND)
125 # Include translation as a resource 143 # Include translation as a resource
126 # 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

http://wald.intevation.org/projects/trustbridge/