diff options
author | Slávek Banko <[email protected]> | 2025-01-13 22:03:57 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2025-01-13 22:03:57 +0100 |
commit | e1b441631c31d8ab9269bd44d1a992af6424ccdd (patch) | |
tree | 50ef081d842e738b2dd1aeaa1024244dabd070d6 | |
parent | 3d5ccbd203d06e6d57f827bdbc9af67c9702ab48 (diff) | |
download | tde-cmake-master.tar.gz tde-cmake-master.zip |
because it is resistant to repeated calls.
This solves FTBFS with CMake >= 3.11, because in the case of update
a library file, as a result of a tdelfeditor call, this will cause
repeated calls for targets that are dependent on the library.
As a result, it is now possible to use call based on POST_BUILD,
and there is no need to distinguish the way of calling created in
the commit e22f5ace4a1eae9b299a8b8c60ceb339c73a2e3c.
Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r-- | modules/TDEMacros.cmake | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index b0de2d0..fa1ad61 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -1263,22 +1263,12 @@ macro( tde_add_library _arg_target ) get_target_property( _soversion ${_target} SOVERSION ) set( _soname "${_soname}.${_soversion}" ) endif( ) - 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( ) + add_custom_command( + TARGET ${_target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E create_symlink + "${_soname}" + "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}" + ) install( FILES "${CMAKE_CURRENT_BINARY_DIR}/${_soname_base}" DESTINATION ${_destination} ) endif( ) |