2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

externals: Move LibreSSL linking to httplib.

Neither core nor web_services use OpenSSL nor LibreSSL.
However they need to link them as it's a requirement of httplib.
So let's declare this within httplib instead of core and web_services.
This commit is contained in:
Markus Wick 2020-04-16 16:46:33 +02:00
parent 94c2c828a5
commit fedf750e1b
3 changed files with 9 additions and 12 deletions

View file

@ -86,7 +86,10 @@ if (ENABLE_WEB_SERVICE)
set(LIBRESSL_SKIP_INSTALL ON CACHE BOOL "") set(LIBRESSL_SKIP_INSTALL ON CACHE BOOL "")
add_subdirectory(libressl EXCLUDE_FROM_ALL) add_subdirectory(libressl EXCLUDE_FROM_ALL)
target_include_directories(ssl INTERFACE ./libressl/include) target_include_directories(ssl INTERFACE ./libressl/include)
target_compile_definitions(ssl PRIVATE -DHAVE_INET_NTOP) target_compile_definitions(ssl PRIVATE -DHAVE_INET_NTOP)
get_directory_property(OPENSSL_LIBRARIES
DIRECTORY libressl
DEFINITION OPENSSL_LIBS)
# lurlparser # lurlparser
add_subdirectory(lurlparser EXCLUDE_FROM_ALL) add_subdirectory(lurlparser EXCLUDE_FROM_ALL)
@ -94,6 +97,8 @@ if (ENABLE_WEB_SERVICE)
# httplib # httplib
add_library(httplib INTERFACE) add_library(httplib INTERFACE)
target_include_directories(httplib INTERFACE ./httplib) target_include_directories(httplib INTERFACE ./httplib)
target_compile_definitions(httplib INTERFACE -DCPPHTTPLIB_OPENSSL_SUPPORT)
target_link_libraries(httplib INTERFACE ${OPENSSL_LIBRARIES})
# JSON # JSON
add_library(json-headers INTERFACE) add_library(json-headers INTERFACE)

View file

@ -591,11 +591,8 @@ target_link_libraries(core PUBLIC common PRIVATE audio_core video_core)
target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt json-headers mbedtls opus unicorn) target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt json-headers mbedtls opus unicorn)
if (YUZU_ENABLE_BOXCAT) if (YUZU_ENABLE_BOXCAT)
get_directory_property(OPENSSL_LIBS target_compile_definitions(core PRIVATE -DYUZU_ENABLE_BOXCAT)
DIRECTORY ${PROJECT_SOURCE_DIR}/externals/libressl target_link_libraries(core PRIVATE httplib json-headers zip)
DEFINITION OPENSSL_LIBS)
target_compile_definitions(core PRIVATE -DCPPHTTPLIB_OPENSSL_SUPPORT -DYUZU_ENABLE_BOXCAT)
target_link_libraries(core PRIVATE httplib json-headers ${OPENSSL_LIBS} zip)
endif() endif()
if (ENABLE_WEB_SERVICE) if (ENABLE_WEB_SERVICE)

View file

@ -8,9 +8,4 @@ add_library(web_service STATIC
) )
create_target_directory_groups(web_service) create_target_directory_groups(web_service)
target_link_libraries(web_service PRIVATE common json-headers httplib lurlparser)
get_directory_property(OPENSSL_LIBS
DIRECTORY ${PROJECT_SOURCE_DIR}/externals/libressl
DEFINITION OPENSSL_LIBS)
target_compile_definitions(web_service PRIVATE -DCPPHTTPLIB_OPENSSL_SUPPORT)
target_link_libraries(web_service PRIVATE common json-headers ${OPENSSL_LIBS} httplib lurlparser)