Set RPATH to install location, for #87.

This commit is contained in:
Valient Gough 2015-06-17 22:28:22 -07:00
parent 6700a76c0d
commit 31e302cb4a

View File

@ -72,6 +72,7 @@ set (CPACK_SOURCE_IGNORE_FILES
"/build/") "/build/")
include (CPack) include (CPack)
# Compile-time configuration.
configure_file (${CMAKE_SOURCE_DIR}/config.h.cmake configure_file (${CMAKE_SOURCE_DIR}/config.h.cmake
${CMAKE_BINARY_DIR}/config.h) ${CMAKE_BINARY_DIR}/config.h)
@ -118,6 +119,9 @@ target_link_libraries(encfs
) )
install (TARGETS encfs DESTINATION lib) install (TARGETS encfs DESTINATION lib)
# Set RPATH to library install path.
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
add_executable (encfs-bin encfs/main.cpp) add_executable (encfs-bin encfs/main.cpp)
target_link_libraries (encfs-bin encfs) target_link_libraries (encfs-bin encfs)
set_target_properties (encfs-bin PROPERTIES OUTPUT_NAME "encfs") set_target_properties (encfs-bin PROPERTIES OUTPUT_NAME "encfs")