2013-08-26 07:44:03 -05:00
|
|
|
if (CMAKE_COMPILER_IS_GNUCC)
|
2014-10-09 13:13:04 -05:00
|
|
|
option (USE_RUNPATH "Embed original dependency paths in installed library" ON)
|
2013-08-26 07:44:03 -05:00
|
|
|
if (USE_RUNPATH)
|
|
|
|
set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
|
|
|
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
|
|
|
endif (USE_RUNPATH)
|
|
|
|
else()
|
|
|
|
set(USE_RUNPATH OFF)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
macro( add_runpath target )
|
2014-10-09 13:13:04 -05:00
|
|
|
if(NOT ERT_MAC)
|
|
|
|
set_target_properties( ${target} PROPERTIES LINK_FLAGS -Wl,--enable-new-dtags)
|
|
|
|
endif()
|
2013-08-26 07:44:03 -05:00
|
|
|
endmacro()
|