Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Use fixed SOVERSION everywhere #11345

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions cmake/linux/helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function(set_target_properties_obs target)
endwhile()

get_target_property(target_type ${target} TYPE)
set(OBS_SOVERSION 30)

if(target_type STREQUAL EXECUTABLE)
install(TARGETS ${target} RUNTIME DESTINATION "${OBS_EXECUTABLE_DESTINATION}" COMPONENT Runtime)
Expand Down Expand Up @@ -59,8 +60,8 @@ function(set_target_properties_obs target)
set_target_properties(
${target}
PROPERTIES
VERSION 30
SOVERSION 30
VERSION ${OBS_SOVERSION}
SOVERSION ${OBS_SOVERSION}
BUILD_RPATH "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}"
INSTALL_RPATH "${OBS_LIBRARY_RPATH}"
)
Expand Down Expand Up @@ -96,7 +97,7 @@ function(set_target_properties_obs target)
POST_BUILD
COMMAND
"${CMAKE_COMMAND}" -E create_symlink
"$<TARGET_FILE_PREFIX:${target}>$<TARGET_FILE_BASE_NAME:${target}>.so.${OBS_VERSION_MAJOR}"
"$<TARGET_FILE_PREFIX:${target}>$<TARGET_FILE_BASE_NAME:${target}>.so.${OBS_SOVERSION}"
"$<TARGET_FILE_PREFIX:${target}>$<TARGET_FILE_BASE_NAME:${target}>.so.0"
COMMAND
"${CMAKE_COMMAND}" -E copy_if_different
Expand All @@ -107,13 +108,13 @@ function(set_target_properties_obs target)
endif()
elseif(target_type STREQUAL MODULE_LIBRARY)
if(target STREQUAL obs-browser)
set_target_properties(${target} PROPERTIES VERSION 0 SOVERSION 30)
set_target_properties(${target} PROPERTIES VERSION 0 SOVERSION ${OBS_SOVERSION})
else()
set_target_properties(
${target}
PROPERTIES
VERSION 0
SOVERSION 30
SOVERSION ${OBS_SOVERSION}
BUILD_RPATH "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}"
INSTALL_RPATH "${OBS_MODULE_RPATH}"
)
Expand Down
Loading