1 2add_definitions( 3 -D_NTSYSTEM_ 4 -DNASSERT) 5 6list(APPEND SOURCE 7 cminit.c 8 cmindex.c 9 cmkeydel.c 10 cmname.c 11 cmse.c 12 cmvalue.c 13 hivebin.c 14 hivecell.c 15 hiveinit.c 16 hivesum.c 17 hivewrt.c 18 cmlib.h) 19 20if(CMAKE_CROSSCOMPILING) 21 add_library(cmlib ${SOURCE}) 22 add_dependencies(cmlib bugcodes xdk) 23 add_pch(cmlib cmlib.h SOURCE) 24else() 25 add_definitions( 26 -D__NO_CTYPE_INLINES 27 -DCMLIB_HOST) 28 add_library(cmlibhost ${SOURCE}) 29 30 if(NOT MSVC) 31 add_target_compile_flags(cmlibhost "-fshort-wchar -Wno-multichar") 32 endif() 33 34 target_link_libraries(cmlibhost unicode) 35endif() 36