mirror of
https://github.com/curl/curl.git
synced 2026-05-30 08:47:28 +03:00
cmake: narrow scope of custom CMAKE_MODULE_PATH in curl-config.cmake
Set it only while using local Find modules, leave it as-is while using
system ones.
Follow-up to 16f073ef49 #16973
Cherry-picked from #19776
This commit is contained in:
parent
7799d15eef
commit
bf58ca6e8f
1 changed files with 6 additions and 4 deletions
|
|
@ -28,10 +28,6 @@ option(CURL_USE_PKGCONFIG "Enable pkg-config to detect @PROJECT_NAME@ dependenci
|
|||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
set(_curl_cmake_module_path_save ${CMAKE_MODULE_PATH})
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
||||
|
||||
set(_libs "")
|
||||
if("@USE_OPENSSL@")
|
||||
if("@OPENSSL_VERSION_MAJOR@")
|
||||
find_dependency(OpenSSL "@OPENSSL_VERSION_MAJOR@")
|
||||
|
|
@ -42,6 +38,12 @@ endif()
|
|||
if("@HAVE_LIBZ@")
|
||||
find_dependency(ZLIB "@ZLIB_VERSION_MAJOR@")
|
||||
endif()
|
||||
|
||||
set(_curl_cmake_module_path_save ${CMAKE_MODULE_PATH})
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
||||
|
||||
set(_libs "")
|
||||
|
||||
if("@HAVE_BROTLI@")
|
||||
find_dependency(Brotli)
|
||||
list(APPEND _libs CURL::brotli)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue