diff --git a/cub/cmake/cub-config-version.cmake b/cub/cmake/cub-config-version.cmake index fdfb3d293d..5d9dd5b922 100644 --- a/cub/cmake/cub-config-version.cmake +++ b/cub/cmake/cub-config-version.cmake @@ -20,11 +20,12 @@ set(PACKAGE_VERSION_EXACT FALSE) set(PACKAGE_VERSION_UNSUITABLE FALSE) if(PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION) - if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CUB_VERSION_MAJOR) + if(CUB_VERSION_MAJOR VERSION_EQUAL PACKAGE_FIND_VERSION_MAJOR AND + CUB_VERSION_MINOR VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MINOR) set(PACKAGE_VERSION_COMPATIBLE TRUE) endif() - if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) set(PACKAGE_VERSION_EXACT TRUE) endif() endif()