2 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>")
4 add_definitions(-D__NTDLL__)
5 add_definitions(-D_NTOSKRNL_)
6 add_definitions(-DCRTDLL)
8 include_directories(BEFORE include)
9 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys)
24 list(APPEND SOURCE dispatch/i386/dispatch.S)
25 elseif(ARCH MATCHES amd64)
26 list(APPEND SOURCE dispatch/amd64/stubs.c)
27 elseif(ARCH MATCHES arm)
28 list(APPEND SOURCE dispatch/arm/stubs_asm.s)
30 list(APPEND SOURCE dispatch/dispatch.c)
31 endif(ARCH MATCHES i386)
33 add_library(ntdll SHARED
35 ${CMAKE_CURRENT_BINARY_DIR}/ntdll_ntdll.h.gch)
37 set_target_properties(ntdll PROPERTIES LINK_FLAGS "-Wl,-entry,0")
39 target_link_libraries(ntdll ${CMAKE_CURRENT_SOURCE_DIR}/def/ntdll.def
40 -Wl,--whole-archive rtl -Wl,--no-whole-archive
45 add_pch(ntdll ${CMAKE_CURRENT_SOURCE_DIR}/include/ntdll.h ${SOURCE})
46 add_dependencies(ntdll ntstatus version)