2019-08-31 18:58:48 +03:00
|
|
|
#
|
2024-12-30 22:37:58 +01:00
|
|
|
# Copyright (C) 2018-2025 QuasarApp.
|
2019-08-31 18:58:48 +03:00
|
|
|
# Distributed under the MIT software license, see the accompanying
|
|
|
|
# Everyone is permitted to copy and distribute verbatim copies
|
|
|
|
# of this license document, but changing it is not allowed.
|
|
|
|
#
|
|
|
|
|
2019-10-05 15:28:00 +03:00
|
|
|
if(DEFINED PROJECT_VERSIONS_SUPPORT)
|
|
|
|
return()
|
|
|
|
else()
|
|
|
|
set(PROJECT_VERSIONS_SUPPORT 1)
|
|
|
|
endif()
|
2019-08-31 18:58:48 +03:00
|
|
|
|
2021-04-20 11:21:22 +03:00
|
|
|
# This module contains function that sets version of the build libraryes.
|
|
|
|
# AVailable function
|
|
|
|
# setVersion - sets version for target with name PROJECT_NAME
|
|
|
|
# arguments :
|
|
|
|
# * maj - are number of majur version
|
|
|
|
# * min - are number of minor version
|
|
|
|
# * rev - are number of review version
|
|
|
|
#
|
|
|
|
# setVersionForTarget - sets version for target with a custom name.
|
|
|
|
# arguments :
|
|
|
|
# * target - are target name of the executable file or library.
|
|
|
|
# * maj - are number of majur version
|
|
|
|
# * min - are number of minor version
|
|
|
|
# * rev - are number of review version
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Note This module is deprecated.
|
|
|
|
#
|
2019-08-31 18:58:48 +03:00
|
|
|
function(setVersion maj min rev)
|
|
|
|
|
2021-12-26 14:11:36 +03:00
|
|
|
if (APPLE)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2019-08-31 18:58:48 +03:00
|
|
|
SET_TARGET_PROPERTIES(
|
|
|
|
${PROJECT_NAME}
|
|
|
|
PROPERTIES
|
|
|
|
VERSION "${maj}.${min}.${rev}"
|
|
|
|
SOVERSION "${maj}.${min}.${rev}"
|
|
|
|
)
|
|
|
|
|
|
|
|
endfunction()
|
2020-10-23 14:10:20 +03:00
|
|
|
|
|
|
|
function(setVersionForTarget TERAGET maj min rev)
|
|
|
|
|
|
|
|
SET_TARGET_PROPERTIES(
|
|
|
|
${TERAGET}
|
|
|
|
PROPERTIES
|
|
|
|
VERSION "${maj}.${min}.${rev}"
|
|
|
|
SOVERSION "${maj}.${min}.${rev}"
|
|
|
|
)
|
|
|
|
|
|
|
|
endfunction()
|