-
- Downloads
FindPkgConfig: split args if loaded from environment
It's common for some people to use the PKG_CONFIG environment variable
to not only load a custom pkg-config/pkgconf but also to load some
default arguments such as `--static` or `--keep-system-libs` which often
worked since shell scripts would call `$PKG_CONFIG --libs pkg` without
quotes, but this breaks FindPkgConfig since it uses the full string as
`argv[0]` and might try looking for a binary called `pkgconf --static`,
instead of looking for `pkgconf` and adding `--static` as the `argv[1]`
Additionally adds RunCMake.FindPkgConfig ARGN test case
Fixes: #22305
Signed-off-by:
Christopher Degawa <ccom@randomderp.com>
Showing
- Help/release/dev/FindPkgConfig-PKG_CONFIG-args.rst 5 additions, 0 deletionsHelp/release/dev/FindPkgConfig-PKG_CONFIG-args.rst
- Modules/FindPkgConfig.cmake 34 additions, 5 deletionsModules/FindPkgConfig.cmake
- Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_ARGN.cmake 17 additions, 0 deletions...CMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_ARGN.cmake
- Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake 1 addition, 0 deletionsTests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
- Tests/RunCMake/FindPkgConfig/dummy-pkg-config.bat 17 additions, 0 deletionsTests/RunCMake/FindPkgConfig/dummy-pkg-config.bat
- Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh 19 additions, 0 deletionsTests/RunCMake/FindPkgConfig/dummy-pkg-config.sh
Loading
Please register or sign in to comment