summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2013-10-28 09:53:48 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2013-10-28 09:53:48 (GMT)
commit6e04ed5e0b0e22a48d19cee342ed82671501b5e1 (patch)
tree67827f8281fddd17fc350ff57753c7e75a940bc8
parentcbf4dcc16b219658fde8bc6f9cf91cd11243e931 (diff)
downloadlibkolabxml-6e04ed5e0b0e22a48d19cee342ed82671501b5e1.tar.gz
Make major version bumps incompatible so an explicit switch is required.
The sources are not compatible so it's not a good idea to satisfy a <1.0 dependency with >=1.0 libkolabxml.
-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}")