pkg_get_variable: quoted lists not parsed with pkgconf < 1.5.1
pkg_get_variable()
doesn't return a list for variable with multiple values.
https://cmake.org/cmake/help/v3.26/module/FindPkgConfig.html#command:pkg_get_variable
It was returning a list before. Now it returns a string.
In cmake version 3.20.2
below script returns a list
$ cat libcurl.cmake
find_package(PkgConfig)
pkg_get_variable(RESULT libcurl supported_features)
message(STATUS "result : ${RESULT}")
$ cmake --version && cmake -P libcurl.cmake
cmake version 3.20.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.4.2")
-- result : "SSL;IPv6;UnixSockets;libz;AsynchDNS;NTLM;NTLM_WB;TLS-SRP;HTTP2;HTTPS-proxy"
Same script returns a string with cmake version 3.26.5
$ cmake --version && cmake -P libcurl.cmake
cmake version 3.26.5
CMake suite maintained and supported by Kitware (kitware.com/cmake).
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.4.2")
-- result : SSL IPv6 UnixSockets libz brotli AsynchDNS IDN GSS-API PSL SPNEGO Kerberos NTLM NTLM_WB TLS-SRP HTTP2 HTTPS-proxy
I tried to track down the problem and found these (possibly related) 2 commits.
When I apply separate_arguments()
to returned result value I get a list as before. I don't know if this was expected but it breaks our builds.
possibly related issues