]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
build : add LLAMA_OPENSSL option (#16287)
authorAdrien Gallouët <redacted>
Sat, 27 Sep 2025 09:12:46 +0000 (11:12 +0200)
committerGitHub <redacted>
Sat, 27 Sep 2025 09:12:46 +0000 (12:12 +0300)
Introduce a new `LLAMA_OPENSSL` option, enabled by default.

This preserves the previous default (libcurl first, OpenSSL as fallback),
while allowing OpenSSL to be disabled if desired.

Signed-off-by: Adrien Gallouët <redacted>
CMakeLists.txt
common/CMakeLists.txt

index 4720e1f1a295550991d0fa4cf50a661fade6e5fb..7a69d94dd55513644839a63957e8bc6c740d1f72 100644 (file)
@@ -92,6 +92,7 @@ option(LLAMA_TOOLS_INSTALL  "llama: install tools"        ${LLAMA_TOOLS_INSTALL_
 
 # 3rd party libs
 option(LLAMA_CURL       "llama: use libcurl to download model from an URL" ON)
+option(LLAMA_OPENSSL    "llama: use openssl to download model from an URL" ON)
 option(LLAMA_LLGUIDANCE "llama-common: include LLGuidance library for structured output in common utils" OFF)
 
 # Required for relocatable CMake package
index e7c4cc4bdc744560e60ea7466601aed4e01225b7..0cf104833c7f10e7acca08733414ea276e98682c 100644 (file)
@@ -87,7 +87,8 @@ if (LLAMA_CURL)
     target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL)
     include_directories(${CURL_INCLUDE_DIRS})
     set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARIES})
-else()
+
+elseif (LLAMA_OPENSSL)
     find_package(OpenSSL)
     if (OpenSSL_FOUND)
         include(CheckCSourceCompiles)