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>
pull/37/head
Slávek Banko 5 years ago
parent 48b1e42b64
commit e22f5ace4a
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -939,8 +939,22 @@ macro( tde_add_library _arg_target )
get_target_property( _soversion ${_target} SOVERSION ) get_target_property( _soversion ${_target} SOVERSION )
set( _soname "${_soname}.${_soversion}" ) set( _soname "${_soname}.${_soversion}" )
endif( ) endif( )
add_custom_command( TARGET ${_target} POST_BUILD if( NOT _exclude_from_all )
COMMAND ln -s ${_soname} "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}" ) 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} ) install( FILES "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}" DESTINATION ${_destination} )
endif( ) endif( )

Loading…
Cancel
Save