-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathcmake.toml
64 lines (54 loc) · 2.41 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
# Reference: https://build-cpp.github.io/cmkr/cmake-toml
# to build:
# > cmake -B build
# > cmake --build build --config Release
[project]
name = "dlsstweaks-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)
option(ZYDIS_BUILD_TOOLS "" OFF)
option(ZYDIS_BUILD_EXAMPLES "" OFF)
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 = ["external/spdlog/src/*.cpp"]
include-directories = ["external/spdlog/include"]
compile-definitions = ["SPDLOG_COMPILED_LIB"]
[fetch-content]
zydis = { git = "https://github.com/zyantific/zydis", tag = "v4.0.0" }
safetyhook = { git = "https://github.com/cursey/safetyhook", tag = "2c134ea8f642d184f422ad5069145147ac085113" }
[target.dlsstweaks]
type = "shared"
sources = ["src/**.cpp", "src/**.c", "src/**.def", "src/Resource.rc", "external/ModUtils/Patterns.cpp"]
headers = ["src/**.hpp", "src/**.h", "external/ModUtils/Patterns.h"]
include-directories = ["shared/", "src/", "include/", "external/ModUtils/", "external/ini-cpp/ini/", "external/DLSS/include/"]
compile-options = ["/GS-", "/bigobj", "/EHa", "/MP"]
link-options = ["/DEBUG", "/OPT:REF", "/OPT:ICF"]
compile-features = ["cxx_std_20"]
compile-definitions = [""]
link-libraries = [
"spdlog",
"safetyhook",
"version.lib"
]
[target.dlsstweaks.properties]
OUTPUT_NAME = "nvngx"
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}"