[CMAKE] Convert crtdll to spec
[reactos.git] / dll / win32 / crtdll / CMakeLists.txt
1
2 spec2def(crtdll.dll crtdll.spec)
3
4 add_definitions(
5 -DUSE_MSVCRT_PREFIX
6 -D_MSVCRT_LIB_
7 -D_MSVCRT_
8 -DCRTDLL
9 -D_CTYPE_DISABLE_MACROS
10 -D_NO_INLINING
11 -D__MINGW_IMPORT="")
12
13 include_directories(${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
14
15 list(APPEND SOURCE
16 dllmain.c
17 crtdll.rc
18 ${CMAKE_CURRENT_BINARY_DIR}/crtdll.def)
19
20 if(NOT MSVC)
21 set_source_files_properties(crtdll.def PROPERTIES EXTERNAL_OBJECT TRUE)
22 endif()
23
24 add_library(crtdll SHARED
25 ${CMAKE_CURRENT_BINARY_DIR}/crtdll_precomp.h.gch
26 ${SOURCE})
27
28 set_module_type(crtdll win32dll)
29
30 set_entrypoint(crtdll DllMain@12)
31
32 target_link_libraries(crtdll
33 wine
34 crt)
35
36 add_importlibs(crtdll kernel32 ntdll)
37 add_pch(crtdll ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
38
39 add_cab_target(crtdll 1)