Browse Source

Create symlink for base soname for libraries with release number in the name

as a separate target instead of POST_BUILD command. This prevents the
command from being executed multiple times and thus FTBFS.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit e22f5ace4a)
r14.0.x r14.0.8
Slávek Banko 2 years ago
parent
commit
ca47fa8330
No known key found for this signature in database GPG Key ID: 608F5293A04BE668
  1. 18
      modules/TDEMacros.cmake

18
modules/TDEMacros.cmake

@ -939,8 +939,22 @@ macro( tde_add_library _arg_target )
get_target_property( _soversion ${_target} SOVERSION )
set( _soname "${_soname}.${_soversion}" )
endif( )
add_custom_command( TARGET ${_target} POST_BUILD
COMMAND ln -s ${_soname} "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}" )
if( NOT _exclude_from_all )
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}"
COMMAND ln -s ${_soname} "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}"
DEPENDS ${_target}
)
add_custom_target(
${_target}+base-so ALL
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}"
)
else( )
add_custom_command(
TARGET ${_target} POST_BUILD
COMMAND ln -s ${_soname} "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}"
)
endif( )
install( FILES "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}" DESTINATION ${_destination} )
endif( )

Loading…
Cancel
Save