From a457551332853ef19d0796fec12b62c538126ea5 Mon Sep 17 00:00:00 2001 From: Eric Zhang <34133756+EZForever@users.noreply.github.com> Date: Thu, 10 Jul 2025 20:29:05 +0800 Subject: [PATCH] cmake : do not search for curl libraries by ourselves (#14613) * cmake : do not search for curl libraries by ourselves * run : do not search for curl libraries by ourselves --- common/CMakeLists.txt | 3 +-- tools/run/CMakeLists.txt | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index e4c1c55e4c..0ae4d698f0 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -86,8 +86,7 @@ if (LLAMA_CURL) endif() target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL) include_directories(${CURL_INCLUDE_DIRS}) - find_library(CURL_LIBRARY curl REQUIRED) - set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARY}) + set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARIES}) endif () if (LLAMA_LLGUIDANCE) diff --git a/tools/run/CMakeLists.txt b/tools/run/CMakeLists.txt index 7cff188ca6..d018959698 100644 --- a/tools/run/CMakeLists.txt +++ b/tools/run/CMakeLists.txt @@ -7,8 +7,7 @@ if (LLAMA_CURL) find_package(CURL REQUIRED) target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL) include_directories(${CURL_INCLUDE_DIRS}) - find_library(CURL_LIBRARY curl REQUIRED) - set(LLAMA_RUN_EXTRA_LIBS ${LLAMA_RUN_EXTRA_LIBS} ${CURL_LIBRARY}) + set(LLAMA_RUN_EXTRA_LIBS ${LLAMA_RUN_EXTRA_LIBS} ${CURL_LIBRARIES}) endif () install(TARGETS ${TARGET} RUNTIME)