From b26fc183207b583d5fb7f60015bb46752cd60706 Mon Sep 17 00:00:00 2001 From: Scott Ware Date: Tue, 7 Apr 2020 20:55:05 +0100 Subject: [PATCH 1/2] Fix packaging issues Signed-off-by: Scott Ware --- 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