diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-02-24 18:59:11 +0100 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-02-24 19:00:42 +0100 |
commit | 2be6dbe4207cda39b479e7c81d172d49dd67cc38 (patch) | |
tree | b33b878df9c366f7070ad1291c3289b40bfad47f /Modules/CMakeFindDependencyMacro.cmake | |
parent | a35ce7235b94ce040b605d87ee326e8d354a5ecb (diff) | |
download | cmake-2be6dbe4207cda39b479e7c81d172d49dd67cc38.tar.gz |
find_dependency: Ensure that ARGV1 has valid local content
The ARGV1 value could come from a wrapping context if find_dependency
is called from a function.
Diffstat (limited to 'Modules/CMakeFindDependencyMacro.cmake')
-rw-r--r-- | Modules/CMakeFindDependencyMacro.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake index 142130dcf5..08c4990c2a 100644 --- a/Modules/CMakeFindDependencyMacro.cmake +++ b/Modules/CMakeFindDependencyMacro.cmake @@ -29,7 +29,10 @@ macro(find_dependency dep) if (NOT ${dep}_FOUND) - set(cmake_fd_version ${ARGV1}) + set(cmake_fd_version) + if (${ARGC} GREATER 1) + set(cmake_fd_version ${ARGV1}) + endif() set(cmake_fd_exact_arg) if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_EXACT) set(cmake_fd_exact_arg EXACT) |