summaryrefslogtreecommitdiffstats
path: root/Tests/FindPackageTest/CMakeLists.txt
diff options
context:
space:
mode:
authorSilvio Traversaro <silvio.traversaro@iit.it>2016-08-20 10:06:55 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-24 13:40:25 (GMT)
commit828d6c137d703ea095008fc6da794904a15c4ebd (patch)
treeb4c0a6d0ef048e1d13de28637df1d74bd0784d08 /Tests/FindPackageTest/CMakeLists.txt
parentff5c89de0c23c0568afcbabd63974388ca045aa3 (diff)
downloadCMake-828d6c137d703ea095008fc6da794904a15c4ebd.zip
CMake-828d6c137d703ea095008fc6da794904a15c4ebd.tar.gz
CMake-828d6c137d703ea095008fc6da794904a15c4ebd.tar.bz2
find_package: Extend search path for combined Windows/UNIX convention
Find packages that install their cmake package configuration files in `lib/cmake/<name>` when they are installed in the default Windows CMAKE_INSTALL_PREFIX, `C:/Program Files/<name>`. Closes: #16212
Diffstat (limited to 'Tests/FindPackageTest/CMakeLists.txt')
-rw-r--r--Tests/FindPackageTest/CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt
index d3e68bc..04bbbc6 100644
--- a/Tests/FindPackageTest/CMakeLists.txt
+++ b/Tests/FindPackageTest/CMakeLists.txt
@@ -102,6 +102,7 @@ endif()
set(PACKAGES
foo Foo Bar Blub TFramework Tframework TApp Tapp Special
VersionedA VersionedB VersionedC VersionedD VersionedE
+ VersionedF VersionedG VersionedH
WrongA WrongB WrongC WrongD
wibbleA wibbleB
RecursiveA RecursiveB RecursiveC
@@ -142,6 +143,10 @@ find_package(VersionedB 3.1 EXACT NAMES zot)
find_package(VersionedC 4.0 EXACT NAMES zot)
find_package(VersionedD 1.1 EXACT NAMES Baz)
find_package(VersionedE 1.2 EXACT NAMES Baz)
+find_package(VersionedF 1.3 EXACT NAMES Baz)
+find_package(VersionedG 2.0 EXACT NAMES Baz)
+find_package(VersionedH 2.1 EXACT NAMES Baz)
+
# Test Config files which set Xyz_FOUND themselves:
find_package(SetFoundTRUE NO_MODULE)
@@ -158,12 +163,12 @@ find_package(WrongB 1.2 EXACT NAMES Baz)
# Test wrong initial path when result is missing.
set(WrongC_DIR "${VersionedD_DIR}")
-find_package(WrongC 1.3 EXACT QUIET NAMES Baz)
+find_package(WrongC 1.4 EXACT QUIET NAMES Baz)
# Test wrong initial cache entry of UNINITIALIZED type when result is missing.
set(WrongD_DIR "${VersionedD_DIR}" CACHE UNINITIALIZED "Wrong Value" FORCE)
get_property(type CACHE WrongD_DIR PROPERTY TYPE)
-find_package(WrongD 1.3 EXACT QUIET NAMES Baz)
+find_package(WrongD 1.4 EXACT QUIET NAMES Baz)
# HINTS should override the system but PATHS should not
list(INSERT CMAKE_SYSTEM_PREFIX_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/A")
@@ -216,6 +221,9 @@ set(VersionedB_EXPECTED "lib/zot-3.1/zot-config.cmake")
set(VersionedC_EXPECTED "lib/cmake/zot-4.0/zot-config.cmake")
set(VersionedD_EXPECTED "Baz 1.1/BazConfig.cmake")
set(VersionedE_EXPECTED "Baz 1.2/CMake/BazConfig.cmake")
+set(VersionedF_EXPECTED "Baz 1.3/lib/cmake/Baz/BazConfig.cmake")
+set(VersionedG_EXPECTED "Baz 2.0/share/Baz 2/BazConfig.cmake")
+set(VersionedH_EXPECTED "Baz 2.1/lib/Baz 2/cmake/BazConfig.cmake")
set(WrongA_EXPECTED "${VersionedE_EXPECTED}")
set(WrongB_EXPECTED "${VersionedE_EXPECTED}")
set(WrongC_MISSING "WrongC_DIR-NOTFOUND")