find_package: Add option to prefer Config mode

Add a `CMAKE_FIND_PACKAGE_PREFER_CONFIG` variable to tell
`find_package` calls to look for a package configuration file
first even if a find module is available.

Fixes: #16805, #19236
This commit is contained in:
Cristian Adam
2019-05-20 21:32:24 +02:00
committed by Brad King
parent c365243a3a
commit 26a99da206
9 changed files with 135 additions and 44 deletions

View File

@@ -0,0 +1,6 @@
find-package-prefer-config
--------------------------
* Variable :variable:`CMAKE_FIND_PACKAGE_PREFER_CONFIG` was added to tell
:command:`find_package` calls to look for a package configuration
file first even if a find module is available.