mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
FindPkgConfig: Add test for specified pkg-config tool missing
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
-- Could NOT find PkgConfig \(missing: PKG_CONFIG_EXECUTABLE\) *
|
||||
Reason given by package: The command
|
||||
"pkg-config-does-not-exist" --version
|
||||
failed with output.*
|
||||
-- PKG_CONFIG_FOUND='FALSE'
|
||||
-- PKG_CONFIG_EXECUTABLE=''
|
||||
4
Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist.cmake
Normal file
4
Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist.cmake
Normal file
@@ -0,0 +1,4 @@
|
||||
set(PKG_CONFIG_EXECUTABLE "pkg-config-does-not-exist" CACHE FILEPATH "")
|
||||
find_package(PkgConfig)
|
||||
message(STATUS "PKG_CONFIG_FOUND='${PKG_CONFIG_FOUND}'")
|
||||
message(STATUS "PKG_CONFIG_EXECUTABLE='${PKG_CONFIG_EXECUTABLE}'")
|
||||
@@ -1,5 +1,7 @@
|
||||
include(RunCMake)
|
||||
|
||||
run_cmake(PkgConfigDoesNotExist)
|
||||
|
||||
run_cmake(FindPkgConfig_NO_PKGCONFIG_PATH)
|
||||
run_cmake(FindPkgConfig_PKGCONFIG_PATH)
|
||||
run_cmake(FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH)
|
||||
|
||||
Reference in New Issue
Block a user