Skip to content

Commit

Permalink
cmake: Use fixed SOVERSION everywhere
Browse files Browse the repository at this point in the history
We missed a spot when freezing the SOVERSION to 30 after we flipped to
31 causing builds to break.
  • Loading branch information
kkartaltepe authored and Lain-B committed Oct 5, 2024
1 parent e6d9f73 commit cc36ccd
Showing 1 changed file with 6 additions and 5 deletions.
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

0 comments on commit cc36ccd

Please sign in to comment.