Sync with trunk r63502.
[reactos.git] / include / asm / CMakeLists.txt
1
2 add_library(genincdata SHARED genincdata.c)
3
4 set_entrypoint(genincdata 0)
5 add_dependencies(genincdata bugcodes)
6
7 if(MSVC)
8 set(OPT_MS "-ms")
9 else()
10 set(OPT_MS "")
11 endif()
12
13 if(ARCH STREQUAL "i386")
14 set(_filename ks386.inc)
15 elseif(ARCH STREQUAL "amd64")
16 set(_filename ksamd64.inc)
17 elseif(ARCH STREQUAL "arm")
18 set(_filename ksarm.h)
19 endif()
20
21 get_target_property(genincdata_dll genincdata LOCATION)
22
23 add_custom_command(
24 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_filename}
25 COMMAND native-geninc ${genincdata_dll} ${CMAKE_CURRENT_BINARY_DIR}/${_filename} ${OPT_MS}
26 DEPENDS genincdata native-geninc)
27
28 add_custom_target(asm
29 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_filename})