summaryrefslogtreecommitdiffstats
path: root/Modules/FindPkgConfig.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-08-19 14:27:14 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-08-19 14:27:24 (GMT)
commit135e79038cde1d41aff1a75d2d00ba46828ea1e6 (patch)
treea455c8a3434baeec80799b07a63fd4c08baba1d3 /Modules/FindPkgConfig.cmake
parent958b171c248b75728262f9fcf2854d9a7691543d (diff)
parent17e4934dbfa6df048e201bf0f0b46ad8d0e279ef (diff)
downloadCMake-135e79038cde1d41aff1a75d2d00ba46828ea1e6.zip
CMake-135e79038cde1d41aff1a75d2d00ba46828ea1e6.tar.gz
CMake-135e79038cde1d41aff1a75d2d00ba46828ea1e6.tar.bz2
Merge topic 'FindPkgConfig-restore-legacy-behavior'
17e4934dbf FindPkgConfig: Restore legacy behavior when CMP0126 is set to NEW Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6461
Diffstat (limited to 'Modules/FindPkgConfig.cmake')
-rw-r--r--Modules/FindPkgConfig.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index a28f6bc..4de5331 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -97,10 +97,18 @@ set(PKG_CONFIG_FOUND "${PKGCONFIG_FOUND}")
# Unsets the given variables
macro(_pkgconfig_unset var)
+ # Clear normal variable (possibly set by project code).
+ unset(${var})
+ # Store as cache variable.
+ # FIXME: Add a policy to switch to a normal variable.
set(${var} "" CACHE INTERNAL "")
endmacro()
macro(_pkgconfig_set var value)
+ # Clear normal variable (possibly set by project code).
+ unset(${var})
+ # Store as cache variable.
+ # FIXME: Add a policy to switch to a normal variable.
set(${var} ${value} CACHE INTERNAL "")
endmacro()