diff options
author | Garrett D'Amore <garrett@damore.org> | 2016-09-07 23:47:42 -0700 |
---|---|---|
committer | Garrett D'Amore <garrett@damore.org> | 2016-11-22 17:38:33 -0800 |
commit | c52f1bedca6b72fb31b473929d99f2fe90a13445 (patch) | |
tree | ac701a0cdab761c165daa252852c33a165aef74d | |
parent | 0665fb4b2e3b887e608282ff09cd5fcac0c9ba5b (diff) | |
download | nanomsg-c52f1bedca6b72fb31b473929d99f2fe90a13445.tar.gz |
fixes #798 error while loading shared libraries
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d728788..4483e43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,12 @@ if (POLICY CMP0042) cmake_policy (SET CMP0042 NEW) endif () +set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +list (FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" isSystemDir) +if ("${isSystemDir}" STREQUAL "-1") + set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") +endif ("${isSystemDir}" STREQUAL "-1") + set (NN_DESCRIPTION "High-Performance Scalability Protocols") set (ISSUE_REPORT_MSG "Please consider opening an issue at https://github.com/nanomsg/nanomsg") |