Skip to content

Commit

Permalink
BUILD: Add CMake option -DSWIPL_SO_VERSIONS to remove SOVERSION prope…
Browse files Browse the repository at this point in the history
…rties.
  • Loading branch information
rmanhaeve authored and JanWielemaker committed Dec 13, 2024
1 parent cb768e8 commit 3e4d7ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ endif()
option(SWIPL_SHARED_LIB
"Put kernel in a shared library"
ON)
option(SWIPL_SO_VERSIONS
"Set the version properties of libswipl"
ON)
option(SWIPL_VERSIONED_DIR
"Install into a versioned directory"
OFF)
Expand Down
17 changes: 11 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -466,12 +466,17 @@ function(libswipl_properties lib outname)
else()
set(LIB_PREFIX)
endif()

set_target_properties(${lib} PROPERTIES
OUTPUT_NAME ${LIB_PREFIX}${outname}
VERSION ${SWIPL_VERSION_STRING}
SOVERSION ${SWIPL_VERSION_MAJOR}
GNUtoMS ON)
if(SWIPL_SO_VERSIONS)
set_target_properties(${lib} PROPERTIES
OUTPUT_NAME ${LIB_PREFIX}${outname}
VERSION ${SWIPL_VERSION_STRING}
SOVERSION ${SWIPL_VERSION_MAJOR}
GNUtoMS ON)
else()
set_target_properties(${lib} PROPERTIES
OUTPUT_NAME ${LIB_PREFIX}${outname}
GNUtoMS ON)
endif()
target_include_directories(${lib} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/os>
Expand Down

0 comments on commit 3e4d7ca

Please sign in to comment.