From ce8be2385b5fee16859a630fca0c98ad290c8e21 Mon Sep 17 00:00:00 2001 From: yuangongji Date: Mon, 20 Jan 2020 21:17:27 +0800 Subject: [PATCH] cmake: set rpath for libraries on linux --- cmake/AddEventLibrary.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/AddEventLibrary.cmake b/cmake/AddEventLibrary.cmake index 75225500..04f5837e 100644 --- a/cmake/AddEventLibrary.cmake +++ b/cmake/AddEventLibrary.cmake @@ -158,7 +158,8 @@ macro(add_event_library LIB_NAME) "${LIB_NAME}_shared" PROPERTIES OUTPUT_NAME "${LIB_NAME}-${EVENT_PACKAGE_RELEASE}" VERSION "${CURRENT_MINUS_AGE}.${EVENT_ABI_LIBVERSION_AGE}.${EVENT_ABI_LIBVERSION_REVISION}" - SOVERSION "${CURRENT_MINUS_AGE}") + SOVERSION "${CURRENT_MINUS_AGE}" + INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") endif() if (NOT WIN32) -- 2.40.0