summaryrefslogtreecommitdiffstats
path: root/external/meta-iot-cloud/recipes-azure/azure-c-shared-utility/files/Fix-packaging-issues.patch
blob: eaa89963c4acafc32daa77dcc4dd1573d985649f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From b26fc183207b583d5fb7f60015bb46752cd60706 Mon Sep 17 00:00:00 2001
From: Scott Ware <scott.r.ware@intel.com>
Date: Tue, 7 Apr 2020 20:55:05 +0100
Subject: [PATCH 1/2] Fix packaging issues

Signed-off-by: Scott Ware <scott.r.ware@intel.com>
---
 CMakeLists.txt | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 263974b..5251ffe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,9 @@ project(azure_c_shared_utility)
 
 FILE(READ ${CMAKE_CURRENT_LIST_DIR}/version.txt C_SHARED_VERSION)
 
+set(GENERIC_LIB_VERSION ${C_SHARED_VERSION})
+string(SUBSTRING ${C_SHARED_VERSION} 0 1 GENERIC_LIB_SOVERSION)
+
 # Include the common build rules for the C SDK
 include(configs/azure_iot_build_rules.cmake)
 
@@ -487,7 +490,14 @@ if(${build_as_dynamic})
         ${source_h_files}
         ${def_files}
     )
-    set_target_properties(aziotsharedutil_dll PROPERTIES OUTPUT_NAME "aziotsharedutil_dll")
+    if (NOT WIN32)
+        set_target_properties(aziotsharedutil_dll
+            PROPERTIES
+            OUTPUT_NAME "aziotsharedutil"
+            VERSION ${GENERIC_LIB_VERSION}
+            SOVERSION ${GENERIC_LIB_SOVERSION}
+        )
+    endif ()
 endif()
 
 set(aziotsharedutil_target_libs)
-- 
2.7.4