From 60a36a4a7da1e305d3ec0c2499a3469553ffa6fb Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Mon, 23 Dec 2019 06:50:59 +0000 Subject: [PATCH] when STATIC_LINK search for static versions of libraries, delay CURL detection until later --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5df65154..c7a675b5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,11 @@ if (STATIC_LINK AND STATIC_LINK_RUNTIME) message(FATAL "Cannot set both STATIC_LINK and STATIC_LINK_RUNTIME") endif() +if (STATIC_LINK) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX}) + message(STATUS "setting static library suffix search") +endif() + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") # No in-source building @@ -188,10 +193,6 @@ set(CMAKE_THREAD_PREFER_PTHREAD TRUE) set(THREADS_PREFER_PTHREAD_FLAG TRUE) find_package(Threads REQUIRED) -if(NOT IOS AND NOT ANDROID AND NOT WIN32) - find_package(CURL REQUIRED) -endif() - include(cmake/static_link_runtime.cmake) include(cmake/static_link.cmake)