summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/test_widgets_app_deployment
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2022-09-29 13:06:12 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2022-10-15 13:00:04 +0200
commit5430fb22439db9fc1ad1df4cbf0319b63346b0a5 (patch)
tree4c25135c0fb476dbb36bb2601d094d42b3e4b638 /tests/auto/cmake/test_widgets_app_deployment
parent5ca714318c4b0c02f3b9ef98c5fc1c948c35219e (diff)
CMake: Set RPATH of deployed plugins on Linux
When deploying into some directory structure where CMAKE_INSTALL_LIBDIR is different from Qt's lib dir, we need to set the RPATH of installed plugins such that Qt libraries are found. We do this using CMake's undocumented file(RPATH_SET) command and pray that this command is safe to use across current and future CMake versions. For CMake versions < 3.21, we use patchelf, which must be installed on the host system. The adjustment of rpaths can be turned on explicitly by setting QT_DEPLOY_FORCE_ADJUST_RPATHS to ON. The usage of patchelf can be forced by setting QT_DEPLOY_USE_PATCHELF to ON regardless of the CMake version. Change-Id: I62ced496b4c12bf6d46735d2af7ff35130148acb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/auto/cmake/test_widgets_app_deployment')
-rw-r--r--tests/auto/cmake/test_widgets_app_deployment/CMakeLists.txt2
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/auto/cmake/test_widgets_app_deployment/CMakeLists.txt b/tests/auto/cmake/test_widgets_app_deployment/CMakeLists.txt
index 9a0c4e8af1..60e3f0af75 100644
--- a/tests/auto/cmake/test_widgets_app_deployment/CMakeLists.txt
+++ b/tests/auto/cmake/test_widgets_app_deployment/CMakeLists.txt
@@ -5,8 +5,6 @@ cmake_minimum_required(VERSION 3.16)
project(deployment_api)
enable_testing()
-set(CMAKE_INSTALL_LIBDIR lib) ### temporary hack to make the test pass - remove in next commit!
-
find_package(Qt6 COMPONENTS REQUIRED Widgets Test)
qt6_standard_project_setup()