2011-05-16 13:12:07 +00:00
|
|
|
|
|
|
|
add_library(genincdata SHARED genincdata.c)
|
|
|
|
|
|
|
|
set_entrypoint(genincdata 0)
|
|
|
|
add_dependencies(genincdata bugcodes)
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
set(OPT_MS "-ms")
|
|
|
|
else()
|
|
|
|
set(OPT_MS "")
|
|
|
|
endif()
|
|
|
|
|
2012-08-27 18:58:27 +00:00
|
|
|
if(ARCH STREQUAL "i386")
|
2011-05-16 13:12:07 +00:00
|
|
|
set(_filename ks386)
|
2012-08-27 18:58:27 +00:00
|
|
|
elseif(ARCH STREQUAL "amd64")
|
2011-05-16 13:12:07 +00:00
|
|
|
set(_filename ksamd64)
|
|
|
|
endif()
|
|
|
|
|
2011-06-11 16:09:57 +00:00
|
|
|
get_target_property(genincdata_dll genincdata LOCATION)
|
|
|
|
|
2011-05-16 13:12:07 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_filename}.inc
|
2011-06-11 16:09:57 +00:00
|
|
|
COMMAND native-geninc ${genincdata_dll} ${CMAKE_CURRENT_BINARY_DIR}/${_filename}.inc ${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
|
|
|
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_filename}.inc)
|