This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
/
cmake.toml
83 lines (74 loc) · 2.69 KB
/
cmake.toml
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
77
78
79
80
81
82
83
# Reference: https://build-cpp.github.io/cmkr/cmake-toml
[project]
name = "Kanan"
cmake-after = """
set(VCPKG_TARGET_TRIPLET x64-windows-static)
"""
[vcpkg]
version = "2023.10.19"
packages = ["bddisasm", "imgui[freetype,dx9-binding,win32-binding]", "nlohmann-json", "stb"]
[find-package]
bddisasm = { config = true, required = true }
imgui = { config = true, required = true }
nlohmann_json = { config = true, required = true }
[fetch-content.safetyhook]
git = "https://github.com/cursey/safetyhook.git"
tag = "ff5eb17ece60397463acae3da02509e305496407"
cmake-after = """
set_target_properties(safetyhook PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
"""
[target.Core]
type = "static"
sources = ["Core/**.cpp"]
headers = ["Core/**.hpp"]
include-directories = ["Core/"]
compile-features = ["cxx_std_20"]
compile-definitions = ["UNICODE"]
link-libraries = ["safetyhook::safetyhook"]
properties.MSVC_RUNTIME_LIBRARY = "MultiThreaded$<$<CONFIG:Debug>:Debug>"
[target.Kanan]
type = "shared"
sources = ["Kanan/**.cpp"]
headers = ["Kanan/**.hpp", "Kanan/**.h"]
include-directories = ["Kanan/"]
compile-definitions = ["IMGUI_DISABLE_INCLUDE_IMCONFIG_H"]
link-libraries = ["Core", "imgui::imgui", "nlohmann_json::nlohmann_json", "ws2_32"]
properties.MSVC_RUNTIME_LIBRARY = "MultiThreaded$<$<CONFIG:Debug>:Debug>"
cmake-after = """
# Copy Kanan/Patches.json to the output directory.
add_custom_command(TARGET Kanan POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/Kanan/Patches.json
$<TARGET_FILE_DIR:Kanan>
)
"""
[target.Loader]
type = "executable"
sources = ["Loader/Main.cpp"]
link-libraries = ["Core"]
link-options = ["/MANIFESTUAC:level='requireAdministrator'"]
properties.MSVC_RUNTIME_LIBRARY = "MultiThreaded$<$<CONFIG:Debug>:Debug>"
cmake-after = """
# Copy Loader/Loader.txt to the output directory
add_custom_command(TARGET Loader POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/Loader/Loader.txt
$<TARGET_FILE_DIR:Loader>
)
"""
[target.Launcher]
type = "executable"
sources = ["Launcher/**.cpp"]
headers = ["Launcher/**.hpp"]
include-directories = ["Kanan/"] # For FontData.hpp
compile-definitions = ["IMGUI_DISABLE_INCLUDE_IMCONFIG_H"]
link-libraries = ["Core", "imgui::imgui", "nlohmann_json::nlohmann_json", "Bcrypt", "Crypt32", "Winhttp", "Rpcrt4", "D3d9", "Wbemuuid"]
link-options = ["/MANIFESTUAC:level='requireAdministrator'"]
properties.MSVC_RUNTIME_LIBRARY = "MultiThreaded$<$<CONFIG:Debug>:Debug>"
properties.WIN32_EXECUTABLE = true
[[install]]
targets = ["Kanan", "Loader", "Launcher"]
destination = "bin"
[[install]]
files = ["Loader/Loader.txt", "Kanan/Patches.json"]
destination = "bin"