[CMake]: fix breaking find_package change (#7499) (#7502)

Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
Chris Langhans
2022-09-01 19:28:59 +02:00
committed by GitHub
parent c5a609dc20
commit d465b39c3e
5 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,11 @@
set(PACKAGE_VERSION "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@")
# Check whether the requested PACKAGE_FIND_VERSION is compatible
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()