-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
61 lines (52 loc) · 2.33 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
53
54
55
56
57
58
59
60
61
cmake_minimum_required(VERSION 3.17)
project(wkTerrainSync
VERSION "1.2.6.1"
DESCRIPTION "wkTerrain with automatic data synchronization and extra features"
)
set(CMAKE_CXX_STANDARD 23)
add_subdirectory(lib/hacklib-patternscanner)
set(POLYHOOK_BUILD_STATIC_RUNTIME)
add_subdirectory(lib/PolyHook_2_0)
include_directories(include include/nlohmann_json_release lib/hacklib-patternscanner lib/PolyHook_2_0 lib/PolyHook_2_0/capstone/include)
link_directories(lib)
set(PRE_CONFIGURE_FILE "cmake/git.cc.in")
set(POST_CONFIGURE_FILE "${CMAKE_CURRENT_BINARY_DIR}/gen/git.cc")
include(cmake/git_watcher.cmake)
add_library(git STATIC ${POST_CONFIGURE_FILE})
target_include_directories(git PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} cmake)
add_dependencies(git check_git)
configure_file(cmake/git.h ${CMAKE_CURRENT_BINARY_DIR}/gen/git.h)
configure_file(resource.rc.in resource.rc)
configure_file(cmake/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/gen/version.h)
add_definitions(-DLIBRARY_EXPORTS)
add_library(${PROJECT_NAME} SHARED
src/dllmain.cpp
src/Config.cpp src/Config.h
src/WaLibc.cpp src/WaLibc.h
src/DevConsole.cpp src/DevConsole.h
src/Hooks.cpp src/Hooks.h
src/TerrainList.cpp src/TerrainList.h
src/Packets.cpp src/Packets.h
src/LobbyChat.cpp src/LobbyChat.h
src/Protocol.cpp src/Protocol.h
src/Replay.cpp src/Replay.h
src/Frontend.cpp src/Frontend.h
src/BitmapImage.cpp src/BitmapImage.h
src/W2App.cpp src/W2App.h
src/Sprites.cpp src/Sprites.h
src/Utils.cpp src/Utils.h
src/MapGenerator.cpp src/MapGenerator.h
src/FrontendDialogs.cpp src/FrontendDialogs.h
src/Missions.cpp src/Missions.h
src/Scheme.cpp src/Scheme.h
src/Exports.cpp src/Exports.h
src/Debugf.h
src/Water.cpp src/Water.h
src/Threads.cpp src/Threads.h
src/MissionSequences.cpp src/MissionSequences.h
${CMAKE_CURRENT_BINARY_DIR}/resource.rc
)
add_dependencies(${PROJECT_NAME} PolyHook_2)
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/gen)
set_property(TARGET ${PROJECT_NAME} hacklib-patternscanner git PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
target_link_libraries(${PROJECT_NAME} hacklib-patternscanner PolyHook_2 version git libz-static)