Use tde_install_symlink to create symlink during installation,

instead of calling add_custom_command, add_custom_target and install.

This not only simplifies the code, but prevents the problem of repeated
starting of the 'ln' command with CMake >= 3.31, which led to FTBFS.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit e617b844b5)
r14.1.x
Slávek Banko 1 week ago
parent 97297061e6
commit 61f9661dc2
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -66,20 +66,7 @@ tde_add_executable( kmymoney2 AUTOMOC
DESTINATION ${BIN_INSTALL_DIR}
)
add_custom_command(
OUTPUT kmymoney
COMMENT "Creating kmymoney symlink"
COMMAND ln -s kmymoney2 kmymoney
DEPENDS kmymoney2
)
add_custom_target( kmymoney-symlink ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/kmymoney
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/kmymoney
DESTINATION ${BIN_INSTALL_DIR}
)
tde_install_symlink( kmymoney2 ${BIN_INSTALL_DIR}/kmymoney )
##### kmymoneytest (test) #######################

Loading…
Cancel
Save