mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-10-25 13:30:43 +00:00
Move toml11 out of vcpkg since the toml11 authors broke it (#352)
This commit is contained in:
7 files changed
+9
-7
No files matched your search
@@ -4,3 +4,6 @@
|
|||||||
[submodule "vcpkg"]
|
[submodule "vcpkg"]
|
||||||
path = vcpkg
|
path = vcpkg
|
||||||
url = https://github.com/Microsoft/vcpkg.git
|
url = https://github.com/Microsoft/vcpkg.git
|
||||||
|
[submodule "deps/toml11"]
|
||||||
|
path = deps/toml11
|
||||||
|
url = https://github.com/ToruNiina/toml11
|
||||||
+1
-1
@@ -116,7 +116,7 @@ find_package(httplib CONFIG REQUIRED)
|
|||||||
find_package(libzip CONFIG REQUIRED)
|
find_package(libzip CONFIG REQUIRED)
|
||||||
find_package(RapidJSON CONFIG REQUIRED)
|
find_package(RapidJSON CONFIG REQUIRED)
|
||||||
find_package(sol2 CONFIG REQUIRED)
|
find_package(sol2 CONFIG REQUIRED)
|
||||||
find_package(toml11 CONFIG REQUIRED)
|
add_subdirectory("deps/toml11")
|
||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ function(set_project_warnings project_name)
|
|||||||
-Werror=missing-declarations
|
-Werror=missing-declarations
|
||||||
-Werror=missing-field-initializers
|
-Werror=missing-field-initializers
|
||||||
-Werror=ctor-dtor-privacy
|
-Werror=ctor-dtor-privacy
|
||||||
-Werror=switch-enum
|
|
||||||
-Wswitch-default
|
-Wswitch-default
|
||||||
-Werror=unused-result
|
-Werror=unused-result
|
||||||
-Werror=implicit-fallthrough
|
-Werror=implicit-fallthrough
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ find_package(Git)
|
|||||||
if(${PROJECT_NAME}_CHECKOUT_GIT_SUBMODULES)
|
if(${PROJECT_NAME}_CHECKOUT_GIT_SUBMODULES)
|
||||||
if(Git_FOUND)
|
if(Git_FOUND)
|
||||||
message(STATUS "Git found, submodule update and init")
|
message(STATUS "Git found, submodule update and init")
|
||||||
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
|
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
||||||
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
|
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
|
||||||
|
|||||||
+1
Submodule deps/toml11 added at f33ca743fb.
+2
-2
@@ -158,7 +158,7 @@ void TConfig::FlushToFile() {
|
|||||||
Ss << "# This is the BeamMP-Server config file.\n"
|
Ss << "# This is the BeamMP-Server config file.\n"
|
||||||
"# Help & Documentation: `https://docs.beammp.com/server/server-maintenance/`\n"
|
"# Help & Documentation: `https://docs.beammp.com/server/server-maintenance/`\n"
|
||||||
"# IMPORTANT: Fill in the AuthKey with the key you got from `https://keymaster.beammp.com/` on the left under \"Keys\"\n"
|
"# IMPORTANT: Fill in the AuthKey with the key you got from `https://keymaster.beammp.com/` on the left under \"Keys\"\n"
|
||||||
<< data;
|
<< toml::format(data);
|
||||||
auto File = std::fopen(mConfigFileName.c_str(), "w+");
|
auto File = std::fopen(mConfigFileName.c_str(), "w+");
|
||||||
if (!File) {
|
if (!File) {
|
||||||
beammp_error("Failed to create/write to config file: " + GetPlatformAgnosticErrorString());
|
beammp_error("Failed to create/write to config file: " + GetPlatformAgnosticErrorString());
|
||||||
@@ -240,7 +240,7 @@ void TConfig::ParseFromFile(std::string_view name) {
|
|||||||
try {
|
try {
|
||||||
toml::value data {};
|
toml::value data {};
|
||||||
if (!mDisableConfig) {
|
if (!mDisableConfig) {
|
||||||
data = toml::parse<toml::preserve_comments>(name.data());
|
data = toml::parse(name.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
// GENERAL
|
// GENERAL
|
||||||
|
|||||||
+1
-2
@@ -13,7 +13,6 @@
|
|||||||
"nlohmann-json",
|
"nlohmann-json",
|
||||||
"openssl",
|
"openssl",
|
||||||
"rapidjson",
|
"rapidjson",
|
||||||
"sol2",
|
"sol2"
|
||||||
"toml11"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user