summaryrefslogtreecommitdiffstats
path: root/external/meta-iot-cloud/recipes-azure/azure-uhttp-c/files/Fix-packaging-issues.patch
blob: cc156dec92574b48a9330f51e19a759c87e18753 (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
From a98a0f1ac661d3c3f85030883403615e18f58e42 Mon Sep 17 00:00:00 2001
From: Scott Ware <scott.r.ware@intel.com>
Date: Mon, 27 Apr 2020 21:11:25 +0100
Subject: [PATCH] Fix packaging issues

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 27eae0b..ab0e6ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,9 @@ project(uhttp)
 
 set(UHTTP_VERSION 1.0.1)
 
+set(GENERIC_LIB_VERSION ${UHTTP_VERSION})
+string(SUBSTRING ${UHTTP_VERSION} 0 1 GENERIC_LIB_SOVERSION)
+
 option(run_e2e_tests "set run_e2e_tests to ON to run e2e tests (default is OFF)" OFF)
 option(run_unittests "set run_unittests to ON to run unittests (default is OFF)" OFF)
 option(skip_samples "set skip_samples to ON to skip building samples (default is OFF)[if possible, they are always built]" OFF)
@@ -128,6 +131,14 @@ add_library(uhttp ${uhttp_c_files} ${uhttp_h_files})
 setTargetBuildProperties(uhttp)
 target_link_libraries(uhttp aziotsharedutil)
 
+if (NOT WIN32)
+    set_target_properties(uhttp
+        PROPERTIES
+        VERSION ${GENERIC_LIB_VERSION}
+        SOVERSION ${GENERIC_LIB_SOVERSION}
+    )
+endif()
+
 if (${run_unittests})
     #include("dependencies-test.cmake")
     add_subdirectory(tests)
-- 
2.7.4