This repository was archived by the owner on Dec 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
135 lines (113 loc) · 3.65 KB
/
CMakeLists.txt
File metadata and controls
135 lines (113 loc) · 3.65 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# This file is automatically generated from cmake.toml - DO NOT EDIT
# See https://github.com/build-cpp/cmkr for more information
cmake_minimum_required(VERSION 3.15)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "In-tree builds are not supported. Run CMake from a separate directory: cmake -B build")
endif()
set(CMKR_ROOT_PROJECT OFF)
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(CMKR_ROOT_PROJECT ON)
# Bootstrap cmkr and automatically regenerate CMakeLists.txt
include(cmkr.cmake OPTIONAL RESULT_VARIABLE CMKR_INCLUDE_RESULT)
if(CMKR_INCLUDE_RESULT)
cmkr()
endif()
# Enable folder support
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Create a configure-time dependency on cmake.toml to improve IDE support
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS cmake.toml)
endif()
project(vmp2)
# Subdirectory: vmprofiler
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
if(CMAKE_FOLDER)
set(CMAKE_FOLDER "${CMAKE_FOLDER}/vmprofiler")
else()
set(CMAKE_FOLDER vmprofiler)
endif()
add_subdirectory(vmprofiler)
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
# Subdirectory: vmassembler
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
if(CMAKE_FOLDER)
set(CMAKE_FOLDER "${CMAKE_FOLDER}/vmassembler")
else()
set(CMAKE_FOLDER vmassembler)
endif()
add_subdirectory(vmassembler)
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
# Subdirectory: vmemu
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
if(CMAKE_FOLDER)
set(CMAKE_FOLDER "${CMAKE_FOLDER}/vmemu")
else()
set(CMAKE_FOLDER vmemu)
endif()
add_subdirectory(vmemu)
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
include(FetchContent)
FetchContent_Declare(
argparse
GIT_REPOSITORY https://github.com/jamolnng/argparse.git
GIT_TAG 6a4495932dff0f5d31d0c32c6b4130b51daa2d42
CMAKE_ARGS
-DARGPARSE_BUILD_EXAMPLE:BOOL=OFF
-DARGPARSE_TEST_ENABLE:BOOL=OFF
)
# Force remove example/test if they got created anyway
# please fuck off argparse thank you!
if(TARGET example)
remove_executable(example)
endif()
if(TARGET tests)
remove_executable(tests)
endif()
FetchContent_Declare(
unicorn
GIT_REPOSITORY https://github.com/unicorn-engine/unicorn.git
GIT_TAG 2.1.4
CMAKE_ARGS
-DBUILD_SHARED_LIBS=OFF
-DUNICORN_BUILD_SHARED=OFF
-DUNICORN_BUILD_EXAMPLES=OFF
-DUNICORN_TEST_ENABLE=OFF
)
FetchContent_Declare(
linux-pe
GIT_REPOSITORY https://github.com/can1357/linux-pe.git
GIT_TAG master
)
FetchContent_Declare(
zydis
GIT_REPOSITORY https://github.com/zyantific/zydis.git
GIT_TAG bfee99f49274a0eec3ffea16ede3a5bda9cda88f
)
FetchContent_MakeAvailable(argparse unicorn linux-pe zydis)
# Zydis options
set(ZYDIS_BUILD_SHARED_LIB OFF CACHE BOOL "Disable building shared lib")
set(ZYDIS_BUILD_EXAMPLES OFF CACHE BOOL "Disable building examples")
set(ZYDIS_BUILD_TOOLS OFF CACHE BOOL "Disable building tools")
set(ZYDIS_FUZZ_AFL_FAST OFF CACHE BOOL "Disable AFL fuzzing")
set(ZYDIS_LIBFUZZER OFF CACHE BOOL "Disable libfuzzer")
# Subdirectory: vmprofiler-cli
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
if(CMAKE_FOLDER)
set(CMAKE_FOLDER "${CMAKE_FOLDER}/vmprofiler-cli")
else()
set(CMAKE_FOLDER vmprofiler-cli)
endif()
add_subdirectory(vmprofiler-cli)
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
option(BUILD_VMDEVIRT "Build the vmdevirt (cmkr) module" OFF)
option(BUILD_VMPROFILER_QT "Build the vmprofiler-qt module" OFF)
if(BUILD_VMDEVIRT)
message(STATUS "Including vmdevirt (cmkr) because BUILD_VMDEVIRT is ON")
add_subdirectory(vmdevirt)
else()
message(STATUS "Skipping vmdevirt (cmkr) because BUILD_VMDEVIRT is OFF")
endif()
if(BUILD_VMPROFILER_QT)
add_subdirectory(vmprofiler-qt)
else()
message(STATUS "Skipping vmprofiler-qt because BUILD_VMPROFILER_QT is OFF")
endif()