From b0886a37f39a4957005fadc3317ab50ccbcca626 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Fri, 10 Jan 2020 22:00:04 +0100 Subject: [PATCH] cmake: add a possibility to set library version MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Petr Å tetiar --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) 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() -- 2.30.2