From f4442c07a7b3ce23e1e883ddde011be8e28b5cac Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Wed, 27 Sep 2023 17:54:02 -0400 Subject: [PATCH] xo-cmake: xo_toplevel_compile_options ++ set CMAKE_INSTALL_RPATH --- cmake/xo_cxx.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/xo_cxx.cmake b/cmake/xo_cxx.cmake index e435de55..2307b06f 100644 --- a/cmake/xo_cxx.cmake +++ b/cmake/xo_cxx.cmake @@ -26,6 +26,11 @@ macro(xo_toplevel_compile_options) else() set(XO_COMPILE_OPTIONS ${XO_STANDARD_COMPILE_OPTIONS}) endif() + + if(NOT CMAKE_INSTALL_RPATH) + set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib CACHE STRING + "runpath in installed libraries/executables") + endif() endif() # ----------------------------------------------------------------