mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-22 16:38:58 +02:00
bit of cmake fuckery
This commit is contained in:
parent
f6363b39e0
commit
f63fca5f23
9 changed files with 182 additions and 19 deletions
|
|
@ -17,6 +17,27 @@ create_target_directory_groups(web_service)
|
|||
target_include_directories(web_service PUBLIC ${cpp-jwt_SOURCE_DIR}/include)
|
||||
target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib::httplib cpp-jwt::cpp-jwt)
|
||||
|
||||
find_package(OpenSSL REQUIRED)
|
||||
target_link_libraries(web_service PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
||||
target_compile_definitions(web_service PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
|
||||
if (IOS)
|
||||
# TODO: this is horrific
|
||||
find_package(OpenSSL 3 QUIET)
|
||||
if (OpenSSL_FOUND)
|
||||
target_link_libraries(web_service PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
||||
if (NOT IOS)
|
||||
target_compile_definitions(web_service PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
|
||||
endif()
|
||||
else()
|
||||
find_package(OpenSSL 3 QUIET PATHS /usr/local/opt/openssl /opt/homebrew/opt/openssl NO_DEFAULT_PATH)
|
||||
if (OpenSSL_FOUND)
|
||||
target_link_libraries(web_service PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
||||
if (NOT IOS)
|
||||
target_compile_definitions(web_service PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "OpenSSL not found or version is less than 3. Some features in web_service may be disabled.")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
find_package(OpenSSL REQUIRED)
|
||||
target_link_libraries(web_service PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
||||
target_compile_definitions(web_service PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue