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