summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeFindDependencyMacro.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake
index 142130d..08c4990 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)