-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcmake.toml
111 lines (100 loc) · 3.15 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
# Reference: https://build-cpp.github.io/cmkr/cmake-toml
[project]
name = "cs2-plugin"
cmake-after="""
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(protobuf_USE_EXTERNAL_GTEST OFF)
set(protobuf_USE_EXTERNAL_GTEST OFF)
set(protobuf_BUILD_TESTS OFF)
set(protobuf_BUILD_SHARED_LIBS)
set(EXPECTED_BUILD_TESTS OFF)
add_compile_definitions(_ITERATOR_DEBUG_LEVEL=0)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0)
endif()
if(UNIX AND NOT APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
endif()
"""
[fetch-content.spdlog]
git = "https://github.com/gabime/spdlog"
tag = "v1.14.1"
shallow = true
[fetch-content.protobuf]
git = "https://github.com/noahbkim/cs2s-protobuf"
tag = "0a02547b680a319e73fd04d9efff88d901c3eaa8"
[fetch-content.Zydis]
git = "https://github.com/zyantific/zydis.git"
tag = "v4.0.0"
cmake-before = """
option(ZYDIS_BUILD_EXAMPLES "" OFF)
option(ZYDIS_BUILD_TOOLS "" OFF)
option(ZYDIS_BUILD_DOXYGEN "" OFF)
"""
[fetch-content.expected]
git = "https://github.com/TartanLlama/expected"
tag = "3f0ca7b19253129700a073abfa6d8638d9f7c80c"
[target.mmsdk]
type = "interface"
include-directories= [
"metamod-source/core",
"metamod-source/core/sourcehook",
]
compile-definitions = ["META_IS_SOURCE2"]
alias = "mmsdk::mmsdk"
[target.hl2sdk]
type = "interface"
include-directories = [
"hl2sdk",
"hl2sdk/thirdparty/protobuf-3.21.8/src",
"hl2sdk/common",
"hl2sdk/game/shared",
"hl2sdk/game/server",
"hl2sdk/public",
"hl2sdk/public/schemasystem",
"hl2sdk/public/engine",
"hl2sdk/public/mathlib",
"hl2sdk/public/tier0",
"hl2sdk/public/tier1",
"hl2sdk/public/entity2",
"hl2sdk/public/game/server",
]
compile-definitions = ["PLATFORM_64BITS"]
alias = "hl2sdk::hl2sdk"
[target.plugin]
type = "shared"
sources = [
"hl2sdk/tier1/convar.cpp",
"hl2sdk/tier1/generichash.cpp",
"hl2sdk/tier1/keyvalues3.cpp",
"hl2sdk/entity2/entityidentity.cpp",
"hl2sdk/entity2/entitysystem.cpp",
"hl2sdk/entity2/entitykeyvalues.cpp",
"src/**.cpp",
"src/**.cc",
"src/**.hpp",
"src/**.h",
]
compile-features = ["cxx_std_20"]
windows.compile-definitions = ["WIN32", "WINDOWS"]
linux.compile-definitions = ["LINUX", "POSIX", "_LINUX", "PLATFORM_64BITS"]
msvc.compile-definitions = ["COMPILER_MSVC64", "COMPILER_MSVC", "NOMINMAX", "MSVC"]
gcc.compile-definitions = ["GCC", "COMPILER_GCC", "_GLIBCXX_USE_CXX11_ABI=0"]
clang.compile-definitions = ["CLANG", "COMPILER_CLANG"]
msvc.private-compile-options = ["/MP", "/permissive-", "/utf-8", "/MT$<$<CONFIG:Debug>:d>"]
clang.private-compile-options = ["-std=libc++", "-fPIC"]
link-libraries = ["hl2sdk::hl2sdk", "mmsdk::mmsdk", "spdlog::spdlog", "libprotobuf", "Zydis", "tl::expected",]
windows.link-libraries = [
"hl2sdk/lib/public/win64/interfaces.lib",
# "hl2sdk/lib/public/win64/2015/libprotobuf.lib",
"hl2sdk/lib/public/win64/tier0.lib",
"hl2sdk/lib/public/win64/tier1.lib",
"hl2sdk/lib/public/win64/mathlib.lib",
]
linux.link-libraries = [
"hl2sdk/lib/linux64/interfaces.a",
"hl2sdk/lib/linux64/libtier0.so",
"hl2sdk/lib/linux64/mathlib.a",
"hl2sdk/lib/linux64/tier1.a",
]