In order to prepare for proper ABI handling in the OpenWrt package of
libnl-tiny, add an option to specify the library SOVERSION value when
invoking CMake.
Let the library SOVERSION default to `1` as first ABI version as the
library is stable and there's been no incompatible changes since it's
inception in 2009.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
socket.c
unl.c
)
+
+SET(SOVERSION 1 CACHE STRING "Override libnl-tiny library version")
+
ADD_LIBRARY(nl-tiny SHARED ${SOURCES})
+SET_TARGET_PROPERTIES(nl-tiny PROPERTIES SOVERSION ${SOVERSION})
+
ADD_LIBRARY(nl-tiny-static STATIC ${SOURCES})
SET_TARGET_PROPERTIES(nl-tiny-static PROPERTIES OUTPUT_NAME nl-tiny)