Merge pull request #304 from isanych/do_not_require_version

Do not require to specify version for cmake find_package
This commit is contained in:
Daan 2020-09-14 09:08:05 -07:00 committed by GitHub
commit 8ede0f9ba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ set(mi_version_minor 6)
set(mi_version ${mi_version_major}.${mi_version_minor})
set(PACKAGE_VERSION ${mi_version})
if(PACKAGE_FIND_VERSION_MAJOR)
if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "${mi_version_major}")
if ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL "${mi_version_minor}")
set(PACKAGE_VERSION_EXACT TRUE)
@ -14,3 +15,4 @@ if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "${mi_version_major}")
else()
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()
endif()