Merge branch 'fix-find_dependency-empty-version'

This commit is contained in:
Brad King 2014-03-13 15:52:32 -04:00
commit 9914e7cd95
1 changed files with 5 additions and 2 deletions

View File

@ -31,14 +31,17 @@ macro(find_dependency dep)
if (NOT ${dep}_FOUND) if (NOT ${dep}_FOUND)
set(cmake_fd_version) set(cmake_fd_version)
if (${ARGC} GREATER 1) if (${ARGC} GREATER 1)
if (${ARGV1} STREQUAL EXACT) if ("${ARGV1}" STREQUAL "")
message(FATAL_ERROR "Invalid arguments to find_dependency. VERSION is empty")
endif()
if ("${ARGV1}" STREQUAL EXACT)
message(FATAL_ERROR "Invalid arguments to find_dependency. EXACT may only be specified if a VERSION is specified") message(FATAL_ERROR "Invalid arguments to find_dependency. EXACT may only be specified if a VERSION is specified")
endif() endif()
set(cmake_fd_version ${ARGV1}) set(cmake_fd_version ${ARGV1})
endif() endif()
set(cmake_fd_exact_arg) set(cmake_fd_exact_arg)
if(${ARGC} GREATER 2) if(${ARGC} GREATER 2)
if (NOT ${ARGV2} STREQUAL EXACT) if (NOT "${ARGV2}" STREQUAL EXACT)
message(FATAL_ERROR "Invalid arguments to find_dependency") message(FATAL_ERROR "Invalid arguments to find_dependency")
endif() endif()
set(cmake_fd_exact_arg EXACT) set(cmake_fd_exact_arg EXACT)