mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 00:00:39 -05:00
Merge topic 'FindCURL-list-index-if'
0faedae335 FindCURL: Fix list index check after search
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5070
This commit is contained in:
@@ -150,16 +150,16 @@ if(CURL_FIND_COMPONENTS)
|
||||
endif()
|
||||
foreach(component IN LISTS CURL_FIND_COMPONENTS)
|
||||
list(FIND CURL_KNOWN_PROTOCOLS ${component} _found)
|
||||
if(_found)
|
||||
if(NOT _found EQUAL -1)
|
||||
list(FIND CURL_SUPPORTED_PROTOCOLS ${component} _found)
|
||||
if(_found)
|
||||
if(NOT _found EQUAL -1)
|
||||
set(CURL_${component}_FOUND TRUE)
|
||||
elseif(CURL_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "CURL: Required protocol ${component} is not found")
|
||||
endif()
|
||||
else()
|
||||
list(FIND CURL_SUPPORTED_FEATURES ${component} _found)
|
||||
if(_found)
|
||||
if(NOT _found EQUAL -1)
|
||||
set(CURL_${component}_FOUND TRUE)
|
||||
elseif(CURL_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "CURL: Required feature ${component} is not found")
|
||||
|
||||
Reference in New Issue
Block a user