2011-05-16 13:12:07 +00:00
|
|
|
|
2019-03-20 13:19:48 +00:00
|
|
|
add_library(genincdata MODULE genincdata.c)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
|
|
|
set_entrypoint(genincdata 0)
|
2015-09-07 09:46:43 +00:00
|
|
|
add_dependencies(genincdata bugcodes psdk xdk)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
set(OPT_MS "-ms")
|
|
|
|
else()
|
|
|
|
set(OPT_MS "")
|
|
|
|
endif()
|
|
|
|
|
2012-08-27 18:58:27 +00:00
|
|
|
if(ARCH STREQUAL "i386")
|
2014-05-30 00:30:38 +00:00
|
|
|
set(_filename ks386.inc)
|
2012-08-27 18:58:27 +00:00
|
|
|
elseif(ARCH STREQUAL "amd64")
|
2014-05-30 00:30:38 +00:00
|
|
|
set(_filename ksamd64.inc)
|
|
|
|
elseif(ARCH STREQUAL "arm")
|
|
|
|
set(_filename ksarm.h)
|
2011-05-16 13:12:07 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
add_custom_command(
|
2014-05-30 00:30:38 +00:00
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_filename}
|
2018-03-10 13:41:13 +00:00
|
|
|
COMMAND native-geninc $<TARGET_FILE:genincdata> ${CMAKE_CURRENT_BINARY_DIR}/${_filename} ${OPT_MS}
|
2011-08-05 20:40:40 +00:00
|
|
|
DEPENDS genincdata native-geninc)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
|
|
|
add_custom_target(asm
|
2014-05-30 00:30:38 +00:00
|
|
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_filename})
|