mirror of
https://github.com/reactos/reactos.git
synced 2025-01-10 08:10:18 +00:00
[CMAKE]
- Separate the resources creation into several targets. With this we're able to set proper dependencies on them selectively, and not as a whole. - Make chew and csq, as a result, depend only on bugcodes. svn path=/branches/cmake-bringup/; revision=48297
This commit is contained in:
parent
401329a84b
commit
1e82e45439
3 changed files with 63 additions and 19 deletions
|
@ -1,30 +1,74 @@
|
|||
|
||||
MACRO (MACRO_ADD_RESOURCES)
|
||||
|
||||
FOREACH(_in_FILE ${ARGN})
|
||||
|
||||
GET_FILENAME_COMPONENT(FILE ${_in_FILE} NAME_WE)
|
||||
|
||||
# bugcodes
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h
|
||||
COMMAND native-wmc -i -H ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h -o ${REACTOS_BINARY_DIR}/include/reactos/mc/${FILE}.rc ${REACTOS_SOURCE_DIR}/include/reactos/mc/${FILE}.mc
|
||||
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
|
||||
)
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h
|
||||
${REACTOS_BINARY_DIR}/include/reactos/bugcodes.h
|
||||
PROPERTIES
|
||||
GENERATED TRUE
|
||||
)
|
||||
|
||||
LIST(APPEND RESOURCES ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h)
|
||||
|
||||
ENDFOREACH(_in_FILE ${ARGN})
|
||||
ADD_CUSTOM_TARGET(bugcodes ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/bugcodes.h)
|
||||
|
||||
ENDMACRO (MACRO_ADD_RESOURCES)
|
||||
# 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
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE SOURCE "*.mc")
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${REACTOS_BINARY_DIR}/include/reactos/errcodes.h
|
||||
PROPERTIES
|
||||
GENERATED TRUE
|
||||
)
|
||||
|
||||
MACRO_ADD_RESOURCES(${SOURCE})
|
||||
ADD_CUSTOM_TARGET(errcodes ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/errcodes.h)
|
||||
|
||||
ADD_CUSTOM_TARGET(build_resources ALL DEPENDS ${RESOURCES})
|
||||
# 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)
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
add_definitions(-D_NTOSKRNL_)
|
||||
add_library(chew workqueue.c)
|
||||
add_dependencies(chew build_resources)
|
||||
add_dependencies(chew bugcodes)
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
add_definitions(-D_NTOSKRNL_)
|
||||
add_library(csq csq.c)
|
||||
add_dependencies(csq build_resources)
|
||||
add_dependencies(csq bugcodes)
|
Loading…
Reference in a new issue