Skip to content

Commit

Permalink
Fix install library runtime path for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyLebedev authored and AnarManafov committed Feb 15, 2021
1 parent f30c3ce commit 1b8e4f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,10 @@ set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${PROJECT_INSTALL_LIBDIR}")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${PROJECT_INSTALL_LIBDIR}" isSystemDir)
list(FIND "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}" "${CMAKE_INSTALL_FULL_LIBDIR}" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${PROJECT_INSTALL_LIBDIR}")
message(STATUS "Using full rpath: ${CMAKE_INSTALL_FULL_LIBDIR}")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
endif()

#
Expand Down

0 comments on commit 1b8e4f6

Please sign in to comment.