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