From 7d710d62fcb2a15505a7a0fc8feb91b8342fafd6 Mon Sep 17 00:00:00 2001 From: michele papalini Date: Mon, 21 Jan 2019 19:32:37 +0100 Subject: add include path Change-Id: I03c50a3aa98b96f686fedf548c543df3a0696b67 Signed-off-by: michele papalini --- cmake/Modules/BuildMacros.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/Modules/BuildMacros.cmake b/cmake/Modules/BuildMacros.cmake index 3630d2e26..276659525 100755 --- a/cmake/Modules/BuildMacros.cmake +++ b/cmake/Modules/BuildMacros.cmake @@ -23,6 +23,9 @@ macro(build_executable exec) ${ARGN} ) + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + add_executable(${exec} ${ARG_SOURCES}) if(ARG_LINK_LIBRARIES) target_link_libraries(${exec} ${ARG_LINK_LIBRARIES}) @@ -56,6 +59,9 @@ macro(build_library lib) ${ARGN} ) + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + if (ARG_SHARED) list(APPEND TARGET_LIBS ${lib}.shared @@ -150,4 +156,4 @@ macro(AddTest testFile) add_test(${ARGV0} ${ARGV0}) set_target_properties(${ARGV0} PROPERTIES FOLDER Test) add_dependencies(${ARGV0} ${PROJECT_NAME}_cleanup_profiling_data) -endmacro(AddTest) \ No newline at end of file +endmacro(AddTest) -- cgit 1.2.3-korg