-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVersion.cmake
56 lines (48 loc) · 1.36 KB
/
Version.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
# Copyright (C) 2018-2025 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()
# 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.
#
function(setVersion maj min rev)
if (APPLE)
return()
endif()
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()