-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
46 lines (35 loc) · 1.24 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
cmake_minimum_required (VERSION 3.20)
project(ACRoguePatcher C CXX)
set(SRC_DIR "${PROJECT_SOURCE_DIR}/src")
message(STATUS "Downloading injector...")
include(cmake/injector.cmake)
message(STATUS "Downloading hooking...")
include(cmake/hooking.cmake)
message(STATUS "Downloading mINI...")
include(cmake/mINI.cmake)
file(GLOB_RECURSE SRC_MAIN
"${SRC_DIR}/**.hpp"
"${SRC_DIR}/**.cpp"
"${SRC_DIR}/**.h"
"${SRC_DIR}/**.c"
"${SRC_DIR}/**.def"
)
add_library(ACRoguePatcher MODULE "${SRC_MAIN}")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(TARGET ACRoguePatcher PROPERTY CXX_STANDARD 23)
set_property(TARGET ACRoguePatcher PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ACRoguePatcher PROPERTY CXX_EXTENSIONS OFF)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(ACRoguePatcher PRIVATE "-masm=intel")
endif()
source_group(TREE ${SRC_DIR} PREFIX "src" FILES ${SRC_MAIN})
target_include_directories(ACRoguePatcher PRIVATE
"${SRC_DIR}"
"${injector_SOURCE_DIR}/safetyhook"
"${injector_SOURCE_DIR}/include"
"${hooking_SOURCE_DIR}"
"${mini_SOURCE_DIR}/src"
)
target_link_libraries(ACRoguePatcher PRIVATE injector hooking)
# Generate a JSON compilation database
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)