summaryrefslogtreecommitdiff
path: root/cmake/modules/LibkolabxmlConfigVersion.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/LibkolabxmlConfigVersion.cmake.in')
-rw-r--r--cmake/modules/LibkolabxmlConfigVersion.cmake.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/modules/LibkolabxmlConfigVersion.cmake.in b/cmake/modules/LibkolabxmlConfigVersion.cmake.in
index af78034..6859bc4 100644
--- a/cmake/modules/LibkolabxmlConfigVersion.cmake.in
+++ b/cmake/modules/LibkolabxmlConfigVersion.cmake.in
@@ -3,9 +3,13 @@
# if the current version is >= requested version.
set(PACKAGE_VERSION @Libkolabxml_VERSION_MAJOR@.@Libkolabxml_VERSION_MINOR@.@Libkolabxml_VERSION_PATCH@)
+set(PACKAGE_VERSION_MAJOR @Libkolabxml_VERSION_MAJOR@)
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else("${PACKAGE_FIND_VERSION}" VERSION_LESS ${PACKAGE_VERSION_MAJOR} )
+ #Major versions are incompatible and require an explicit switch
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
else("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")