diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-11-05 23:06:02 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-11-05 23:06:02 (GMT) |
commit | c0108d1e07903af49c136217026a2fca082fbb1f (patch) | |
tree | e68975e20784b913988f2b33271e6f3d0f91a7c7 /CMakeLists.txt | |
parent | d65adbe260316f24dde7280574efb192e417a3d0 (diff) | |
download | CMake-c0108d1e07903af49c136217026a2fca082fbb1f.zip CMake-c0108d1e07903af49c136217026a2fca082fbb1f.tar.gz CMake-c0108d1e07903af49c136217026a2fca082fbb1f.tar.bz2 |
COMP: use RPATH is building QtDialog and the Qt libs are not in /lib or
/usr/lib (same logic as for ccmake)
Alex
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
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) |