mirror of
https://github.com/reactos/reactos.git
synced 2024-09-20 01:31:34 +00:00
a62f514cfb
- Mark DbgUiWaitStateChange as NTSYSAPI. [CMAKE] - Don't create an import library for ntdll, we'll ship with one. - Temporarily add the ntdll import library (until RosBE ships with one). - Make the definition file MSVC compatible. - Include every object file in librtl when linking. - NTDLL now compiles successfully with the MSVC compatible definition file. svn path=/branches/cmake-bringup/; revision=48529
35 lines
1.3 KiB
CMake
35 lines
1.3 KiB
CMake
|
|
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>")
|
|
|
|
add_definitions(-D__NTDLL__)
|
|
add_definitions(-D_NTOSKRNL_)
|
|
add_definitions(-DCRTDLL)
|
|
|
|
include_directories(BEFORE ./include)
|
|
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys)
|
|
|
|
file(GLOB_RECURSE SOURCE *.c)
|
|
list(REMOVE_ITEM SOURCE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ldr/elf.c
|
|
${CMAKE_CURRENT_SOURCE_DIR}/dispatch/dispatch.c
|
|
${CMAKE_CURRENT_SOURCE_DIR}/dispatch/amd64/stubs.c)
|
|
file(GLOB_RECURSE ARCH_SOURCE
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/dispatch/${ARCH}/*.c"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/dispatch/${ARCH}/*.s")
|
|
|
|
add_library(ntdll SHARED
|
|
${ARCH_SOURCE} ${SOURCE}
|
|
${CMAKE_CURRENT_SOURCE_DIR}/def/ntdll.rc
|
|
${CMAKE_CURRENT_BINARY_DIR}/ntdll_ntdll.h.gch)
|
|
|
|
set_target_properties(ntdll PROPERTIES LINK_FLAGS "-Wl,-entry,0")
|
|
|
|
target_link_libraries(ntdll ${CMAKE_CURRENT_SOURCE_DIR}/def/ntdll.def
|
|
-Wl,--whole-archive rtl -Wl,--no-whole-archive
|
|
ntdllsys
|
|
libcntpr
|
|
pseh)
|
|
|
|
add_pch(ntdll ${CMAKE_CURRENT_SOURCE_DIR}/include/ntdll.h ${SOURCE})
|
|
add_dependencies(ntdll ntstatus version)
|