aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Moos <nmoos@cisco.com>2021-01-15 13:28:34 -0800
committerBeno�t Ganne <bganne@cisco.com>2021-01-18 10:52:34 +0000
commit2c91922ebcaced5b5418d1e0e52dbfc2b6cdc062 (patch)
tree257075ea20ea047e225c804b7f315377b5bc9ec3 /src
parent4881cb4c6f0d9c6276eb7a45ed355f9fc3d729b3 (diff)
build: make rpath optional
Type: feature This patch begins enabling support for building VPP as a package for a Yocto-based embedded Linux distribution. Yocto QA complains about executables and libraries with an rpath configured, as the paths may not be valid on the target system. Therefore, this patch adds a new CMake option named `VPP_SET_RPATH`, which is enabled by default but can be disabled by a Yocto-based build. Change-Id: I90e9c4ba07138032b0f76cb72a98e58470885d55 Signed-off-by: Nathan Moos <nmoos@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8947c8afff6..15e06739685 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -136,7 +136,10 @@ endif (VPP_ENABLE_SANITIZE_ADDR)
##############################################################################
# install config
##############################################################################
-set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+option(VPP_SET_RPATH "Set rpath for resulting binaries and libraries." ON)
+if(VPP_SET_RPATH)
+ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+endif()
set(CMAKE_INSTALL_MESSAGE NEVER)
include_directories (