build: Expose ENABLE_SCRIPTING and ENABLE_WEB_SERVICE flags as public. (#6872)

This commit is contained in:
Steveice10 2023-08-07 03:12:49 -07:00 committed by GitHub
parent 5b52849f90
commit 6d0cd5b00e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 3 additions and 14 deletions

View file

@ -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

View file

@ -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()

View file

@ -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

View file

@ -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()

View file

@ -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)

View file

@ -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})