CMakeLists: add support for including ABIVERSION in the library version number
authorFelix Fietkau <nbd@nbd.name>
Mon, 20 Jan 2025 21:05:19 +0000 (22:05 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 20 Jan 2025 21:05:19 +0000 (22:05 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
CMakeLists.txt

index dd27233ce1af1607414946cbffd849edc909ec66..6b4c000625ec43b046fedf601e191540d19b89a9 100644 (file)
@@ -36,6 +36,10 @@ ADD_LIBRARY(uci SHARED ${LIB_SOURCES})
 SET_TARGET_PROPERTIES(uci PROPERTIES OUTPUT_NAME uci)
 TARGET_LINK_LIBRARIES(uci ${ubox})
 
+IF(ABIVERSION)
+  SET_TARGET_PROPERTIES(uci PROPERTIES VERSION ${ABIVERSION})
+ENDIF()
+
 ADD_LIBRARY(uci-static STATIC ${LIB_SOURCES})
 SET_TARGET_PROPERTIES(uci-static PROPERTIES OUTPUT_NAME uci)
 TARGET_LINK_LIBRARIES(uci-static ${ubox-static})