mirror of
https://github.com/QuasarApp/CMake.git
synced 2025-04-27 10:14:40 +00:00
35 lines
749 B
CMake
35 lines
749 B
CMake
#
|
|
# Copyright (C) 2018-2020 QuasarApp.
|
|
# 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.
|
|
#
|
|
|
|
if(DEFINED PROJECT_VERSIONS_SUPPORT)
|
|
return()
|
|
else()
|
|
set(PROJECT_VERSIONS_SUPPORT 1)
|
|
endif()
|
|
|
|
function(setVersion maj min rev)
|
|
|
|
SET_TARGET_PROPERTIES(
|
|
${PROJECT_NAME}
|
|
PROPERTIES
|
|
VERSION "${maj}.${min}.${rev}"
|
|
SOVERSION "${maj}.${min}.${rev}"
|
|
)
|
|
|
|
endfunction()
|
|
|
|
function(setVersionForTarget TERAGET maj min rev)
|
|
|
|
SET_TARGET_PROPERTIES(
|
|
${TERAGET}
|
|
PROPERTIES
|
|
VERSION "${maj}.${min}.${rev}"
|
|
SOVERSION "${maj}.${min}.${rev}"
|
|
)
|
|
|
|
endfunction()
|