1 2list(APPEND SOURCE 3 infcore.c 4 infget.c 5 infput.c) 6 7if(CMAKE_CROSSCOMPILING) 8 list(APPEND SOURCE 9 infrosgen.c 10 infrosget.c 11 infrosput.c 12 inflib.h) 13 14 add_library(inflib ${SOURCE}) 15 add_pch(inflib inflib.h SOURCE) 16 add_dependencies(inflib psdk) 17else() 18 list(APPEND SOURCE 19 infhostgen.c 20 infhostget.c 21 infhostput.c 22 infhostrtl.c) 23 24 add_definitions(-D__NO_CTYPE_INLINES -DINFLIB_HOST -D_CRT_SECURE_NO_WARNINGS) 25 add_library(inflibhost ${SOURCE}) 26 target_include_directories(inflibhost INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) 27 28 if(NOT MSVC) 29 target_compile_options(inflibhost PRIVATE -fshort-wchar -Wpointer-arith -Wwrite-strings) 30 endif() 31 32 target_link_libraries(inflibhost PRIVATE host_includes) 33endif() 34