forked from martonp96/ClosedIV
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (40 loc) · 1.57 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
49
50
51
52
cmake_minimum_required(VERSION 3.13)
project(closediv)
file(GLOB_RECURSE PROJECT_SOURCE_FILES "src/*.h" "src/*.cpp")
macro(GroupSources curdir groupindex)
file(GLOB children RELATIVE ${curdir} ${curdir}/*)
foreach(child ${children})
if(IS_DIRECTORY ${curdir}/${child})
GroupSources(${curdir}/${child} ${groupindex}/${child})
else()
string(REPLACE "/" "\\" groupname ${groupindex})
source_group(${groupname} FILES ${curdir}/${child})
endif()
endforeach()
endmacro()
GroupSources(${CMAKE_SOURCE_DIR}/src "Source Files")
add_subdirectory("src/vendor/minhook")
add_library(closediv SHARED ${PROJECT_SOURCE_FILES})
add_dependencies(closediv minhook)
include_directories(
./src
)
set_target_properties(closediv PROPERTIES
OUTPUT_NAME "ClosedIV"
SUFFIX ".asi"
CXX_STANDARD 20
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/BIN/"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/BIN/Debug/"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/BIN/Release/"
)
set_target_properties( minhook
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/LIB"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/LIB"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/LIB"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/LIB"
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/LIB"
)
set(CMAKE_CONFIGURATION_TYPES Debug Release)
target_link_directories(closediv PUBLIC "${CMAKE_BINARY_DIR}/LIB")
target_link_libraries(closediv version.lib debug minhook.x64d.lib optimized minhook.x64.lib)