From c3aba113a2531a779bfa9cfd75d840d61bafd2b3 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 24 Oct 2015 23:06:16 +0300 Subject: [PATCH] Use the -rpath linker option to set the .so search path. --HG-- branch : develop --- src/app/tape/tape.pro | 6 ++++++ src/app/valentina/valentina.pro | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/app/tape/tape.pro b/src/app/tape/tape.pro index 61484bc3a..ce79f6976 100644 --- a/src/app/tape/tape.pro +++ b/src/app/tape/tape.pro @@ -165,6 +165,12 @@ CONFIG(debug, debug|release){ # Path to recource file. win32:RC_FILE = share/resources/tape.rc +unix:!macx{ + # suppress the default RPATH + QMAKE_LFLAGS_RPATH = + QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN\' -Wl,-rpath,$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -Wl,-rpath,$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR}" +} + # When the GNU linker sees a library, it discards all symbols that it doesn't need. # Dependent library go first. diff --git a/src/app/valentina/valentina.pro b/src/app/valentina/valentina.pro index 6e3c5dff8..1a2c031f7 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -2086,6 +2086,12 @@ win32 { copyToDestdir($$pdftops_path, $$shell_path($${OUT_PWD}/$$DESTDIR)) } +unix:!macx{ + # suppress the default RPATH + QMAKE_LFLAGS_RPATH = + QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN\' -Wl,-rpath,$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -Wl,-rpath,$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR}" +} + # When the GNU linker sees a library, it discards all symbols that it doesn't need. # Dependent library go first.