2011-05-16 13:12:07 +00:00
|
|
|
|
|
|
|
add_definitions(
|
|
|
|
-D_NTSYSTEM_
|
|
|
|
-DNASSERT)
|
|
|
|
|
|
|
|
list(APPEND SOURCE
|
|
|
|
cminit.c
|
2015-10-04 20:18:49 +00:00
|
|
|
cmindex.c
|
2016-01-17 21:48:00 +00:00
|
|
|
cmkeydel.c
|
2015-10-04 20:18:49 +00:00
|
|
|
cmname.c
|
2016-02-10 22:28:12 +00:00
|
|
|
cmse.c
|
2016-01-05 01:51:54 +00:00
|
|
|
cmvalue.c
|
2011-05-16 13:12:07 +00:00
|
|
|
hivebin.c
|
|
|
|
hivecell.c
|
|
|
|
hiveinit.c
|
|
|
|
hivesum.c
|
2014-02-09 21:43:42 +00:00
|
|
|
hivewrt.c
|
|
|
|
cmlib.h)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
|
|
|
if(CMAKE_CROSSCOMPILING)
|
|
|
|
add_library(cmlib ${SOURCE})
|
2015-09-07 11:13:09 +00:00
|
|
|
add_dependencies(cmlib bugcodes xdk)
|
2014-02-09 21:43:42 +00:00
|
|
|
add_pch(cmlib cmlib.h SOURCE)
|
2011-05-16 13:12:07 +00:00
|
|
|
else()
|
|
|
|
add_definitions(
|
|
|
|
-D__NO_CTYPE_INLINES
|
|
|
|
-DCMLIB_HOST)
|
|
|
|
add_library(cmlibhost ${SOURCE})
|
2019-11-15 13:07:46 +00:00
|
|
|
target_include_directories(cmlibhost INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
2016-10-04 12:37:52 +00:00
|
|
|
|
|
|
|
if(NOT MSVC)
|
2020-04-16 12:59:38 +00:00
|
|
|
target_compile_options(cmlibhost PRIVATE -fshort-wchar -Wno-multichar)
|
2016-10-04 12:37:52 +00:00
|
|
|
endif()
|
|
|
|
|
2019-11-15 13:07:46 +00:00
|
|
|
target_link_libraries(cmlibhost PRIVATE host_includes)
|
2011-05-16 13:12:07 +00:00
|
|
|
endif()
|