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>
pull/37/head
Slávek Banko 5 months ago
parent
commit
e22f5ace4a
No known key found for this signature in database GPG Key ID: 608F5293A04BE668
1 changed files with 16 additions and 2 deletions
  1. +16
    -2
      modules/TDEMacros.cmake

+ 16
- 2
modules/TDEMacros.cmake View File

@@ -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