1 2list(APPEND CRT_SOURCE 3 ${CRT_CONIO_SOURCE} 4 ${CRT_DIRECT_SOURCE} 5 ${CRT_EXCEPT_SOURCE} 6 ${CRT_FLOAT_SOURCE} 7 locale/locale.c 8 ${CRT_MATH_SOURCE} 9 ${CRT_MBSTRING_SOURCE} 10 ${CRT_MEM_SOURCE} 11 ${CRT_MISC_SOURCE} 12 ${CRT_PRINTF_SOURCE} 13 ${CRT_PROCESS_SOURCE} 14 ${CRT_SEARCH_SOURCE} 15 signal/signal.c 16 signal/xcptinfo.c 17 ${CRT_STARTUP_SOURCE} 18 ${CRT_STDIO_SOURCE} 19 ${CRT_STDLIB_SOURCE} 20 ${CRT_STRING_SOURCE} 21 sys_stat/systime.c 22 ${CRT_TIME_SOURCE} 23 ${CRT_WINE_SOURCE} 24 ${CRT_WSTRING_SOURCE} 25) 26 27list(APPEND CRT_ASM_SOURCE 28 ${CRT_EXCEPT_ASM_SOURCE} 29 ${CRT_FLOAT_ASM_SOURCE} 30 ${CRT_MATH_ASM_SOURCE} 31 ${CRT_SETJMP_ASM_SOURCE} 32 ${CRT_STDLIB_ASM_SOURCE} 33 ${CRT_STRING_ASM_SOURCE} 34 ${CRT_WINE_ASM_SOURCE} 35) 36 37set_source_files_properties(${CRT_ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "__MINGW_IMPORT=extern;USE_MSVCRT_PREFIX;_MSVCRT_LIB_;_MSVCRT_;_MT;CRTDLL") 38add_asm_files(crt_asm ${CRT_ASM_SOURCE}) 39 40add_library(crt ${CRT_SOURCE} ${crt_asm}) 41target_link_libraries(crt chkstk ${PSEH_LIB}) 42target_compile_definitions(crt 43 PRIVATE __MINGW_IMPORT=extern 44 USE_MSVCRT_PREFIX 45 _MSVCRT_LIB_ 46 _MSVCRT_ 47 _MT 48 CRTDLL) 49#add_pch(crt precomp.h) 50add_dependencies(crt psdk asm) 51