From cdacb2dc448e07c7d1375281ff6cef07532ab8ae Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Wed, 8 Apr 2020 10:27:37 +1200 Subject: [PATCH] Make it possible to run a debug version of OpenCOR from within Qt Creator. --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23da942391..b049a4efcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -592,6 +592,13 @@ elseif(NOT WIN32) set(CMAKE_SKIP_RPATH TRUE) set(LINK_RPATH_FLAG "-Wl,-rpath,'$ORIGIN/../lib'") + + if(NOT RELEASE_MODE) + set(LINK_RPATH_FLAG "${LINK_RPATH_FLAG} -Wl,-rpath,'$ORIGIN/lib'") + # Note: this makes it possible to run a debug version of OpenCOR from + # within Qt Creator... + endif() + set(LINK_FLAGS_PROPERTIES "${LINK_FLAGS_PROPERTIES} -Wl,-rpath-link,${QT_LIBRARY_DIR} ${LINK_RPATH_FLAG}") endif()