-
Notifications
You must be signed in to change notification settings - Fork 80
/
orocos-rtt-config-version.cmake.in
32 lines (28 loc) · 1.31 KB
/
orocos-rtt-config-version.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
########################################################################################################################
#
# CMake version file for the Orocos-RTT package.
# This script checks whether the requested version matches exactly or is compatible with the installed package version.
#
# This script sets the following variables:
# PACKAGE_VERSION: Full provided version string
# PACKAGE_VERSION_COMPATIBLE: True if version is compatible
# PACKAGE_VERSION_EXACT: True if version is exact match
#
########################################################################################################################
# Version string
set(PACKAGE_VERSION @RTT_VERSION@)
# Exact match test
if(PACKAGE_FIND_VERSION_MAJOR EQUAL "@RTT_VERSION_MAJOR@")
if(PACKAGE_FIND_VERSION_MINOR EQUAL "@RTT_VERSION_MINOR@" OR
PACKAGE_FIND_VERSION_COUNT LESS "2")
if(PACKAGE_FIND_VERSION_PATCH EQUAL "@RTT_VERSION_PATCH@" OR
PACKAGE_FIND_VERSION_COUNT LESS "3")
set(PACKAGE_VERSION_EXACT 1)
endif()
endif()
endif()
# Compatible version test
if(NOT "@RTT_VERSION@" VERSION_LESS PACKAGE_FIND_VERSION AND # Installed version can't be lower than requested one
"@RTT_VERSION_MAJOR@" EQUAL PACKAGE_FIND_VERSION_MAJOR) # ...and major versions must coincide
set(PACKAGE_VERSION_COMPATIBLE TRUE)
endif()