File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed 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)
3434endif ()
3535cmake_policy (POP)
3636
37+ # Prefer config instead of the old FindXXX() files
38+ set (_BCK_CMAKE_FIND_PACKAGE_PREFER_CONFIG ${CMAKE_FIND_PACKAGE_PREFER_CONFIG} )
39+ set (CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE )
40+
3741# Search for dependencies first:
3842set (_deps "@ALL_DEPS_LIST@" )
3943foreach (_dep ${_deps} ) # NO quotes for the list to be a CMake list!
4044 if (${_dep} _FOUND)
4145 continue () # already found
4246 endif ()
43- find_dependency(${_dep} CONFIG) # Don't look for old FindXXX() files
47+ find_dependency(${_dep} )
4448 if (${_dep} _FOUND)
4549 mark_as_advanced (${_dep} _DIR)
4650 endif ()
4751endforeach ()
4852@EXTRA_CONFIG_CMDS@
4953
54+ # Restore user's settings:
55+ set (CMAKE_FIND_PACKAGE_PREFER_CONFIG ${_BCK_CMAKE_FIND_PACKAGE_PREFER_CONFIG} )
56+ unset (_BCK_CMAKE_FIND_PACKAGE_PREFER_CONFIG)
57+
5058# Include targets for this library:
5159include (
${CMAKE_CURRENT_LIST_DIR} /mrpt-@
[email protected] )
You can’t perform that action at this time.
0 commit comments