reactos/sdk/lib/cmlib/CMakeLists.txt
Timo Kreuzer 2881b77302 [CMLIB] Don't redefine PAGED_CODE() to nothing in cmlib.h except for cmlib_host
This header is included by ntoskrnl which effectively disabled all PAGED_CODE checks since 2015. Thanks Alex.
Instead define _BLDR_ when building cmlib, which will avoid trying to import KeGetCurrentIrql()
2022-07-20 20:36:22 +02:00

38 lines
755 B
CMake

add_definitions(
-D_BLDR_
-D_NTSYSTEM_
-DNASSERT)
list(APPEND SOURCE
cminit.c
cmindex.c
cmkeydel.c
cmname.c
cmse.c
cmvalue.c
hivebin.c
hivecell.c
hiveinit.c
hivesum.c
hivewrt.c
cmlib.h)
if(CMAKE_CROSSCOMPILING)
add_library(cmlib ${SOURCE})
add_dependencies(cmlib bugcodes xdk)
add_pch(cmlib cmlib.h SOURCE)
else()
add_definitions(
-D__NO_CTYPE_INLINES
-DCMLIB_HOST)
add_library(cmlibhost ${SOURCE})
target_include_directories(cmlibhost INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
if(NOT MSVC)
target_compile_options(cmlibhost PRIVATE -fshort-wchar -Wno-multichar)
endif()
target_link_libraries(cmlibhost PRIVATE host_includes)
endif()