From: Felix Fietkau Date: Mon, 15 Feb 2021 18:11:58 +0000 (+0100) Subject: cmake: add a possibility to set library version X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2537be01858710e714c329153760c64fe3f8a73e;p=project%2Fubus.git 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 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 117f0a3..a65ccbb 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