-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,18 +34,26 @@ if(NOT "${CMAKE_CURRENT_LIST_DIR}/../" IN_LIST CMAKE_PREFIX_PATH) | |
endif() | ||
cmake_policy(POP) | ||
|
||
# Prefer config instead of the old FindXXX() files | ||
set(_BCK_CMAKE_FIND_PACKAGE_PREFER_CONFIG ${CMAKE_FIND_PACKAGE_PREFER_CONFIG}) | ||
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) | ||
|
||
# Search for dependencies first: | ||
set(_deps "@ALL_DEPS_LIST@") | ||
foreach(_dep ${_deps}) # NO quotes for the list to be a CMake list! | ||
if (${_dep}_FOUND) | ||
continue() # already found | ||
endif() | ||
find_dependency(${_dep} CONFIG) # Don't look for old FindXXX() files | ||
find_dependency(${_dep}) | ||
if(${_dep}_FOUND) | ||
mark_as_advanced(${_dep}_DIR) | ||
endif() | ||
endforeach() | ||
@EXTRA_CONFIG_CMDS@ | ||
|
||
# Restore user's settings: | ||
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ${_BCK_CMAKE_FIND_PACKAGE_PREFER_CONFIG}) | ||
unset(_BCK_CMAKE_FIND_PACKAGE_PREFER_CONFIG) | ||
|
||
# Include targets for this library: | ||
include(${CMAKE_CURRENT_LIST_DIR}/mrpt-@[email protected]) |