mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-06 04:03:27 +03:00
FindCURL: Fix parsing protocols/features from pkg-config output
Previously `find_package(CURL COMPONENTS HTTP)` failed because the `CURL_SUPPORTED_PROTOCOLS` variable returned by pkg-config is a command-line fragment, but we need a semicolon-separated list.
This commit is contained in:
1 parent
2cad910ecb
commit
ab6b44b1bb
1 file changed
+4
-2
@@ -94,8 +94,10 @@ find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_CURL QUIET libcurl)
|
||||
if(PC_CURL_FOUND)
|
||||
pkg_get_variable(CURL_SUPPORTED_PROTOCOLS libcurl supported_protocols)
|
||||
pkg_get_variable(CURL_SUPPORTED_FEATURES libcurl supported_features)
|
||||
pkg_get_variable(CURL_SUPPORTED_PROTOCOLS_STRING libcurl supported_protocols)
|
||||
string(REPLACE " " ";" CURL_SUPPORTED_PROTOCOLS "${CURL_SUPPORTED_PROTOCOLS_STRING}")
|
||||
pkg_get_variable(CURL_SUPPORTED_FEATURES_STRING libcurl supported_features)
|
||||
string(REPLACE " " ";" CURL_SUPPORTED_FEATURES "${CURL_SUPPORTED_FEATURES_STRING}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in new issue
Block a user