[CMAKE]
[reactos.git] / dll / win32 / msvcrt / CMakeLists.txt
1
2 spec2def(msvcrt.dll msvcrt.spec)
3
4 add_definitions(
5 -DUSE_MSVCRT_PREFIX
6 -D_MSVCRT_
7 -D_MSVCRT_LIB_
8 -D_MT
9 -D_CTYPE_DISABLE_MACROS
10 -D_NO_INLINING
11 -DCRTDLL
12 -D__MINGW_IMPORT="")
13
14 include_directories(${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
15
16 set_rc_compiler()
17
18 list(APPEND SOURCE
19 dllmain.c
20 stubs.c
21 msvcrt.rc
22 ${CMAKE_CURRENT_BINARY_DIR}/msvcrt.def)
23
24 add_library(msvcrt SHARED
25 ${CMAKE_CURRENT_BINARY_DIR}/msvcrt_precomp.h.gch
26 ${SOURCE})
27
28 if (NOT MSVC)
29 set_target_properties(msvcrt PROPERTIES LINK_FLAGS "-u __seh_longjmp_unwind@4")
30 endif()
31
32 add_dependencies(msvcrt psdk)
33 set_entrypoint(msvcrt DllMain@12)
34 set_image_base(msvcrt ${baseaddress_msvcrt})
35
36 target_link_libraries(msvcrt
37 crt
38 wine
39 ${PSEH_LIB})
40
41 add_pch(msvcrt ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
42 add_importlibs(msvcrt kernel32 ntdll)
43 add_cd_file(TARGET msvcrt DESTINATION reactos/system32)
44 add_importlib_target(msvcrt.spec)
45