-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
28 lines (20 loc) · 915 Bytes
/
CMakeLists.txt
File metadata and controls
28 lines (20 loc) · 915 Bytes
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
cmake_minimum_required(VERSION 3.10)
# Set the project name
project(ScriptRedirect)
# Specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Add MinHook sources as a static library
file(GLOB MINHOOK_SOURCES "3rdParty/MinHook/src/*.c" "3rdParty/MinHook/src/*.h")
add_library(MinHook STATIC ${MINHOOK_SOURCES})
target_include_directories(MinHook PUBLIC 3rdParty/MinHook/include)
# Add the source files for ScriptRedirect
file(GLOB SOURCES "dllmain.*" "torque3d/*.cpp" "torque3d/*.h")
# Add the executable and specify it as a shared library
add_library(ScriptRedirect SHARED ${SOURCES})
# Set the output name to have .asi extension
set_target_properties(ScriptRedirect PROPERTIES SUFFIX ".asi")
# Include MinHook headers
target_include_directories(ScriptRedirect PRIVATE 3rdParty/MinHook/include)
# Link MinHook library
target_link_libraries(ScriptRedirect PRIVATE MinHook)