summaryrefslogtreecommitdiff
path: root/cmake/modules/LibkolabxmlConfigVersion.cmake.in
blob: c311b70a123780d919d0b7b26f4d47b9cb780736 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Sets PACKAGE_VERSION_EXACT if the current version string and the requested
# version string are exactly the same and it sets PACKAGE_VERSION_COMPATIBLE
# 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)
elseif(NOT "${PACKAGE_FIND_VERSION_MAJOR}" VERSION_EQUAL "${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}")
      set(PACKAGE_VERSION_EXACT TRUE)
   endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
endif("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )