From a399456c12875e8cdaaa85271dfbcabf7483ed98 Mon Sep 17 00:00:00 2001 From: StrikeOner <167051745+StrikeOner@users.noreply.github.com> Date: Tue, 17 Mar 2026 18:39:11 +0300 Subject: [PATCH] fix: propagate CPPHTTPLIB_OPENSSL_SUPPORT to cpp-httplib target when LLAMA_SERVER_SSL=ON (#1451) Without this, libcpp-httplib.a is compiled without SSL support, causing an undefined reference to httplib::SSLServer at link time even though the OpenSSL libraries are present on the link line. Fixes #1449 Co-authored-by: kerem seyhan --- examples/server/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/server/CMakeLists.txt b/examples/server/CMakeLists.txt index 0d4077bf..d3e4ecd5 100644 --- a/examples/server/CMakeLists.txt +++ b/examples/server/CMakeLists.txt @@ -84,6 +84,8 @@ if (LLAMA_SERVER_SSL) find_package(OpenSSL REQUIRED) target_link_libraries(${TARGET} PRIVATE OpenSSL::SSL OpenSSL::Crypto) target_compile_definitions(${TARGET} PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT) + target_compile_definitions(cpp-httplib PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT) + target_link_libraries(cpp-httplib PRIVATE OpenSSL::SSL OpenSSL::Crypto) endif() if (LLAMA_SERVER_SQLITE3)