0799e290be4707af5834850add0b7cb87759a42a
[reactos.git] / dll / win32 / msvcrt / CMakeLists.txt
1
2 include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/crt/include)
3 spec2def(msvcrt.dll msvcrt.spec ADD_IMPORTLIB)
4
5 add_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
15 list(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
22 add_library(msvcrt SHARED ${SOURCE})
23 set_module_type(msvcrt win32dll ENTRYPOINT DllMain 12)
24 add_dependencies(msvcrt psdk)
25 target_link_libraries(msvcrt crt wine ${PSEH_LIB})
26
27 if(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")
31 endif()
32
33 add_importlibs(msvcrt kernel32 ntdll)
34 add_cd_file(TARGET msvcrt DESTINATION reactos/system32 FOR all)