backend-infra-engineer: Fix Homebrew LLVM build plumbing
This commit is contained in:
@@ -84,7 +84,7 @@ if(EMSCRIPTEN)
|
||||
endif()
|
||||
|
||||
# Add JSON and httplib support if enabled
|
||||
if(YAZE_WITH_JSON)
|
||||
if(YAZE_ENABLE_JSON)
|
||||
# Link nlohmann_json which provides the include directories automatically
|
||||
target_link_libraries(yaze_net PUBLIC nlohmann_json::nlohmann_json)
|
||||
target_include_directories(yaze_net PUBLIC ${CMAKE_SOURCE_DIR}/ext/httplib)
|
||||
@@ -102,8 +102,17 @@ if(YAZE_WITH_JSON)
|
||||
# WebSocket will work with plain HTTP (no SSL/TLS) on Windows
|
||||
if(NOT WIN32)
|
||||
find_package(OpenSSL QUIET)
|
||||
if(OpenSSL_FOUND)
|
||||
target_link_libraries(yaze_net PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
||||
if(OPENSSL_INCLUDE_DIR)
|
||||
target_include_directories(yaze_net PUBLIC ${OPENSSL_INCLUDE_DIR})
|
||||
elseif(OPENSSL_ROOT_DIR)
|
||||
target_include_directories(yaze_net PUBLIC ${OPENSSL_ROOT_DIR}/include)
|
||||
endif()
|
||||
if(OPENSSL_FOUND)
|
||||
if(TARGET OpenSSL::SSL)
|
||||
target_link_libraries(yaze_net PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
||||
else()
|
||||
target_link_libraries(yaze_net PUBLIC ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||
endif()
|
||||
target_compile_definitions(yaze_net PUBLIC CPPHTTPLIB_OPENSSL_SUPPORT)
|
||||
message(STATUS " - WebSocket with SSL/TLS support enabled")
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user