-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmake.toml
120 lines (109 loc) · 4.62 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
# Reference: https://build-cpp.github.io/cmkr/cmake-toml
# to build:
# > cmake -B build
# > cmake --build build --config Release
[project]
name = "outrun2006tweaks-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)
# disable unneeded FLAC stuff
set(INSTALL_MANPAGES OFF CACHE BOOL "" FORCE)
set(BUILD_CXXLIBS OFF CACHE BOOL "" FORCE)
set(BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(BUILD_PROGRAMS OFF CACHE BOOL "" FORCE)
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
set(UPNPC_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(UPNPC_BUILD_SAMPLE OFF CACHE BOOL "" FORCE)
set(UPNPC_BUILD_SHARED OFF CACHE BOOL "" FORCE)
set(JSONCPP_STATIC_WINDOWS_RUNTIME OFF CACHE BOOL "" FORCE)
set(JSONCPP_WITH_TESTS OFF CACHE BOOL "" FORCE)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(BUILD_STATIC_LIBS ON CACHE BOOL "" FORCE)
set(BUILD_OBJECT_LIBS ON CACHE BOOL "" FORCE)
set(SDL_TEST_LIBRARY OFF CACHE BOOL "" FORCE)
option(ZYDIS_BUILD_TOOLS "" OFF)
option(ZYDIS_BUILD_EXAMPLES "" OFF)
option(JSONCPP_WITH_TESTS "" OFF)
option(JSONCPP_STATIC_WINDOWS_RUNTIME "" 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", "_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR"]
compile-options = []
[fetch-content]
zydis = { git = "https://github.com/zyantific/zydis", tag = "v4.0.0" }
safetyhook = { git = "https://github.com/cursey/safetyhook", tag = "629558c64009a7291ba6ed5cfb49187086a27a47" }
ogg = { git = "https://github.com/xiph/ogg", tag = "v1.3.5" }
flac = { git = "https://github.com/xiph/flac", tag = "1.4.3" }
miniupnpc = { git = "https://github.com/miniupnp/miniupnp", tag = "miniupnpd_2_3_7", subdir = "miniupnpc" }
jsoncpp = { git = "https://github.com/open-source-parsers/jsoncpp.git", tag = "1.9.6" }
zlib = { git = "https://github.com/madler/zlib", tag = "v1.3.1" }
sdl = { git = "https://github.com/libsdl-org/SDL", tag = "preview-3.1.8" }
[target.outrun2006tweaks]
type = "shared"
sources = ["*.ini", "src/**.cpp", "src/**.c", "src/**.def", "src/Resource.rc",
"external/ModUtils/Patterns.cpp",
"external/xxHash/xxhash.c",
"external/miniz/miniz.c",
"external/imgui/backends/imgui_impl_win32.cpp",
"external/imgui/backends/imgui_impl_dx9.cpp",
"external/imgui/imgui.cpp",
"external/imgui/imgui_demo.cpp",
"external/imgui/imgui_draw.cpp",
"external/imgui/imgui_tables.cpp",
"external/imgui/imgui_widgets.cpp",
"external/IXWebSocket/ixwebsocket/**"
]
headers = ["src/**.hpp", "src/**.h", "external/ModUtils/Patterns.h", "external/ModUtils/MemoryMgr.h", "external/xxHash/xxhash.h", "external/miniz/miniz.h", "external/ini-cpp/ini/ini.h"]
include-directories = ["shared/", "src/", "include/",
"external/ModUtils/",
"external/ini-cpp/ini/",
"external/xxHash/",
"external/miniz/",
"external/imgui/",
"external/IXWebSocket/"
]
compile-options = ["/GS-", "/bigobj", "/EHa", "/MP"]
link-options = ["/DEBUG", "/OPT:REF", "/OPT:ICF"]
compile-features = ["cxx_std_20"]
compile-definitions = ["_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING", "_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR", "DIRECTINPUT_VERSION=0x0800"]
link-libraries = [
"spdlog",
"safetyhook",
"ogg",
"FLAC",
"jsoncpp_static",
"version.lib",
"xinput9_1_0.lib",
"Hid.lib",
"libminiupnpc-static",
"SDL3-static",
"Winmm.lib",
"Setupapi.lib",
"Crypt32.lib"
]
[target.outrun2006tweaks.properties]
OUTPUT_NAME = "dinput8"
SUFFIX = ".dll"
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}"