From 0d97421370d1c52d0db798134420796a960df743 Mon Sep 17 00:00:00 2001
From: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Date: Thu, 1 Oct 2015 17:31:36 +0300
Subject: [PATCH 1/3] cmake: Set library version

Upstream-Status: Pending
Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f40eaa6..cb089a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,6 +21,7 @@ INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS})
 SET(SOURCES avl.c avl-cmp.c blob.c blobmsg.c uloop.c usock.c ustream.c ustream-fd.c vlist.c utils.c safe_list.c runqueue.c md5.c kvlist.c ulog.c base64.c udebug.c udebug-remote.c)
 
 ADD_LIBRARY(ubox SHARED ${SOURCES})
+SET_TARGET_PROPERTIES(ubox PROPERTIES VERSION 1.0.1 SOVERSION 1)
 ADD_LIBRARY(ubox-static STATIC ${SOURCES})
 SET_TARGET_PROPERTIES(ubox-static PROPERTIES OUTPUT_NAME ubox)
 
@@ -65,6 +66,7 @@ find_library(json NAMES json-c)
 IF(EXISTS ${json})
 	ADD_LIBRARY(blobmsg_json SHARED blobmsg_json.c)
 	TARGET_LINK_LIBRARIES(blobmsg_json ubox ${json})
+	SET_TARGET_PROPERTIES(blobmsg_json PROPERTIES VERSION 1.0.1 SOVERSION 1)
 
 	ADD_LIBRARY(blobmsg_json-static STATIC blobmsg_json.c)
 	SET_TARGET_PROPERTIES(blobmsg_json-static
@@ -78,6 +80,7 @@ IF(EXISTS ${json})
 	TARGET_LINK_LIBRARIES(jshn blobmsg_json ${json})
 
 	ADD_LIBRARY(json_script SHARED json_script.c)
+	SET_TARGET_PROPERTIES(json_script PROPERTIES VERSION 1.0.1 SOVERSION 1)
 	TARGET_LINK_LIBRARIES(json_script ubox)
 
 	INSTALL(TARGETS blobmsg_json blobmsg_json-static jshn json_script
