From 6d0cd5b00e80bdea60d7e0e6caed81f7cd5fbd40 Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Mon, 7 Aug 2023 03:12:49 -0700 Subject: [PATCH] build: Expose ENABLE_SCRIPTING and ENABLE_WEB_SERVICE flags as public. (#6872) --- externals/CMakeLists.txt | 1 + src/citra_qt/CMakeLists.txt | 4 ---- src/core/CMakeLists.txt | 6 +----- src/dedicated_room/CMakeLists.txt | 1 - src/network/CMakeLists.txt | 4 ---- src/web_service/CMakeLists.txt | 1 + 6 files changed, 3 insertions(+), 14 deletions(-) diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 38038af1d..17f0764a1 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -201,6 +201,7 @@ target_link_libraries(httplib INTERFACE ${OPENSSL_LIBRARIES}) if(ANDROID) add_subdirectory(android-ifaddrs) + target_link_libraries(httplib INTERFACE ifaddrs) endif() # cpp-jwt diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index ecb9448c1..dfc45e0af 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt @@ -341,10 +341,6 @@ if (USE_DISCORD_PRESENCE) target_compile_definitions(citra-qt PRIVATE -DUSE_DISCORD_PRESENCE) endif() -if (ENABLE_WEB_SERVICE) - target_compile_definitions(citra-qt PRIVATE -DENABLE_WEB_SERVICE) -endif() - if(UNIX AND NOT APPLE) install(TARGETS citra-qt RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") endif() diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 5ac61ce23..ee2552a91 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -480,15 +480,11 @@ target_link_libraries(citra_core PUBLIC dds-ktx PRIVATE cryptopp fmt::fmt lodepn set_target_properties(citra_core PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${ENABLE_LTO}) if (ENABLE_WEB_SERVICE) - target_compile_definitions(citra_core PRIVATE -DENABLE_WEB_SERVICE) target_link_libraries(citra_core PRIVATE web_service) - if (ANDROID) - target_link_libraries(citra_core PRIVATE ifaddrs) - endif() endif() if (ENABLE_SCRIPTING) - target_compile_definitions(citra_core PRIVATE -DENABLE_SCRIPTING) + target_compile_definitions(citra_core PUBLIC -DENABLE_SCRIPTING) target_sources(citra_core PRIVATE rpc/packet.cpp rpc/packet.h diff --git a/src/dedicated_room/CMakeLists.txt b/src/dedicated_room/CMakeLists.txt index 01dc51a6c..8209f47eb 100644 --- a/src/dedicated_room/CMakeLists.txt +++ b/src/dedicated_room/CMakeLists.txt @@ -10,7 +10,6 @@ create_target_directory_groups(citra-room) target_link_libraries(citra-room PRIVATE citra_common network) if (ENABLE_WEB_SERVICE) - target_compile_definitions(citra-room PRIVATE -DENABLE_WEB_SERVICE) target_link_libraries(citra-room PRIVATE web_service) endif() diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt index 48a449d40..f429627fa 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -19,11 +19,7 @@ add_library(network STATIC create_target_directory_groups(network) if (ENABLE_WEB_SERVICE) - target_compile_definitions(network PRIVATE -DENABLE_WEB_SERVICE) target_link_libraries(network PRIVATE web_service) - if (ANDROID) - target_link_libraries(network PRIVATE ifaddrs) - endif() endif() target_link_libraries(network PRIVATE citra_common enet Boost::serialization httplib) diff --git a/src/web_service/CMakeLists.txt b/src/web_service/CMakeLists.txt index 2a97e2b1c..653985229 100644 --- a/src/web_service/CMakeLists.txt +++ b/src/web_service/CMakeLists.txt @@ -16,6 +16,7 @@ add_library(web_service STATIC create_target_directory_groups(web_service) +target_compile_definitions(web_service PUBLIC -DENABLE_WEB_SERVICE) target_link_libraries(web_service PRIVATE citra_common network json-headers httplib cpp-jwt) target_link_libraries(web_service PUBLIC ${OPENSSL_LIBS}) set_target_properties(web_service PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${ENABLE_LTO})