compile fixes and default client_location (#809)

* support for gcc9 on ubuntu 18.04
This is needed to make filesystem work

* fix default for client location
This commit is contained in:
Aaron Kimbrell 2022-11-02 22:05:52 -05:00 committed by GitHub
parent 4a6f3e44ee
commit 353c328485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -58,7 +58,7 @@ if(UNIX)
if(APPLE) if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17 -O2 -Wuninitialized -D_GLIBCXX_USE_CXX11_ABI=0 -D_GLIBCXX_USE_CXX17_ABI=0 -fPIC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17 -O2 -Wuninitialized -D_GLIBCXX_USE_CXX11_ABI=0 -D_GLIBCXX_USE_CXX17_ABI=0 -fPIC")
else() else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17 -O2 -Wuninitialized -D_GLIBCXX_USE_CXX11_ABI=0 -D_GLIBCXX_USE_CXX17_ABI=0 -static-libgcc -fPIC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17 -O2 -Wuninitialized -D_GLIBCXX_USE_CXX11_ABI=0 -D_GLIBCXX_USE_CXX17_ABI=0 -static-libgcc -fPIC -lstdc++fs")
endif() endif()
if (__dynamic AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if (__dynamic AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")

View File

@ -55,7 +55,7 @@ int main(int argc, char** argv) {
try { try {
std::string client_path = config.GetValue("client_location"); std::string client_path = config.GetValue("client_location");
if (client_path.empty()) client_path = "./res"; if (client_path.empty()) client_path = "./res";
Game::assetManager = new AssetManager(config.GetValue("client_location")); Game::assetManager = new AssetManager(client_path);
} catch (std::runtime_error& ex) { } catch (std::runtime_error& ex) {
Game::logger->Log("ChatServer", "Got an error while setting up assets: %s", ex.what()); Game::logger->Log("ChatServer", "Got an error while setting up assets: %s", ex.what());

View File

@ -104,7 +104,7 @@ int main(int argc, char** argv) {
try { try {
std::string client_path = config.GetValue("client_location"); std::string client_path = config.GetValue("client_location");
if (client_path.empty()) client_path = "./res"; if (client_path.empty()) client_path = "./res";
Game::assetManager = new AssetManager(config.GetValue("client_location")); Game::assetManager = new AssetManager(client_path);
} catch (std::runtime_error& ex) { } catch (std::runtime_error& ex) {
Game::logger->Log("MasterServer", "Got an error while setting up assets: %s", ex.what()); Game::logger->Log("MasterServer", "Got an error while setting up assets: %s", ex.what());

View File

@ -148,7 +148,7 @@ int main(int argc, char** argv) {
try { try {
std::string client_path = config.GetValue("client_location"); std::string client_path = config.GetValue("client_location");
if (client_path.empty()) client_path = "./res"; if (client_path.empty()) client_path = "./res";
Game::assetManager = new AssetManager(config.GetValue("client_location")); Game::assetManager = new AssetManager(client_path);
} catch (std::runtime_error& ex) { } catch (std::runtime_error& ex) {
Game::logger->Log("WorldServer", "Got an error while setting up assets: %s", ex.what()); Game::logger->Log("WorldServer", "Got an error while setting up assets: %s", ex.what());