summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeFindDependencyMacro.cmake34
-rw-r--r--Modules/FindGTK2.cmake2
2 files changed, 21 insertions, 15 deletions
diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake
index 0f1f56d..9334ba3 100644
--- a/Modules/CMakeFindDependencyMacro.cmake
+++ b/Modules/CMakeFindDependencyMacro.cmake
@@ -29,29 +29,34 @@
macro(find_dependency dep)
if (NOT ${dep}_FOUND)
- if (${ARGV1})
- set(version ${ARGV1})
+ set(cmake_fd_version)
+ if (${ARGC} GREATER 1)
+ set(cmake_fd_version ${ARGV1})
endif()
- set(exact_arg)
+ set(cmake_fd_exact_arg)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_EXACT)
- set(exact_arg EXACT)
+ set(cmake_fd_exact_arg EXACT)
endif()
- set(quiet_arg)
+ set(cmake_fd_quiet_arg)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
- set(quiet_arg QUIET)
+ set(cmake_fd_quiet_arg QUIET)
endif()
- set(required_arg)
+ set(cmake_fd_required_arg)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
- set(required_arg REQUIRED)
+ set(cmake_fd_required_arg REQUIRED)
endif()
- get_property(alreadyTransitive GLOBAL PROPERTY
+ get_property(cmake_fd_alreadyTransitive GLOBAL PROPERTY
_CMAKE_${dep}_TRANSITIVE_DEPENDENCY
)
- find_package(${dep} ${version} ${exact_arg} ${quiet_arg} ${required_arg})
+ find_package(${dep} ${cmake_fd_version}
+ ${cmake_fd_exact_arg}
+ ${cmake_fd_quiet_arg}
+ ${cmake_fd_required_arg}
+ )
- if(NOT DEFINED alreadyTransitive OR alreadyTransitive)
+ if(NOT DEFINED cmake_fd_alreadyTransitive OR cmake_fd_alreadyTransitive)
set_property(GLOBAL PROPERTY _CMAKE_${dep}_TRANSITIVE_DEPENDENCY TRUE)
endif()
@@ -60,8 +65,9 @@ macro(find_dependency dep)
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
return()
endif()
- set(required_arg)
- set(quiet_arg)
- set(exact_arg)
+ set(cmake_fd_version)
+ set(cmake_fd_required_arg)
+ set(cmake_fd_quiet_arg)
+ set(cmake_fd_exact_arg)
endif()
endmacro()
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index bc66337..a91da33 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -108,7 +108,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-# Version 1.6 (CMake 2.8.13)
+# Version 1.6 (CMake 3.0)
# * Create targets for each library
# * Do not link libfreetype
# Version 1.5 (CMake 2.8.12)