# 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()