-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
60 lines (47 loc) · 1.05 KB
/
CMakeLists.txt
File metadata and controls
60 lines (47 loc) · 1.05 KB
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
49
50
51
52
53
54
55
56
57
58
59
# Project setup
cmake_minimum_required(VERSION 3.0)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_STANDARD 20)
project(std VERSION 1.0)
include_directories(
include
ext/libelfin/
ext/linenoise/
ext/zydis/include/
ext/zydis/dependencies/zycore/include/
src/std
)
add_custom_target(
libelfin
COMMAND make
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/ext/libelfin/
)
option(ZYDIS_BUILD_TOOLS "" OFF)
option(ZYDIS_BUILD_EXAMPLES "" OFF)
add_subdirectory(ext/zydis)
add_subdirectory(src/std)
add_executable(
std
src/main.cxx
ext/linenoise/linenoise.c
)
# Samples for debugging
add_executable(
sleep_5
samples/sleep.c
)
add_executable(
dwarfer
samples/dwarf_test.c
)
target_link_libraries(
std PRIVATE
Debugger
${PROJECT_BINARY_DIR}/ext/zydis/libZydis.a
${PROJECT_SOURCE_DIR}/ext/libelfin/dwarf/libdwarf++.so
${PROJECT_SOURCE_DIR}/ext/libelfin/elf/libelf++.so
)
add_dependencies(std libelfin)
# Sample executables autobuild