aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/CMakeLists.txt
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-11-26 12:23:45 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2020-01-09 15:55:04 +0100
commitb1428786c5968319b6c963d236b78814958de6e3 (patch)
tree8d9bf6840e1fddb1f2f32e58128b7ef4bd1f95ea /low-can-binding/CMakeLists.txt
parent8ab87baece53249df7f4063caaa704ec1766ca5f (diff)
cmake: fix lib not populated and RPATH usage
RPATH as to be used as target property. Bug-AGL: SPEC-2988 Change-Id: Ifaa66ceafbe7ed5f7de553b14da2dd8c5b1e8f9d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/CMakeLists.txt')
-rw-r--r--low-can-binding/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/low-can-binding/CMakeLists.txt b/low-can-binding/CMakeLists.txt
index cba07bf5..ce66a8c4 100644
--- a/low-can-binding/CMakeLists.txt
+++ b/low-can-binding/CMakeLists.txt
@@ -63,6 +63,12 @@ PROJECT_TARGET_ADD(low-can)
add_library(${TARGET_NAME} SHARED ${SOURCES_LIB} ${SOURCES_J1939} ${SOURCES_ISOTP})
+ # Binder exposes a unique public entry point
+ SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
+ LABELS "LIBRARY"
+ IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.so
+ )
+
TARGET_LINK_LIBRARIES(${TARGET_NAME}
ini-config
openxc-message-format
@@ -86,6 +92,7 @@ PROJECT_TARGET_ADD(low-can-binding)
PREFIX "afb-"
LABELS "BINDINGV3"
LINK_FLAGS ${BINDINGS_LINK_FLAG}
+ INSTALL_RPATH "$ORIGIN"
OUTPUT_NAME ${TARGET_NAME}
)