From fde98f7794517adab71e6acdba35039a9c74a4fe Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 28 Aug 2020 08:59:03 +0200 Subject: [PATCH] CMake: Fix rpath for Qt internal applications (non-bootstrapped tools) We need to call qt_apply_rpaths for targets that are created with qt_internal_add_app too. This is in line with what qt_app.prf does. Task-number: QTBUG-85399 Change-Id: If5ffb05cca191c6cae9a330e1f4556d342a68ff8 Reviewed-by: Assam Boudjelthia --- cmake/QtAppHelpers.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/QtAppHelpers.cmake b/cmake/QtAppHelpers.cmake index 0c99356db3..f0a300b880 100644 --- a/cmake/QtAppHelpers.cmake +++ b/cmake/QtAppHelpers.cmake @@ -40,6 +40,10 @@ function(qt_internal_add_app target) qt_internal_add_target_aliases("${target}") _qt_internal_apply_strict_cpp("${target}") + if(NOT arg_NO_INSTALL) + qt_apply_rpaths(TARGET "${target_name}" INSTALL_PATH "${INSTALL_BINDIR}" RELATIVE_RPATH) + endif() + # To mimic the default behaviors of qt_app.prf, we by default enable GUI Windows applications, # but don't enable macOS bundles. # Bundles are enabled in a separate set_target_properties call if an Info.plist file