Author: tkreuzer
Date: Sun Sep 19 18:52:34 2010
New Revision: 48819
URL:
http://svn.reactos.org/svn/reactos?rev=48819&view=rev
Log:
[CMAKE]
Add MSVC compatible MC command
Modified:
branches/cmake-bringup/include/reactos/mc/CMakeLists.txt
Modified: branches/cmake-bringup/include/reactos/mc/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/reactos/m…
==============================================================================
--- branches/cmake-bringup/include/reactos/mc/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/include/reactos/mc/CMakeLists.txt [iso-8859-1] Sun Sep 19
18:52:34 2010
@@ -1,11 +1,23 @@
+
+if(MSVC)
+MACRO(MACRO_MC FILE)
+ set (COMMAND_MC mc -r ${REACTOS_BINARY_DIR}/include/reactos -h
${REACTOS_BINARY_DIR}/include/reactos
${REACTOS_SOURCE_DIR}/include/reactos/mc/${FILE}.mc)
+ENDMACRO()
+else()
+MACRO(MACRO_MC FILE)
+ set(COMMAND_MC ${MINGW_PREFIX}windmc -A -b
${REACTOS_SOURCE_DIR}/include/reactos/mc/${FILE}.mc -r
${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos)
+ENDMACRO()
+endif()
+
MACRO (MACRO_ADD_MESSAGE_HEADERS)
FOREACH(_in_FILE ${ARGN})
get_filename_component(FILE ${_in_FILE} NAME_WE)
+ MACRO_MC(${FILE})
add_custom_command(
OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc
${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h
- COMMAND ${MINGW_PREFIX}windmc -A -b
${REACTOS_SOURCE_DIR}/include/reactos/mc/${FILE}.mc -r
${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos
+ COMMAND ${COMMAND_MC}
)
set_source_files_properties(
${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h
${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc
@@ -18,4 +30,4 @@
ENDMACRO (MACRO_ADD_MESSAGE_HEADERS)
file(GLOB_RECURSE SOURCE "*.mc")
-MACRO_ADD_MESSAGE_HEADERS(${SOURCE})
+MACRO_ADD_MESSAGE_HEADERS(${SOURCE})