summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 43d6e77..94c3c30 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -411,6 +411,14 @@ IF(BUILD_CursesDialog)
ENDIF(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64")
ENDIF(BUILD_CursesDialog)
+IF(BUILD_QtDialog)
+ SET(QT_NEED_RPATH FALSE)
+ IF(NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64")
+ SET(QT_NEED_RPATH TRUE)
+ ENDIF(NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64")
+ENDIF(BUILD_QtDialog)
+
+
# The same might be true on other systems for other libraries if
# CMAKE_USE_SYSTEM_XMLRPC or other variables like this are enabled.
# Then only enable RPATH if we have are building at least with cmake 2.4,
@@ -419,13 +427,13 @@ ENDIF(BUILD_CursesDialog)
# the build tree, which is both the build and the install RPATH.
IF (UNIX AND "${CMAKE_MAJOR_VERSION}${CMAKE_MINOR_VERSION}" GREATER 23)
IF( CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB
- OR CMAKE_USE_SYSTEM_EXPAT OR CMAKE_USE_SYSTEM_XMLRPC OR CURSES_NEED_RPATH)
+ OR CMAKE_USE_SYSTEM_EXPAT OR CMAKE_USE_SYSTEM_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH)
SET(CMAKE_SKIP_RPATH OFF CACHE INTERNAL "CMake built with RPATH.")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
MESSAGE(STATUS "Enabling RPATH")
ENDIF(CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB
- OR CMAKE_USE_SYSTEM_EXPAT OR CMAKE_USE_SYSTEM_XMLRPC OR CURSES_NEED_RPATH)
+ OR CMAKE_USE_SYSTEM_EXPAT OR CMAKE_USE_SYSTEM_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH)
ENDIF (UNIX AND "${CMAKE_MAJOR_VERSION}${CMAKE_MINOR_VERSION}" GREATER 23)