forked from facebookarchive/RakNet
-
Notifications
You must be signed in to change notification settings - Fork 63
/
slikenet-config-version.cmake.in
36 lines (34 loc) · 1.63 KB
/
slikenet-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
32
33
34
35
36
# Copyright (c) 2019, SLikeSoft UG (haftungsbeschränkt)
#
# This file is licensed under the MIT-style license found in the license.txt
# file in the root directory of this source tree.
set(PACKAGE_VERSION @SLikeNet_VERSION@)
if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "@SLikeNet_VERSION_MAJOR@")
if("${PACKAGE_FIND_VERSION_MINOR}" EQUAL "@SLikeNet_VERSION_MINOR@")
if("${PACKAGE_FIND_VERSION_PATCH}" EQUAL "@SLikeNet_VERSION_PATCH@")
# exactly the required version
set(PACKAGE_VERSION_EXACT TRUE)
else()
# requested x.y.z with x.y.z1 being installed where z1 is != z
# since it's just a patch level change, the version is fully compatible
set(PACKAGE_VERSION_COMPATIBLE TRUE)
endif()
elseif("${PACKAGE_FIND_VERSION_MINOR}" LESS "@SLikeNet_VERSION_MINOR@")
# requested x.y.z with x.y1.z1 being installed where y1 is != y
# the version is compatible, if y1 is > y
if("${PACKAGE_FIND_VERSION_MINOR}" LESS "@SLikeNet_VERSION_MINOR@")
set(PACKAGE_VERSION_COMPATIBLE TRUE)
else()
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()
else()
# requested was x.y.z while we have installed x.y1.z with y1 < y -> not compatbile
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()
elseif("$(PACKAGE_FIND_VERSION_MAJOR)" EQUAL 1 AND "@SLikeNet_VERSION_MAJOR@" EQUAL 0)
# version 0.x.y was requested while we have 1.x.y installed - 1.x.y is backwards compatible with 0.x.y
set(PACKAGE_VERSION_COMPATIBLE TRUE)
else()
# requested was x.y.z while we have installed x1.y.z with x1 != x -> not compatible
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()