From 47568013bd481867eda16fdb16a99f8eaf4111a0 Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Sat, 29 Apr 2017 22:30:39 +0200 Subject: [PATCH] mavros: properly find Eigen (resolves #467) --- ...d-Eigen-with-cmake_modules-mechanism.patch | 36 +++++++++++++++++++ recipes-ros/mavros/mavros_0.17.5.bb | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 recipes-ros/mavros/mavros/0001-always-find-Eigen-with-cmake_modules-mechanism.patch diff --git a/recipes-ros/mavros/mavros/0001-always-find-Eigen-with-cmake_modules-mechanism.patch b/recipes-ros/mavros/mavros/0001-always-find-Eigen-with-cmake_modules-mechanism.patch new file mode 100644 index 0000000..16ff831 --- /dev/null +++ b/recipes-ros/mavros/mavros/0001-always-find-Eigen-with-cmake_modules-mechanism.patch @@ -0,0 +1,36 @@ +From d7b00940cb69d659d77bb08b1cbbf5aad4ea4617 Mon Sep 17 00:00:00 2001 +From: Lukas Bulwahn +Date: Sun, 7 May 2017 06:14:18 +0200 +Subject: [PATCH] always find Eigen with cmake_modules mechanism + +Upstream-Status: Pending +--- + mavros/CMakeLists.txt | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) + +diff --git a/mavros/CMakeLists.txt b/mavros/CMakeLists.txt +index 3b3a0bd..bcc7924 100644 +--- a/mavros/CMakeLists.txt ++++ b/mavros/CMakeLists.txt +@@ -26,14 +26,10 @@ find_package(catkin REQUIRED COMPONENTS + # find_package(Boost REQUIRED COMPONENTS system) + find_package(Boost REQUIRED COMPONENTS system) + +-find_package(Eigen3) +-if(NOT EIGEN3_FOUND) +- # Fallback to cmake_modules +- find_package(cmake_modules REQUIRED) +- find_package(Eigen REQUIRED) +- set(EIGEN3_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}) +- set(EIGEN3_LIBRARIES ${EIGEN_LIBRARIES}) +-endif() ++find_package(cmake_modules REQUIRED) ++find_package(Eigen REQUIRED) ++set(EIGEN3_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}) ++set(EIGEN3_LIBRARIES ${EIGEN_LIBRARIES}) + + include(EnableCXX11) + include(MavrosMavlink) +-- +1.9.1 + diff --git a/recipes-ros/mavros/mavros_0.17.5.bb b/recipes-ros/mavros/mavros_0.17.5.bb index 7f4ba20..74ad7d3 100644 --- a/recipes-ros/mavros/mavros_0.17.5.bb +++ b/recipes-ros/mavros/mavros_0.17.5.bb @@ -47,3 +47,5 @@ RDEPENDS_${PN}_append = "${MAVROS_RUN_AND_BUILD_DEPENDS}" require mavros.inc ROS_PKG_SUBDIR = "mavros" + +SRC_URI += "file://0001-always-find-Eigen-with-cmake_modules-mechanism.patch;striplevel=2"