- Update to r53061
[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 ${SOURCE})
25
26 if (NOT MSVC)
27 set_target_properties(msvcrt PROPERTIES LINK_FLAGS "-u __seh_longjmp_unwind@4")
28 endif()
29
30 add_dependencies(msvcrt psdk)
31 set_entrypoint(msvcrt DllMain@12)
32 set_image_base(msvcrt ${baseaddress_msvcrt})
33
34 target_link_libraries(msvcrt
35 crt
36 wine)
37
38 if(NOT MSVC)
39 target_link_libraries(msvcrt pseh)
40 endif()
41
42 add_pch(msvcrt precomp.h)
43 add_importlibs(msvcrt kernel32 ntdll)
44 add_cd_file(TARGET msvcrt DESTINATION reactos/system32 FOR all)
45 add_importlib_target(msvcrt.spec)
46