Merge branch 'fix-find_dependency-EXACT' into release
This commit is contained in:
commit
29ff93a970
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# ::
|
||||
#
|
||||
# find_dependency(<dep> [<version>])
|
||||
# find_dependency(<dep> [<version> [EXACT]])
|
||||
#
|
||||
#
|
||||
# ``find_dependency()`` wraps a :command:`find_package` call for a package
|
||||
|
@ -34,9 +34,18 @@ macro(find_dependency dep)
|
|||
set(cmake_fd_version ${ARGV1})
|
||||
endif()
|
||||
set(cmake_fd_exact_arg)
|
||||
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_EXACT)
|
||||
if(${ARGC} GREATER 2)
|
||||
if (NOT ${ARGV2} STREQUAL EXACT)
|
||||
message(FATAL_ERROR "Invalid arguments to find_dependency")
|
||||
endif()
|
||||
if (NOT ${cmake_fd_version})
|
||||
message(FATAL_ERROR "Invalid arguments to find_dependency. EXACT may only be specified if a VERSION is specified")
|
||||
endif()
|
||||
set(cmake_fd_exact_arg EXACT)
|
||||
endif()
|
||||
if(${ARGC} GREATER 3)
|
||||
message(FATAL_ERROR "Invalid arguments to find_dependency")
|
||||
endif()
|
||||
set(cmake_fd_quiet_arg)
|
||||
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
|
||||
set(cmake_fd_quiet_arg QUIET)
|
||||
|
|
Loading…
Reference in New Issue