set proper CMAKE_INSTALL_RPATH for _caffe.so and tools

This commit is contained in:
Anatoly Baksheev 2015-02-22 19:03:47 +03:00
Родитель a1e951dcf9
Коммит fca05c34c6
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -32,6 +32,11 @@ endif()
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOLEAN "Use link paths for shared library rpath")
set(CMAKE_MACOSX_RPATH TRUE)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES ${CMAKE_INSTALL_PREFIX}/lib __is_systtem_dir)
if(${__is_systtem_dir} STREQUAL -1)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
endif()
# ---[ Funny target
if(UNIX OR APPLE)
add_custom_target(symlink_to_build COMMAND "ln" "-sf" "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/build"