xref: /reactos/dll/win32/msvcrt/CMakeLists.txt (revision c2c66aff)
1
2include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/crt/include)
3spec2def(msvcrt.dll msvcrt.spec ADD_IMPORTLIB)
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    dllmain.c
17    stubs.c
18    msvcrt.rc
19    ${CMAKE_CURRENT_BINARY_DIR}/msvcrt_stubs.c
20    ${CMAKE_CURRENT_BINARY_DIR}/msvcrt.def)
21
22add_library(msvcrt SHARED ${SOURCE})
23set_module_type(msvcrt win32dll ENTRYPOINT DllMain 12)
24add_dependencies(msvcrt psdk)
25target_link_libraries(msvcrt crt wine ${PSEH_LIB})
26
27if(MSVC)
28    # export of deleting destructor "name"
29    add_target_link_flags(msvcrt "/ignore:4102")
30    add_target_property(libmsvcrt STATIC_LIBRARY_FLAGS "/ignore:4102")
31endif()
32
33add_importlibs(msvcrt kernel32 ntdll)
34add_cd_file(TARGET msvcrt DESTINATION reactos/system32 FOR all)
35