Explorar o código

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>
Felix Fietkau %!s(int64=3) %!d(string=hai) anos
pai
achega
2537be0185
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      CMakeLists.txt

+ 4 - 0
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