diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-02-15 19:11:58 +0100 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2021-06-03 11:44:59 +0200 |
commit | 90fb56c00bbd911d929227528e679b174b1f4cec (patch) | |
tree | a2343b17be80efff4fca0e4b1bc00709d930446e | |
parent | fe029ae0b66b57e9c512396a5d5bca92df7478ff (diff) | |
download | ubus-90fb56c00bbd911d929227528e679b174b1f4cec.tar.gz |
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.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2537be01858710e714c329153760c64fe3f8a73e)
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c0f760..ce7cc3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,10 @@ IF(UNIT_TESTING) ADD_UNIT_TEST_SAN(ubusd_main ubusd-san) ENDIF() +IF(ABIVERSION) + SET_TARGET_PROPERTIES(ubus PROPERTIES VERSION ${ABIVERSION}) +ENDIF() + INSTALL(TARGETS ubus cli ARCHIVE DESTINATION lib LIBRARY DESTINATION lib |