Skip to content

Commit

Permalink
{cmake} If building as a shared lib, set VERSION & SOVERSION (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
asmaloney authored Jun 25, 2024
1 parent f789741 commit fa3167b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa3167b

Please sign in to comment.