diff --git a/CMakeLists.txt b/CMakeLists.txt index 9353a51558..b91e996f96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -255,13 +255,6 @@ if (ENABLE_QT) endif() endif() -if (ENABLE_WEB_SERVICE) - add_definitions(-DENABLE_WEB_SERVICE) -endif() -if (CITRA_ENABLE_COMPATIBILITY_REPORTING) - add_definitions(-DCITRA_ENABLE_COMPATIBILITY_REPORTING) -endif() - if (ENABLE_SCRIPTING) add_definitions(-DENABLE_SCRIPTING) endif() diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index 3a61f9aa04..ea275f3d2c 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt @@ -208,6 +208,10 @@ target_link_libraries(citra-qt PRIVATE audio_core common core input_common netwo target_link_libraries(citra-qt PRIVATE Boost::boost glad nihstro-headers Qt5::OpenGL Qt5::Widgets Qt5::Multimedia) target_link_libraries(citra-qt PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) +if (CITRA_ENABLE_COMPATIBILITY_REPORTING) + add_definitions(-DCITRA_ENABLE_COMPATIBILITY_REPORTING) +endif() + if (USE_DISCORD_PRESENCE) target_sources(citra-qt PUBLIC discord_impl.cpp diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 1498ee343f..e99a6ac79d 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -445,6 +445,7 @@ create_target_directory_groups(core) target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core) target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp fmt open_source_archives) if (ENABLE_WEB_SERVICE) + add_definitions(-DENABLE_WEB_SERVICE) target_link_libraries(core PUBLIC json-headers web_service) endif() diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp index 2898961654..c1f3207381 100644 --- a/src/web_service/web_backend.cpp +++ b/src/web_service/web_backend.cpp @@ -13,7 +13,7 @@ namespace WebService { -constexpr char API_VERSION[]{"1"}; +constexpr std::array API_VERSION{'1'}; constexpr u32 HTTP_PORT = 80; constexpr u32 HTTPS_PORT = 443; @@ -70,7 +70,7 @@ Common::WebResult Client::GenericJson(const std::string& method, const std::stri }; } - params.emplace(std::string("api-version"), std::string(API_VERSION)); + params.emplace(std::string("api-version"), std::string(API_VERSION.begin(), API_VERSION.end())); if (method != "GET") { params.emplace(std::string("Content-Type"), std::string("application/json")); };