mirror of
https://github.com/reactos/reactos.git
synced 2025-04-19 04:07:16 +00:00
[CMAKE]
- Richard : Group message headers creation into one macro. svn path=/branches/cmake-bringup/; revision=48426
This commit is contained in:
parent
044e663dad
commit
9c529a8548
1 changed files with 16 additions and 69 deletions
|
@ -1,74 +1,21 @@
|
|||
# bugcodes
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/bugcodes.h
|
||||
COMMAND native-wmc -i -H ${REACTOS_BINARY_DIR}/include/reactos/bugcodes.h -o ${REACTOS_BINARY_DIR}/include/reactos/mc/bugcodes.rc ${REACTOS_SOURCE_DIR}/include/reactos/mc/bugcodes.mc
|
||||
DEPENDS native-wmc
|
||||
)
|
||||
MACRO (MACRO_ADD_MESSAGE_HEADERS)
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${REACTOS_BINARY_DIR}/include/reactos/bugcodes.h
|
||||
PROPERTIES
|
||||
GENERATED TRUE
|
||||
)
|
||||
FOREACH(_in_FILE ${ARGN})
|
||||
|
||||
ADD_CUSTOM_TARGET(bugcodes ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/bugcodes.h)
|
||||
get_filename_component(FILE ${_in_FILE} NAME_WE)
|
||||
add_custom_command(
|
||||
OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h
|
||||
COMMAND ${MINGW_PREFIX}windmc ${REACTOS_SOURCE_DIR}/include/reactos/mc/${FILE}.mc -r ${REACTOS_BINARY_DIR}/include/reactos
|
||||
)
|
||||
set_source_files_properties(
|
||||
${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc
|
||||
PROPERTIES GENERATED TRUE
|
||||
)
|
||||
add_custom_target(${FILE} ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc)
|
||||
|
||||
# errcodes
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/errcodes.h
|
||||
COMMAND native-wmc -i -H ${REACTOS_BINARY_DIR}/include/reactos/errcodes.h -o ${REACTOS_BINARY_DIR}/include/reactos/mc/errcodes.rc ${REACTOS_SOURCE_DIR}/include/reactos/mc/errcodes.mc
|
||||
DEPENDS native-wmc
|
||||
)
|
||||
ENDFOREACH(_in_FILE ${ARGN})
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${REACTOS_BINARY_DIR}/include/reactos/errcodes.h
|
||||
PROPERTIES
|
||||
GENERATED TRUE
|
||||
)
|
||||
ENDMACRO (MACRO_ADD_MESSAGE_HEADERS)
|
||||
|
||||
ADD_CUSTOM_TARGET(errcodes ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/errcodes.h)
|
||||
|
||||
# netevent
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/netevent.h
|
||||
COMMAND native-wmc -i -H ${REACTOS_BINARY_DIR}/include/reactos/netevent.h -o ${REACTOS_BINARY_DIR}/include/reactos/mc/netevent.rc ${REACTOS_SOURCE_DIR}/include/reactos/mc/netevent.mc
|
||||
DEPENDS native-wmc
|
||||
)
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${REACTOS_BINARY_DIR}/include/reactos/netevent.h
|
||||
PROPERTIES
|
||||
GENERATED TRUE
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET(netevent ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/netevent.h)
|
||||
|
||||
# ntstatus
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/ntstatus.h
|
||||
COMMAND native-wmc -i -H ${REACTOS_BINARY_DIR}/include/reactos/ntstatus.h -o ${REACTOS_BINARY_DIR}/include/reactos/mc/ntstatus.rc ${REACTOS_SOURCE_DIR}/include/reactos/mc/ntstatus.mc
|
||||
DEPENDS native-wmc
|
||||
)
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${REACTOS_BINARY_DIR}/include/reactos/ntstatus.h
|
||||
PROPERTIES
|
||||
GENERATED TRUE
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET(ntstatus ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/ntstatus.h)
|
||||
|
||||
# pciclass
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/pciclass.h
|
||||
COMMAND native-wmc -i -H ${REACTOS_BINARY_DIR}/include/reactos/pciclass.h -o ${REACTOS_BINARY_DIR}/include/reactos/mc/pciclass.rc ${REACTOS_SOURCE_DIR}/include/reactos/mc/pciclass.mc
|
||||
DEPENDS native-wmc
|
||||
)
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${REACTOS_BINARY_DIR}/include/reactos/pciclass.h
|
||||
PROPERTIES
|
||||
GENERATED TRUE
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET(pciclass ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/pciclass.h)
|
||||
file(GLOB_RECURSE SOURCE "*.mc")
|
||||
MACRO_ADD_MESSAGE_HEADERS(${SOURCE})
|
Loading…
Reference in a new issue