[CMAKE]
[reactos.git] / dll / ntdll / CMakeLists.txt
1
2 add_definitions(-D__NTDLL__)
3 add_definitions(-D_NTOSKRNL_)
4 add_definitions(-DCRTDLL)
5
6 include_directories(BEFORE ./include)
7 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys)
8
9 file(GLOB_RECURSE SOURCE *.c)
10 list(REMOVE_ITEM SOURCE
11 ${CMAKE_CURRENT_SOURCE_DIR}/ldr/elf.c
12 ${CMAKE_CURRENT_SOURCE_DIR}/dispatch/dispatch.c
13 ${CMAKE_CURRENT_SOURCE_DIR}/dispatch/amd64/stubs.c)
14 file(GLOB_RECURSE ARCH_SOURCE
15 "${CMAKE_CURRENT_SOURCE_DIR}/dispatch/${ARCH}/*.c"
16 "${CMAKE_CURRENT_SOURCE_DIR}/dispatch/${ARCH}/*.s")
17
18 add_library(ntdll SHARED
19 ${ARCH_SOURCE} ${SOURCE}
20 ${CMAKE_CURRENT_SOURCE_DIR}/def/ntdll.rc
21 ${CMAKE_CURRENT_BINARY_DIR}/ntdll_ntdll.h.gch)
22
23 set_target_properties(ntdll PROPERTIES LINK_FLAGS "-Wl,-entry,0")
24
25 target_link_libraries(ntdll ${CMAKE_CURRENT_SOURCE_DIR}/def/ntdll.def
26 rtl
27 ntdllsys
28 libcntpr
29 pseh)
30
31 add_pch(ntdll ${CMAKE_CURRENT_SOURCE_DIR}/include/ntdll.h ${SOURCE})
32 add_dependencies(ntdll ntstatus version)