From 6d4f27f3bc8050109702eb6f7b5bda26ff0434bb Mon Sep 17 00:00:00 2001
From: Amin Bandali <amin.bandali@savoirfairelinux.com>
Date: Thu, 25 Mar 2021 09:41:25 -0400
Subject: [PATCH] cmake: always set CMAKE_INSTALL_RPATH_USE_LINK_PATH to true

To help make sure Qt libraries are always in the runpath, even when
building with our own Qt.

Change-Id: Iccae0a6f12d1fe3d478c8cac2d603cc80e244bb2
---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2aabcff7..697c9df0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -90,7 +90,6 @@ if(QT5_VER AND QT5_PATH)
       find_package(Qt5 ${QT5_VER}
                   COMPONENTS LinguistTools
                   PATHS ${QT5_PATH} NO_DEFAULT_PATH)
-      set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true)
    endif()
 else()
    find_package(Qt5 REQUIRED
@@ -513,6 +512,8 @@ SET(libringclient_PRIVATE_HDRS
    src/private/videorenderer_p.h
 )
 
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true)
+
 
 IF(${ENABLE_LIBWRAP} MATCHES true AND ${ENABLE_TEST} MATCHES false)
    SET(libringclient_PRIVATE_HDRS
-- 
GitLab