-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists_old.txt
76 lines (62 loc) · 1.97 KB
/
CMakeLists_old.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
cmake_minimum_required(VERSION 3.13)
project(ModLoader VERSION 0.1.0)
# Global Settings
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_STANDARD 99)
set(MODLOADER_BEDROCK_PDB "${PROJECT_SOURCE_DIR}/symbols/bedrock_server.pdb" CACHE FILEPATH "Please specify the path to your bedrock_server.pdb file")
#
# SymExtract Configuration
#
#
# Target Declarations
#
add_executable(SymExtract)
add_library(ModLoader SHARED)
if (WIN32)
add_executable(PreLoader)
endif ()
target_include_directories(ModLoader PUBLIC include)
target_include_directories(SymExtract PUBLIC include)
#
# External Libraries
#
set(JSON_BuildTests OFF CACHE INTERNAL "")
add_subdirectory(extern/funchook)
add_subdirectory(extern/json)
add_subdirectory(extern/cxxopts)
target_link_libraries(ModLoader PRIVATE funchook-static)
target_link_libraries(SymExtract PRIVATE nlohmann_json::nlohmann_json)
target_link_libraries(SymExtract PRIVATE cxxopts)
#
# Source Tree
#
add_subdirectory(include/Minecraft)
add_subdirectory(include/ModLoader)
add_subdirectory(include/SymExtract)
add_subdirectory(src/ModLoader)
add_subdirectory(src/SymExtract)
if (WIN32)
add_subdirectory(src/Preloader)
endif ()
#
# Generation
#
if (WIN32)
file(MAKE_DIRECTORY ${PROJECT_SOURCE_DIR}/symbols/extracted)
#add_custom_command(
# OUTPUT ${PROJECT_SOURCE_DIR}/symbols/SymExtract/Symbols.h ${PROJECT_SOURCE_DIR}/symbols/SymExtract/Symbols.cpp
# COMMAND SymExtract ${PROJECT_SOURCE_DIR}/symbols/symbolnames_win32.json ${MODLOADER_BEDROCK_PDB} ${PROJECT_SOURCE_DIR}/symbols/SymExtract/Symbols
# DEPENDS SymExtract
#)
#target_sources(ModLoader PRIVATE ${PROJECT_SOURCE_DIR}/symbols/SymExtract/Symbols.h ${PROJECT_SOURCE_DIR}/symbols/SymExtract/Symbols.cpp)
target_include_directories(ModLoader PRIVATE ${PROJECT_SOURCE_DIR}/symbols)
endif ()
#
# Installation
#
install(TARGETS ModLoader EXPORT ModLoaderTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)