mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 22:49:32 +03:00

This is a cross-platform usability improvement. On Unix platforms it is customary for library to have VERSION and SOVERSION, where SOVERSION changes on major API changes and VERSION is the same as project's version, so library users always know what vesion this library belongs to just by name. With this patch we have a proper libmimalloc.so.VERSION on Unix.
19 lines
680 B
CMake
19 lines
680 B
CMake
set(mi_version_major 1)
|
|
set(mi_version_minor 7)
|
|
set(mi_version_patch 3)
|
|
set(mi_version ${mi_version_major}.${mi_version_minor}.${mi_version_patch})
|
|
|
|
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)
|
|
elseif("${PACKAGE_FIND_VERSION_MINOR}" LESS "${mi_version_minor}")
|
|
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
|
else()
|
|
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
|
endif()
|
|
else()
|
|
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
|
endif()
|
|
endif()
|