1 2include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/crt/include) 3spec2def(msvcrt40.dll msvcrt40.spec) 4 5add_definitions( 6 -DUSE_MSVCRT_PREFIX 7 -D_MSVCRT_ 8 -D_MSVCRT_LIB_ 9 -D_MT 10 -D_CTYPE_DISABLE_MACROS 11 -D_NO_INLINING 12 -DCRTDLL 13 -D__MINGW_IMPORT="") 14 15list(APPEND SOURCE 16 msvcrt40.c 17 stubs.c 18 ${CMAKE_CURRENT_BINARY_DIR}/msvcrt40_stubs.c 19 ${CMAKE_CURRENT_BINARY_DIR}/msvcrt40.def) 20 21add_library(msvcrt40 SHARED ${SOURCE}) 22set_module_type(msvcrt40 win32dll ENTRYPOINT DllMain 12) 23add_dependencies(msvcrt40 psdk) 24target_link_libraries(msvcrt40 crt wine ${PSEH_LIB}) 25 26if(MSVC) 27 # export of deleting destructor "name" 28 add_target_link_flags(msvcrt40 "/ignore:4102") 29endif() 30 31add_importlibs(msvcrt40 kernel32 ntdll) 32add_cd_file(TARGET msvcrt40 DESTINATION reactos/system32 FOR all) 33