Mercurial > trustbridge
comparison common/CMakeLists.txt @ 619:e780405f8150
Add generator for windmc header file
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 19 Jun 2014 17:45:06 +0200 |
parents | f4ce4eef3b38 |
children | 80d1a80b3e8d |
comparison
equal
deleted
inserted
replaced
618:7dfa4555fb89 | 619:e780405f8150 |
---|---|
2 # Software engineering by Intevation GmbH | 2 # Software engineering by Intevation GmbH |
3 # | 3 # |
4 # This file is Free Software under the GNU GPL (v>=2) | 4 # This file is Free Software under the GNU GPL (v>=2) |
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 | |
8 include_directories(${CMAKE_CURRENT_BINARY_DIR}) | |
7 | 9 |
8 set (trustbridge_common_src | 10 set (trustbridge_common_src |
9 certhelp.c | 11 certhelp.c |
10 listutil.c | 12 listutil.c |
11 logging.c | 13 logging.c |
13 strhelp.c | 15 strhelp.c |
14 util.c | 16 util.c |
15 binverify.c | 17 binverify.c |
16 ) | 18 ) |
17 | 19 |
20 if(WIN32) | |
21 # Add the event messages | |
22 if (MINGW) | |
23 STRING(REGEX REPLACE "windres" "windmc" MC_COMPILER ${CMAKE_RC_COMPILER}) | |
24 else() | |
25 # untested | |
26 set(MC_COMPILER "mc.exe") | |
27 endif() | |
28 | |
29 add_custom_command( | |
30 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/events.h | |
31 ${CMAKE_CURRENT_BINARY_DIR}/events.rc | |
32 ${CMAKE_CURRENT_BINARY_DIR}/MSG00407.bin | |
33 ${CMAKE_CURRENT_BINARY_DIR}/MSG00409.bin | |
34 COMMAND ${MC_COMPILER} ${CMAKE_SOURCE_DIR}/common/events.mc -a -U -r ${CMAKE_CURRENT_BINARY_DIR} -h ${CMAKE_CURRENT_BINARY_DIR} | |
35 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/events.mc) | |
36 set(trustbridge_common_src ${trustbridge_common_src} ${CMAKE_CURRENT_BINARY_DIR}/events.h) | |
37 endif() | |
38 | |
18 add_library(trustbridge_common STATIC ${trustbridge_common_src}) | 39 add_library(trustbridge_common STATIC ${trustbridge_common_src}) |