DRAFT ros-workspace-0.6.1.inc: Fix build_type, dependencies and pass native-sysroot
Version-specific because it might be fixed in a new version.
This commit is contained in:
parent
dcbb2e7c38
commit
3d5ec34600
|
@ -0,0 +1,16 @@
|
|||
# Copyright (c) 2019 LG Electronics, Inc.
|
||||
|
||||
# ros-workspace is a ament dependent package but they use 'cmake' as build_type.
|
||||
ROS_BUILD_TYPE = "ament_cmake"
|
||||
ROS_BUILD_DEPENDS_remove = "ament-cmake-core"
|
||||
ROS_BUILD_DEPENDS_remove = "ament-package"
|
||||
ROS_BUILDTOOL_DEPENDS += " \
|
||||
ament-cmake-core-native \
|
||||
ament-package-native \
|
||||
"
|
||||
|
||||
# The package find files from CMAKE_INSTALL_PREFIX that is just absolute "/usr".
|
||||
# Need to pass the native sysroot folder path.
|
||||
export STAGING_DIR_NATIVE
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/ros-workspace:"
|
||||
SRC_URI_append = " file://0001-Don-t-use-CMAKE_INSTALL_PREFIX-as-sysroot-for-cross-.patch"
|
|
@ -0,0 +1,25 @@
|
|||
From e0eda998725a90704b22c618e7d4331e9bfe996c Mon Sep 17 00:00:00 2001
|
||||
From: JeongBong Seo <jb.seo@lge.com>
|
||||
Date: Fri, 5 Apr 2019 14:54:08 +0900
|
||||
Subject: Don't use CMAKE_INSTALL_PREFIX as sysroot for cross-compile
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e437529..b478efc 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -8,7 +8,7 @@ execute_process(COMMAND python3 -c "from distutils import sysconfig; print(sysco
|
||||
|
||||
# Locate ament_package template files.
|
||||
set(PYTHON_INSTALL_DIR "lib/python${PYTHON_MAJOR_MINOR}/site-packages")
|
||||
-set(AMENT_PACKAGE_TEMPLATE_DIR "${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}/ament_package/template")
|
||||
+set(AMENT_PACKAGE_TEMPLATE_DIR "$ENV{STAGING_DIR_NATIVE}/usr/${PYTHON_INSTALL_DIR}/ament_package/template")
|
||||
set(BINARY_PATH_HOOK "${AMENT_PACKAGE_TEMPLATE_DIR}/environment_hook/path.sh")
|
||||
set(LIBRARY_PATH_HOOK "${AMENT_PACKAGE_TEMPLATE_DIR}/environment_hook/library_path.sh")
|
||||
set(PYTHONPATH_HOOK "${AMENT_PACKAGE_TEMPLATE_DIR}/environment_hook/pythonpath.sh.in")
|
||||
--
|
||||
2.17.1
|
||||
|
Loading…
Reference in New Issue