[runtime] Set installed libraries and binaries rpath (#8800)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Wed, 6 Nov 2019 06:06:36 +0000 (15:06 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 6 Nov 2019 06:06:36 +0000 (15:06 +0900)
Set rpath: same implementation with nncc

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
infra/nnfw/CMakeLists.txt

index bcc9579..adfd2af 100644 (file)
@@ -4,6 +4,11 @@ project(nnfw)
 
 enable_testing()
 
+set(CMAKE_SKIP_BUILD_RPATH FALSE)
+set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/")
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+
 set(NNAS_PROJECT_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../.." CACHE
   INTERNAL "Where to find nnas top-level source directory"
 )