[CMAKE]
[reactos.git] / dll / win32 / kernel32 / CMakeLists.txt
1 set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
2
3 add_definitions(-D_KERNEL32_)
4
5 remove_definitions(-D_WIN32_WINNT=0x502)
6 add_definitions(-D_WIN32_WINNT=0x600)
7
8 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys)
9
10 file(GLOB_RECURSE SOURCE "*.c")
11
12 file(GLOB_RECURSE ARCH_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/thread/${ARCH}/*.s")
13
14 add_library(kernel32 SHARED
15 ${SOURCE}
16 ${ARCH_SOURCE}
17 ${CMAKE_CURRENT_SOURCE_DIR}/kernel32.rc
18 ${CMAKE_CURRENT_BINARY_DIR}/kernel32_k32.h.gch)
19
20 set_target_properties(kernel32 PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
21
22 target_link_libraries(kernel32 ${CMAKE_CURRENT_SOURCE_DIR}/kernel32.def
23 pseh
24 ${REACTOS_SOURCE_DIR}/dll/ntdll/libntdll.a)
25
26 add_pch(kernel32 ${CMAKE_CURRENT_SOURCE_DIR}/k32.h ${SOURCE})
27 add_dependencies(kernel32 errcodes version)