summaryrefslogtreecommitdiffstats
path: root/externals/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'externals/CMakeLists.txt')
-rw-r--r--externals/CMakeLists.txt32
1 files changed, 18 insertions, 14 deletions
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index d1dcc403b..c629bbc5c 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -61,9 +61,7 @@ if (USE_DISCORD_PRESENCE)
endif()
# Sirit
-if (ENABLE_VULKAN)
- add_subdirectory(sirit)
-endif()
+add_subdirectory(sirit)
# libzip
find_package(Libzip 1.5)
@@ -73,23 +71,29 @@ if (NOT LIBZIP_FOUND)
endif()
if (ENABLE_WEB_SERVICE)
- # LibreSSL
- set(LIBRESSL_SKIP_INSTALL ON CACHE BOOL "")
- add_subdirectory(libressl EXCLUDE_FROM_ALL)
- target_include_directories(ssl INTERFACE ./libressl/include)
- target_compile_definitions(ssl PRIVATE -DHAVE_INET_NTOP)
- get_directory_property(OPENSSL_LIBRARIES
- DIRECTORY libressl
- DEFINITION OPENSSL_LIBS)
-
- # lurlparser
- add_subdirectory(lurlparser EXCLUDE_FROM_ALL)
+ find_package(OpenSSL 1.1)
+ if (OPENSSL_FOUND)
+ set(OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
+ else()
+ # LibreSSL
+ set(LIBRESSL_SKIP_INSTALL ON CACHE BOOL "")
+ set(OPENSSLDIR "/etc/ssl/")
+ add_subdirectory(libressl EXCLUDE_FROM_ALL)
+ target_include_directories(ssl INTERFACE ./libressl/include)
+ target_compile_definitions(ssl PRIVATE -DHAVE_INET_NTOP)
+ get_directory_property(OPENSSL_LIBRARIES
+ DIRECTORY libressl
+ DEFINITION OPENSSL_LIBS)
+ endif()
# httplib
add_library(httplib INTERFACE)
target_include_directories(httplib INTERFACE ./httplib)
target_compile_definitions(httplib INTERFACE -DCPPHTTPLIB_OPENSSL_SUPPORT)
target_link_libraries(httplib INTERFACE ${OPENSSL_LIBRARIES})
+ if (WIN32)
+ target_link_libraries(httplib INTERFACE crypt32 cryptui ws2_32)
+ endif()
endif()
# Opus