From 847edf4548f0e7d37cd488f70f4d214c9c7ab679 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Mon, 30 Aug 2021 10:01:38 +0200 Subject: [PATCH] Set VERSION and SOVERSION for shared libraries Required by the RPM builds for Fedora: https://src.fedoraproject.org/rpms/soundtouch/c/b7c49ac11561709631663fd35ce90b92aa6f3d87 --- CMakeLists.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa688fa..0f1108b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,8 +38,19 @@ target_include_directories(SoundTouch PUBLIC target_compile_definitions(SoundTouch PRIVATE ${COMPILE_DEFINITIONS}) target_compile_options(SoundTouch PRIVATE ${COMPILE_OPTIONS}) -if(WIN32 AND BUILD_SHARED_LIBS) - set_target_properties(SoundTouch PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) +if(BUILD_SHARED_LIBS) + set_target_properties(SoundTouch PROPERTIES + VERSION ${CMAKE_PROJECT_VERSION} + ) + if(WIN32) + set_target_properties(SoundTouch PROPERTIES + WINDOWS_EXPORT_ALL_SYMBOLS TRUE + ) + else() + set_target_properties(SoundTouch PROPERTIES + SOVERSION ${PROJECT_VERSION_MAJOR} + ) + endif() endif() option(INTEGER_SAMPLES "Use integers instead of floats for samples" OFF)