xref: /reactos/sdk/include/asm/CMakeLists.txt (revision 8540ab04)
1
2add_library(genincdata SHARED genincdata.c)
3
4set_entrypoint(genincdata 0)
5add_dependencies(genincdata bugcodes psdk xdk)
6
7if(MSVC)
8    set(OPT_MS "-ms")
9else()
10    set(OPT_MS "")
11endif()
12
13if(ARCH STREQUAL "i386")
14    set(_filename ks386.inc)
15elseif(ARCH STREQUAL "amd64")
16    set(_filename ksamd64.inc)
17elseif(ARCH STREQUAL "arm")
18    set(_filename ksarm.h)
19endif()
20
21add_custom_command(
22    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_filename}
23    COMMAND native-geninc $<TARGET_FILE:genincdata> ${CMAKE_CURRENT_BINARY_DIR}/${_filename} ${OPT_MS}
24    DEPENDS genincdata native-geninc)
25
26add_custom_target(asm
27    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_filename})
28