Fork me on GitHub

Changeset 8e7beb7 in git for CMakeLists.txt


Ignore:
Timestamp:
Feb 16, 2017, 2:44:26 PM (8 years ago)
Author:
Simon Spannagel <simon.spannagel@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
84d3193
Parents:
9259bfe
Message:

Set RPATH for installed libraries for all non-system paths.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r9259bfe r8e7beb7  
    55set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DDROP_CGAL")
    66set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
     7
     8# Set up the RPATH so executables find the libraries even when installed in non-default location
     9SET(CMAKE_MACOSX_RPATH 1)
     10SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
     11SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
     12SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
     13
     14# Add the automatically determined parts of the RPATH which point to directories outside
     15# the build tree to the install RPATH
     16SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
     17
     18# the RPATH to be used when installing, but only if it's not a system directory
     19LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
     20IF("${isSystemDir}" STREQUAL "-1")
     21   SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
     22ENDIF("${isSystemDir}" STREQUAL "-1")
    723
    824# Declare ROOT dependency
Note: See TracChangeset for help on using the changeset viewer.