summaryrefslogtreecommitdiffstats
path: root/externals
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-02-28 01:46:19 +0100
committerGitHub <noreply@github.com>2023-02-28 01:46:19 +0100
commita78a475815ee20d448fb75db7707d52e974041a2 (patch)
tree3b615fa636a30d183eae2813f350787016eb2edd /externals
parentMerge pull request #9859 from liamwhite/tmem-use (diff)
parentcmake: fix cpp-jwt build (diff)
downloadyuzu-a78a475815ee20d448fb75db7707d52e974041a2.tar
yuzu-a78a475815ee20d448fb75db7707d52e974041a2.tar.gz
yuzu-a78a475815ee20d448fb75db7707d52e974041a2.tar.bz2
yuzu-a78a475815ee20d448fb75db7707d52e974041a2.tar.lz
yuzu-a78a475815ee20d448fb75db7707d52e974041a2.tar.xz
yuzu-a78a475815ee20d448fb75db7707d52e974041a2.tar.zst
yuzu-a78a475815ee20d448fb75db7707d52e974041a2.zip
Diffstat (limited to '')
-rw-r--r--externals/CMakeLists.txt18
1 files changed, 8 insertions, 10 deletions
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index 8532fd7a8..966f5e94c 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -100,17 +100,9 @@ endif()
# Sirit
add_subdirectory(sirit EXCLUDE_FROM_ALL)
-# httplib
-if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib)
- if (NOT WIN32)
- find_package(OpenSSL 1.1)
- if (OPENSSL_FOUND)
- set(OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
- endif()
- endif()
-
+# LibreSSL
+if (ENABLE_WEB_SERVICE AND DEFINED OPENSSL_FOUND)
if (WIN32 OR NOT OPENSSL_FOUND)
- # LibreSSL
set(LIBRESSL_SKIP_INSTALL ON)
set(OPENSSLDIR "/etc/ssl/")
add_subdirectory(libressl EXCLUDE_FROM_ALL)
@@ -119,8 +111,13 @@ if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib)
get_directory_property(OPENSSL_LIBRARIES
DIRECTORY libressl
DEFINITION OPENSSL_LIBS)
+ else()
+ set(OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
endif()
+endif()
+# httplib
+if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib)
add_library(httplib INTERFACE)
target_include_directories(httplib INTERFACE ./cpp-httplib)
target_compile_definitions(httplib INTERFACE -DCPPHTTPLIB_OPENSSL_SUPPORT)
@@ -136,6 +133,7 @@ if (ENABLE_WEB_SERVICE AND NOT TARGET cpp-jwt::cpp-jwt)
add_library(cpp-jwt INTERFACE)
target_include_directories(cpp-jwt INTERFACE ./cpp-jwt/include)
target_compile_definitions(cpp-jwt INTERFACE CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
+ target_link_libraries(cpp-jwt INTERFACE ${OPENSSL_LIBRARIES})
add_library(cpp-jwt::cpp-jwt ALIAS cpp-jwt)
endif()