Skip to content

Commit

Permalink
Merge branch 'toolchain-2.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
meyerj committed Nov 11, 2016
2 parents 9c46c95 + 56b671c commit 58edb89
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions orocos-rtt-config-version.cmake.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
########################################################################################################################
#
# CMake version file for the OrocosRTT package.
# 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:
Expand All @@ -14,13 +14,19 @@
set(PACKAGE_VERSION @RTT_VERSION@)

# Exact match test
if(@RTT_VERSION@ VERSION_EQUAL PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
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
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()

0 comments on commit 58edb89

Please sign in to comment.