-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcmake.toml
148 lines (129 loc) · 4.23 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# Reference: https://build-cpp.github.io/cmkr/cmake-toml
# to build:
# > cmake -B build
# > cmake --build build --config Release
[project]
name = "automatamp-proj"
cmake-after = """
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
set(ASMJIT_STATIC ON CACHE BOOL "" FORCE)
if ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MT")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MT")
# Statically compile runtime
string(REGEX REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "/MD" "/MT" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string(REGEX REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REGEX REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
message(NOTICE "Building in Release mode")
endif()
"""
[target.spdlog]
type = "static"
sources = ["dependencies/submodules/spdlog/src/*.cpp"]
include-directories = ["dependencies/submodules/spdlog/include"]
compile-definitions = ["SPDLOG_COMPILED_LIB"]
[target.glm_static]
type = "static"
sources = ["dependencies/submodules/glm/glm/**.cpp"]
include-directories = ["dependencies/submodules/glm"]
[target.enet]
type = "static"
sources = ["dependencies/submodules/enet/**.c"]
include-directories = ["dependencies/submodules/enet/include"]
link-libraries = [
"ws2_32",
"winmm"
]
[fetch-content.asmjit]
git = "https://github.com/asmjit/asmjit.git"
tag = "2a706fd2ba355808cada31ac1eed8ce28caa6b37"
[fetch-content.bddisasm]
git = "https://github.com/bitdefender/bddisasm"
tag = "v1.34.10"
[fetch-content.safetyhook]
git = "https://github.com/cursey/safetyhook"
tag = "e175896c67abf49360acafe8879205a138fe6b2b"
[fetch-content.flatbuffers]
git = "https://github.com/google/flatbuffers"
tag = "v2.0.0"
[target.imgui]
type = "static"
sources = ["dependencies/submodules/imgui/*.cpp"]
include-directories = ["dependencies/submodules/imgui", "src/automata-imgui"]
compile-definitions = [
"IMGUI_USER_CONFIG=\"${CMAKE_SOURCE_DIR}/src/automata-imgui/automata_imconfig.hpp\"",
]
[target.utility]
type = "static"
sources = ["shared/utility/**.cpp", "shared/utility/**.c"]
headers = ["shared/utility/**.hpp", "shared/utility/**.h"]
compile-options = ["/EHa", "/MP"]
compile-features = ["cxx_std_20"]
link-libraries = [
"spdlog",
"minhook"
]
[target.minhook]
type = "static"
sources = ["dependencies/submodules/minhook/src/**.c"]
include-directories = [
"dependencies/submodules/minhook/include",
"dependencies/submodules/minhook/src/hde",
]
[target.mruby]
type = "static"
sources = [
"dependencies/submodules/mruby/src/**.c",
"dependencies/submodules/mruby/src/**.cpp",
"dependencies/submodules/mruby/mrblib/**.c",
]
include-directories = [
"dependencies/submodules/mruby/include"
]
compile-definitions = ["DISABLE_GEMS"]
[target.sdk]
type = "static"
sources = ["shared/sdk/**.cpp", "shared/sdk/**.c"]
headers = ["shared/sdk/**.hpp", "shared/sdk/**.h"]
include-directories = ["shared/", "include/"]
compile-options = ["/EHa", "/MP"]
compile-features = ["cxx_std_20"]
link-libraries = [
"glm_static",
"spdlog",
"mruby"
]
private-link-libraries = [
"utility"
]
[target.automatamp]
type = "shared"
sources = ["src/**.cpp", "src/**.c"]
headers = ["src/**.hpp", "src/**.h"]
include-directories = ["shared/", "src/", "include/", "dependencies/enetpp/include", "dependencies/nlohmann"]
compile-options = ["/GS-", "/bigobj", "/EHa", "/MP"]
compile-features = ["cxx_std_20"]
compile-definitions = ["_WINSOCKAPI_"]
link-libraries = [
"imgui",
"sdk",
"utility",
"enet",
"shlwapi",
"d3d11",
"flatbuffers",
"safetyhook",
"asmjit",
"winhttp"
]
[target.automatamp.properties]
OUTPUT_NAME = "dinput8"
RUNTIME_OUTPUT_DIRECTORY_RELEASE = "${CMAKE_BINARY_DIR}/bin/${CMKR_TARGET}"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO = "${CMAKE_BINARY_DIR}/bin/${CMKR_TARGET}"
LIBRARY_OUTPUT_DIRECTORY_RELEASE = "${CMAKE_BINARY_DIR}/lib/${CMKR_TARGET}"
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO = "${CMAKE_BINARY_DIR}/lib/${CMKR_TARGET}"
ARCHIVE_OUTPUT_DIRECTORY_RELEASE = "${CMAKE_BINARY_DIR}/lib/${CMKR_TARGET}"
ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO = "${CMAKE_BINARY_DIR}/lib/${CMKR_TARGET}"