COMP: use RPATH is building QtDialog and the Qt libs are not in /lib or

/usr/lib (same logic as for ccmake)

Alex
This commit is contained in:
Alexander Neundorf 2007-11-05 18:06:02 -05:00
parent d65adbe260
commit c0108d1e07
1 changed files with 10 additions and 2 deletions

View File

@ -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)