-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
48 lines (38 loc) · 1.21 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
project(kernelEx)
cmake_minimum_required(VERSION 3.12)
include (tools/toolchain-gcc.cmake)
include (tools/gcc.cmake)
include(tools/compilerflags.cmake)
include (tools/spec2def.cmake)
include (tools/exemod.cmake)
file(MAKE_DIRECTORY bin/exm)
if(ARCH STREQUAL "amd64")
set (BIN_DIR ${CMAKE_SOURCE_DIR}/bin/bin64)
else()
set (BIN_DIR ${CMAKE_SOURCE_DIR}/bin/bin32)
endif()
set(CMAKE_SHARED_LIBRARY_PREFIX "")
set(CMAKE_SHARED_MODULE_PREFIX "")
add_link_options (-s -Wl,--gc-sections)
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${BIN_DIR})
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${BIN_DIR})
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BIN_DIR})
add_definitions(-DUNICODE -D_UNICODE -D_WIN32_WINNT=0x502 -DWINVER=0x502)
add_subdirectory(tools)
include_directories(src/include)
add_compile_flags("-Wno-attributes")
# build the libraries
add_subdirectory(src/ntdll_vista)
add_subdirectory(src/kernel32_vista)
add_subdirectory(src/iphlpapi_vista)
add_subdirectory(src/shell32_vista)
add_subdirectory(src/user32_vista)
# build the exm files
if(ARCH STREQUAL "amd64")
add_subdirectory(src/wow64)
endif()
add_subdirectory(src/kernel32)
add_subdirectory(src/ntdll)
add_subdirectory(src/user32)
add_subdirectory(src/shell32)
add_subdirectory(tests)