diff options
author | Petr Štetiar <ynezz@true.cz> | 2020-01-11 00:00:04 +0300 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2020-01-20 18:54:10 +0300 |
commit | b0886a37f39a4957005fadc3317ab50ccbcca626 (patch) | |
tree | 3527cf1dad12e8fd71fe3b013451477fbeb5735c /CMakeLists.txt | |
parent | a36ee96618a9613c234d1f4404769becdf5c55e3 (diff) |
cmake: add a possibility to set library version
Add a new `ABIVERSION` define which allows to control the SOVERSION used
for the built shared library. This is needed for downstream packaging to
properly track breaking ABI changes when updating to newer versions of
the library.
Suggested-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dcd455c..1a1b7d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,3 +92,9 @@ IF(EXISTS ${json}) ) ENDIF() + +IF(ABIVERSION) + SET_TARGET_PROPERTIES(ubox PROPERTIES VERSION ${ABIVERSION}) + SET_TARGET_PROPERTIES(json_script PROPERTIES VERSION ${ABIVERSION}) + SET_TARGET_PROPERTIES(blobmsg_json PROPERTIES VERSION ${ABIVERSION}) +ENDIF() |