From 6b690a6d67bab1e5806c8789c65ca48b74371c3d Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Thu, 8 Sep 2022 14:15:30 -0500 Subject: [PATCH 1/2] add versioning to shared libs --- src/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c76a96d528..4b90825064 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -301,7 +301,10 @@ if (ANDROID) target_link_libraries(Catch2 INTERFACE log) endif() -set_target_properties(Catch2 PROPERTIES DEBUG_POSTFIX "d") +set_target_properties(Catch2 PROPERTIES + DEBUG_POSTFIX "d" + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR}) # depend on bunch of C++11 and C++14 features to have C++14 enabled by default target_compile_features(Catch2 @@ -350,6 +353,8 @@ target_link_libraries(Catch2WithMain PUBLIC Catch2) set_target_properties(Catch2WithMain PROPERTIES OUTPUT_NAME "Catch2Main" + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR} ) set_target_properties(Catch2WithMain PROPERTIES DEBUG_POSTFIX "d") From 18271b0562b1846cda17414f4e012a430c4a7c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 4 Oct 2022 14:54:50 +0200 Subject: [PATCH 2/2] Fix SOVERSION --- src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4b90825064..816ab07300 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -304,7 +304,7 @@ endif() set_target_properties(Catch2 PROPERTIES DEBUG_POSTFIX "d" VERSION ${PROJECT_VERSION} - SOVERSION ${PROJECT_VERSION_MAJOR}) + SOVERSION ${PROJECT_VERSION}) # depend on bunch of C++11 and C++14 features to have C++14 enabled by default target_compile_features(Catch2 @@ -354,7 +354,7 @@ set_target_properties(Catch2WithMain PROPERTIES OUTPUT_NAME "Catch2Main" VERSION ${PROJECT_VERSION} - SOVERSION ${PROJECT_VERSION_MAJOR} + SOVERSION ${PROJECT_VERSION} ) set_target_properties(Catch2WithMain PROPERTIES DEBUG_POSTFIX "d")