Commit 1aec14ed authored by Sergiu Deitsch's avatar Sergiu Deitsch

cmake: do not introduce a policy stack in the package config

parent 4c4631c9
......@@ -590,7 +590,7 @@ install (TARGETS glog
LIBRARY DESTINATION ${_glog_CMake_LIBDIR}
ARCHIVE DESTINATION ${_glog_CMake_LIBDIR})
set (glog_POLICY_VERSION 3.0)
set (glog_CMake_VERSION 3.0)
if (gflags_FOUND)
# Ensure clients locate only the package config and not third party find
......@@ -600,7 +600,7 @@ if (gflags_FOUND)
else (CMAKE_VERSION VERSION_LESS 3.9)
# Passing additional find_package arguments to find_dependency is possible
# starting with CMake 3.9.
set (glog_POLICY_VERSION 3.9)
set (glog_CMake_VERSION 3.9)
set (gflags_DEPENDENCY "find_dependency (gflags ${gflags_VERSION} NO_MODULE)")
endif (CMAKE_VERSION VERSION_LESS 3.9)
endif (gflags_FOUND)
......
cmake_policy (PUSH)
cmake_policy (VERSION @glog_POLICY_VERSION@)
if (CMAKE_VERSION VERSION_LESS @glog_CMake_VERSION@)
message (FATAL_ERROR "CMake >= @glog_CMake_VERSION@ required")
endif (CMAKE_VERSION VERSION_LESS @glog_CMake_VERSION@)
@PACKAGE_INIT@
......@@ -8,5 +9,3 @@ include (CMakeFindDependencyMacro)
@gflags_DEPENDENCY@
include ("${CMAKE_CURRENT_LIST_DIR}/glog-targets.cmake")
cmake_policy (POP)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment