From fa3167bb26115f9b7ee959a387e9619301b99586 Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Tue, 25 Jun 2024 15:47:18 -0400 Subject: [PATCH] {cmake} If building as a shared lib, set VERSION & SOVERSION (#304) --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f2cbc9..98263dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,13 +150,21 @@ set_target_properties( E57Format INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF ) -if( NOT DEFINED CMAKE_DEBUG_POSTFIX ) +if ( NOT DEFINED CMAKE_DEBUG_POSTFIX ) set_target_properties( E57Format PROPERTIES DEBUG_POSTFIX "-d" ) endif() +if ( E57_BUILD_SHARED ) + set_target_properties( E57Format + PROPERTIES + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR} + ) +endif() + target_compile_features( ${PROJECT_NAME} PRIVATE cxx_std_14