Skip to content

Commit

Permalink
[cmake] Add install library path to rpath
Browse files Browse the repository at this point in the history
This way rpath is correctly set by default, avoiding errors like:
`libneko.so.2: cannot open shared object file` when installing to
/usr/local/
  • Loading branch information
tobil4sk committed Mar 30, 2023
1 parent f633867 commit fdbd096
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ if (RELOCATABLE)
endif()
endif()

set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:${CMAKE_INSTALL_FULL_LIBDIR}")

if(UNIX AND NOT APPLE)
add_definitions(-DABI_ELF)
endif()
Expand Down

0 comments on commit fdbd096

Please sign in to comment.