xref: /reactos/sdk/lib/cmlib/CMakeLists.txt (revision 8a978a17)
1
2add_definitions(
3    -D_NTSYSTEM_
4    -DNASSERT)
5
6list(APPEND SOURCE
7    cminit.c
8    cmindex.c
9    cmkeydel.c
10    cmname.c
11    cmse.c
12    cmvalue.c
13    hivebin.c
14    hivecell.c
15    hiveinit.c
16    hivesum.c
17    hivewrt.c
18    cmlib.h)
19
20if(CMAKE_CROSSCOMPILING)
21    add_library(cmlib ${SOURCE})
22    add_dependencies(cmlib bugcodes xdk)
23    add_pch(cmlib cmlib.h SOURCE)
24else()
25    add_definitions(
26        -D__NO_CTYPE_INLINES
27        -DCMLIB_HOST)
28    add_library(cmlibhost ${SOURCE})
29    target_include_directories(cmlibhost INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
30
31    if(NOT MSVC)
32        target_compile_options(cmlibhost PRIVATE -fshort-wchar -Wno-multichar)
33    endif()
34
35    target_link_libraries(cmlibhost PRIVATE host_includes)
36endif()
37