[PATCH 3 of 4] Add generator for windmc header file
Wald Commits
scm-commit at wald.intevation.org
Thu Jun 19 17:48:19 CEST 2014
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1403192706 -7200
# Node ID e780405f815062983da00c93a85e0be9df294cab
# Parent 7dfa4555fb89b725c8638a7443f6537382340d02
Add generator for windmc header file
diff -r 7dfa4555fb89 -r e780405f8150 common/CMakeLists.txt
--- a/common/CMakeLists.txt Thu Jun 19 17:44:27 2014 +0200
+++ b/common/CMakeLists.txt Thu Jun 19 17:45:06 2014 +0200
@@ -5,6 +5,8 @@
# and comes with ABSOLUTELY NO WARRANTY!
# See LICENSE.txt for details.
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
set (trustbridge_common_src
certhelp.c
listutil.c
@@ -15,4 +17,23 @@
binverify.c
)
+if(WIN32)
+ # Add the event messages
+ if (MINGW)
+ STRING(REGEX REPLACE "windres" "windmc" MC_COMPILER ${CMAKE_RC_COMPILER})
+ else()
+ # untested
+ set(MC_COMPILER "mc.exe")
+ endif()
+
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/events.h
+ ${CMAKE_CURRENT_BINARY_DIR}/events.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/MSG00407.bin
+ ${CMAKE_CURRENT_BINARY_DIR}/MSG00409.bin
+ COMMAND ${MC_COMPILER} ${CMAKE_SOURCE_DIR}/common/events.mc -a -U -r ${CMAKE_CURRENT_BINARY_DIR} -h ${CMAKE_CURRENT_BINARY_DIR}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/events.mc)
+ set(trustbridge_common_src ${trustbridge_common_src} ${CMAKE_CURRENT_BINARY_DIR}/events.h)
+endif()
+
add_library(trustbridge_common STATIC ${trustbridge_common_src})
More information about the Trustbridge-commits
mailing list