mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-10-27 08:21:30 +00:00
server : remove old LLAMA_SERVER_SSL (#16290)
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
This commit is contained in:
@@ -92,7 +92,7 @@ option(LLAMA_TOOLS_INSTALL "llama: install tools" ${LLAMA_TOOLS_INSTALL_
|
|||||||
|
|
||||||
# 3rd party libs
|
# 3rd party libs
|
||||||
option(LLAMA_CURL "llama: use libcurl to download model from an URL" ON)
|
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_OPENSSL "llama: use openssl to support HTTPS" OFF)
|
||||||
option(LLAMA_LLGUIDANCE "llama-common: include LLGuidance library for structured output in common utils" OFF)
|
option(LLAMA_LLGUIDANCE "llama-common: include LLGuidance library for structured output in common utils" OFF)
|
||||||
|
|
||||||
# Required for relocatable CMake package
|
# Required for relocatable CMake package
|
||||||
|
|||||||
@@ -87,11 +87,13 @@ if (LLAMA_CURL)
|
|||||||
target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL)
|
target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL)
|
||||||
include_directories(${CURL_INCLUDE_DIRS})
|
include_directories(${CURL_INCLUDE_DIRS})
|
||||||
set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARIES})
|
set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
|
||||||
elseif (LLAMA_OPENSSL)
|
if (LLAMA_OPENSSL)
|
||||||
find_package(OpenSSL)
|
find_package(OpenSSL)
|
||||||
if (OpenSSL_FOUND)
|
if (OpenSSL_FOUND)
|
||||||
include(CheckCSourceCompiles)
|
include(CheckCSourceCompiles)
|
||||||
|
set(SAVED_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES})
|
||||||
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
|
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <openssl/opensslv.h>
|
#include <openssl/opensslv.h>
|
||||||
@@ -106,6 +108,7 @@ elseif (LLAMA_OPENSSL)
|
|||||||
#endif
|
#endif
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
" OPENSSL_VERSION_SUPPORTED)
|
" OPENSSL_VERSION_SUPPORTED)
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES ${SAVED_CMAKE_REQUIRED_INCLUDES})
|
||||||
if (OPENSSL_VERSION_SUPPORTED)
|
if (OPENSSL_VERSION_SUPPORTED)
|
||||||
message(STATUS "OpenSSL found: ${OPENSSL_VERSION}")
|
message(STATUS "OpenSSL found: ${OPENSSL_VERSION}")
|
||||||
target_compile_definitions(${TARGET} PUBLIC CPPHTTPLIB_OPENSSL_SUPPORT)
|
target_compile_definitions(${TARGET} PUBLIC CPPHTTPLIB_OPENSSL_SUPPORT)
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
set(TARGET llama-server)
|
set(TARGET llama-server)
|
||||||
|
|
||||||
option(LLAMA_SERVER_SSL "Build SSL support for the server" OFF)
|
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
if (MINGW)
|
if (MINGW)
|
||||||
@@ -37,12 +35,6 @@ target_include_directories(${TARGET} PRIVATE ../mtmd)
|
|||||||
target_include_directories(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR})
|
target_include_directories(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR})
|
||||||
target_link_libraries(${TARGET} PRIVATE common mtmd ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(${TARGET} PRIVATE common mtmd ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
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)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ws2_32)
|
TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ws2_32)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ For more details, please refer to [multimodal documentation](../../docs/multimod
|
|||||||
- Using `CMake`:
|
- Using `CMake`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cmake -B build -DLLAMA_SERVER_SSL=ON
|
cmake -B build -DLLAMA_OPENSSL=ON
|
||||||
cmake --build build --config Release -t llama-server
|
cmake --build build --config Release -t llama-server
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user