From c7ed7d94279082600eb75218ebe8b4cc6a3ab0d0 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Fri, 19 Jun 2020 22:17:56 +1000 Subject: [PATCH] Fix compilation when not building with boxcat Fixes compilation when trying to build without boxcat enabled --- src/core/CMakeLists.txt | 4 ++-- src/yuzu/configuration/configure_service.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 47418006b2..cb9ced5c90 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -606,11 +606,11 @@ endif() create_target_directory_groups(core) target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) -target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls Opus::Opus unicorn) +target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls Opus::Opus unicorn zip) if (YUZU_ENABLE_BOXCAT) target_compile_definitions(core PRIVATE -DYUZU_ENABLE_BOXCAT) - target_link_libraries(core PRIVATE httplib nlohmann_json::nlohmann_json zip) + target_link_libraries(core PRIVATE httplib nlohmann_json::nlohmann_json) endif() if (ENABLE_WEB_SERVICE) diff --git a/src/yuzu/configuration/configure_service.cpp b/src/yuzu/configuration/configure_service.cpp index 06566e981b..92a1737b34 100644 --- a/src/yuzu/configuration/configure_service.cpp +++ b/src/yuzu/configuration/configure_service.cpp @@ -68,6 +68,7 @@ void ConfigureService::SetConfiguration() { } std::pair ConfigureService::BCATDownloadEvents() { +#ifdef YUZU_ENABLE_BOXCAT std::optional global; std::map map; const auto res = Service::BCAT::Boxcat::GetStatus(global, map); @@ -106,6 +107,10 @@ std::pair ConfigureService::BCATDownloadEvents() { .arg(FormatEventStatusString(value)); } return {QStringLiteral("Current Boxcat Events"), std::move(out)}; +#else + return {QStringLiteral("Current Boxcat Events"), + tr("There are currently no events on boxcat.")}; +#endif } void ConfigureService::OnBCATImplChanged() {