forked from orocos-toolchain/rtt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
orocos-rtt-config-version.cmake.in
26 lines (22 loc) · 1.07 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
########################################################################################################################
#
# CMake version file for the OrocosRTT 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(@RTT_VERSION@ VERSION_EQUAL PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
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()