FindCURL: fix component failure when no pkg-config

find_package(CURL COMPONENTS foo) fails when there is
no pkg-config module because of variable name typo.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Fixes: #18802
This commit is contained in:
Hiroshi Miura 2019-01-18 21:52:42 +09:00 committed by Brad King
parent a61c061b61
commit 0526ae4415

View File

@ -110,12 +110,12 @@ if(CURL_FIND_COMPONENTS)
OUTPUT_VARIABLE CURL_CONFIG_FEATURES_STRING
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE "\n" ";" CURL_CONFIG_FEATURES "${CURL_CONFIG_FEATURES_STRING}")
string(REPLACE "\n" ";" CURL_SUPPORTED_FEATURES "${CURL_CONFIG_FEATURES_STRING}")
execute_process(COMMAND ${CURL_CONFIG_EXECUTABLE} --protocols
OUTPUT_VARIABLE CURL_CONFIG_PROTOCOLS_STRING
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE "\n" ";" CURL_CONFIG_PROTOCOLS "${CURL_CONFIG_PROTOCOLS_STRING}")
string(REPLACE "\n" ";" CURL_SUPPORTED_PROTOCOLS "${CURL_CONFIG_PROTOCOLS_STRING}")
endif()
endif()