Merge pull request #453 from rojkov/octomap-upgrade
Upgrade octomap recipe to 1.8.0
This commit is contained in:
commit
7027820008
|
@ -1,104 +0,0 @@
|
|||
From 52bb65e7c64765265578109fddba5a189eaec6bf Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
||||
Date: Wed, 25 Jan 2017 14:15:14 +0200
|
||||
Subject: [PATCH] Add Findoctomap module
|
||||
|
||||
octomap's authors use absolute paths in the cmake module they
|
||||
ship together with the package. This makes the module unusable
|
||||
in cross-compilation environments or requires additional
|
||||
tweaking (e.g. see https://github.com/bmwcarit/meta-ros/blob/43bd17e8839f4078351895eca361804f19efb13c/recipes-ros/octomap-ros/octomap-ros_0.4.0.bb#L16)
|
||||
|
||||
This patch overrides the module in order to ease octomap's
|
||||
usage in cross-compilation environments.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/ros/cmake_modules/pull/43]
|
||||
|
||||
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
||||
---
|
||||
cmake/Modules/Findoctomap.cmake | 74 +++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 74 insertions(+)
|
||||
create mode 100644 cmake/Modules/Findoctomap.cmake
|
||||
|
||||
diff --git a/cmake/Modules/Findoctomap.cmake b/cmake/Modules/Findoctomap.cmake
|
||||
new file mode 100644
|
||||
index 0000000..1fee377
|
||||
--- /dev/null
|
||||
+++ b/cmake/Modules/Findoctomap.cmake
|
||||
@@ -0,0 +1,74 @@
|
||||
+##################################################################################################
|
||||
+#
|
||||
+# CMake script for finding Octomap.
|
||||
+#
|
||||
+# Input variables:
|
||||
+#
|
||||
+# - Octomap_ROOT_DIR (optional): When specified, header files and libraries will be searched for in
|
||||
+# ${Octomap_ROOT_DIR}/include
|
||||
+# ${Octomap_ROOT_DIR}/libs
|
||||
+# respectively, and the default CMake search order will be ignored. When unspecified, the default
|
||||
+# CMake search order is used.
|
||||
+# This variable can be specified either as a CMake or environment variable. If both are set,
|
||||
+# preference is given to the CMake variable.
|
||||
+# Use this variable for finding packages installed in a nonstandard location, or for enforcing
|
||||
+# that one of multiple package installations is picked up.
|
||||
+#
|
||||
+#
|
||||
+# Cache variables (not intended to be used in CMakeLists.txt files)
|
||||
+#
|
||||
+# - Octomap_INCLUDE_DIR: Absolute path to package headers.
|
||||
+# - Octomap_LIBRARY: Absolute path to library.
|
||||
+#
|
||||
+#
|
||||
+# Output variables:
|
||||
+#
|
||||
+# - Octomap_FOUND: Boolean that indicates if the package was found
|
||||
+# - Otomap_INCLUDE_DIRS: Paths to the necessary header files
|
||||
+# - Octomap_LIBRARIES: Package libraries
|
||||
+#
|
||||
+#
|
||||
+# Example usage:
|
||||
+#
|
||||
+# find_package(Octomap)
|
||||
+# if(NOT Octomap_FOUND)
|
||||
+# # Error handling
|
||||
+# endif()
|
||||
+# ...
|
||||
+# include_directories(${Octomap_INCLUDE_DIRS} ...)
|
||||
+# ...
|
||||
+# target_link_libraries(my_target ${Octomap_LIBRARIES})
|
||||
+#
|
||||
+##################################################################################################
|
||||
+
|
||||
+# Get package location hint from environment variable (if any)
|
||||
+if(NOT Octomap_ROOT_DIR AND DEFINED ENV{Octomap_ROOT_DIR})
|
||||
+ set(Octomap_ROOT_DIR "$ENV{Octomap_ROOT_DIR}" CACHE PATH
|
||||
+ "Octomap base directory location (optional, used for nonstandard installation paths)")
|
||||
+endif()
|
||||
+
|
||||
+# Search path for nonstandard package locations
|
||||
+if(Octomap_ROOT_DIR)
|
||||
+ set(Octomap_INCLUDE_PATH PATHS "${Octomap_ROOT_DIR}/include" NO_DEFAULT_PATH)
|
||||
+ set(Octomap_LIBRARY_PATH PATHS "${Octomap_ROOT_DIR}/lib" NO_DEFAULT_PATH)
|
||||
+endif()
|
||||
+
|
||||
+# Find headers and libraries
|
||||
+find_path(Octomap_INCLUDE_DIR NAMES octomap.h PATH_SUFFIXES "octomap" ${Octomap_INCLUDE_PATH})
|
||||
+find_library(Octomap_LIBRARY NAMES octomap PATH_SUFFIXES "octomap" ${Octomap_LIBRARY_PATH})
|
||||
+
|
||||
+mark_as_advanced(Octomap_INCLUDE_DIR
|
||||
+ Octomap_LIBRARY)
|
||||
+
|
||||
+# Output variables generation
|
||||
+include(FindPackageHandleStandardArgs)
|
||||
+find_package_handle_standard_args(octomap DEFAULT_MSG Octomap_LIBRARY
|
||||
+ Octomap_INCLUDE_DIR)
|
||||
+
|
||||
+set(Octomap_FOUND ${OCTOMAP_FOUND}) # Enforce case-correctness: Set appropriately cased variable...
|
||||
+#unset(OCTOMAP_FOUND) # ...and unset uppercase variable generated by find_package_handle_standard_args
|
||||
+
|
||||
+if(Octomap_FOUND)
|
||||
+ set(OCTOMAP_INCLUDE_DIRS ${Octomap_INCLUDE_DIR})
|
||||
+ set(OCTOMAP_LIBRARIES ${Octomap_LIBRARY})
|
||||
+endif()
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -5,7 +5,6 @@ LICENSE = "BSD"
|
|||
LIC_FILES_CHKSUM = "file://package.xml;beginline=9;endline=9;md5=d566ef916e9dedc494f5f793a6690ba5"
|
||||
|
||||
SRC_URI = "https://github.com/ros/${ROS_SPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_SP}.tar.gz \
|
||||
file://0001-Add-Findoctomap-module.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "c3c2057e022976d89bddd857da028746"
|
||||
SRC_URI[sha256sum] = "4f9358aab07cdc5455ee0545e6791a47687b6e5f4b8fe11481c168968105b8cb"
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
From f356c90e28477b6b5ec16e9941cd536eaf987186 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
||||
Date: Wed, 25 Jan 2017 15:41:00 +0200
|
||||
Subject: [PATCH] Add build dep on cmake_modules
|
||||
|
||||
The cmake module shipped with the octomap package uses absolute paths
|
||||
that break cross-compilation builds and require additional tweaking
|
||||
(e.g. see https://github.com/bmwcarit/meta-ros/blob/43bd17e8839f4078351895eca361804f19efb13c/recipes-ros/octomap-ros/octomap-ros_0.4.0.bb#L16)
|
||||
|
||||
This patch makes octomap_ros use the cmake module provided by ROS's
|
||||
cmake_modules package to avoid such tweaks.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/OctoMap/octomap_ros/pull/6]
|
||||
|
||||
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
package.xml | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7e86728..a91f6a7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(octomap_ros)
|
||||
|
||||
-find_package(catkin REQUIRED COMPONENTS sensor_msgs tf octomap_msgs)
|
||||
+find_package(catkin REQUIRED COMPONENTS cmake_modules sensor_msgs tf octomap_msgs)
|
||||
find_package(octomap REQUIRED)
|
||||
|
||||
catkin_package(
|
||||
diff --git a/package.xml b/package.xml
|
||||
index 69e0883..ab8f51d 100644
|
||||
--- a/package.xml
|
||||
+++ b/package.xml
|
||||
@@ -15,6 +15,7 @@
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
|
||||
<build_depend>catkin</build_depend>
|
||||
+ <build_depend>cmake_modules</build_depend>
|
||||
<build_depend>octomap_msgs</build_depend>
|
||||
<build_depend>octomap</build_depend>
|
||||
<build_depend>sensor_msgs</build_depend>
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -3,10 +3,9 @@ SECTION = "devel"
|
|||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://package.xml;beginline=11;endline=11;md5=d566ef916e9dedc494f5f793a6690ba5"
|
||||
|
||||
DEPENDS = "cmake-modules octomap-msgs octomap pcl-ros sensor-msgs tf"
|
||||
DEPENDS = "octomap-msgs octomap pcl-ros sensor-msgs tf"
|
||||
|
||||
SRC_URI = "https://github.com/OctoMap/${ROS_SPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_SP}.tar.gz \
|
||||
file://0001-Add-build-dep-on-cmake_modules.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "4cd3fd7f2f94567ab6d37ee0ae756573"
|
||||
SRC_URI[sha256sum] = "6f4f90bbfe88c8314a406cfe70f0c4388d4d2d85a461d90911b2e6bf738ed153"
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
From 64f9a20cf201936acdfdad40cbd6ee372ff2d9cc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Javier=20V=2E=20G=C3=B3mez?= <engjotauve@gmail.com>
|
||||
Date: Mon, 2 May 2016 22:20:21 +0200
|
||||
Subject: [PATCH] Improve the generation of config.cmake and version.cmake
|
||||
files
|
||||
|
||||
Improve the generation of config.cmake and version.cmake files, relocatable via CONFIGURE_PACKAGE_CONFIG_FILE. Upgrades the Travis build farm requirements to Ubuntu Trusty.
|
||||
|
||||
Upstream-Status: Backported
|
||||
|
||||
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
||||
---
|
||||
CMakeLists.txt | 32 +++++++++++++++++++++++---------
|
||||
octomap-config-version.cmake.in | 11 -----------
|
||||
octomap-config.cmake.in | 14 ++++++--------
|
||||
3 files changed, 29 insertions(+), 28 deletions(-)
|
||||
delete mode 100644 octomap/octomap-config-version.cmake.in
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fcafca1..1ba3417 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
|
||||
PROJECT( octomap )
|
||||
|
||||
ENABLE_TESTING()
|
||||
@@ -103,11 +103,18 @@ ENDIF()
|
||||
|
||||
# not used right now (export depends?)
|
||||
#set(OCTOMAP_CMAKE_DIR "${PROJECT_BINARY_DIR}")
|
||||
-configure_file(octomap-config.cmake.in
|
||||
- "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-config.cmake" @ONLY)
|
||||
-configure_file(octomap-config-version.cmake.in
|
||||
- "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-config-version.cmake" @ONLY)
|
||||
+include(CMakePackageConfigHelpers)
|
||||
|
||||
+CONFIGURE_PACKAGE_CONFIG_FILE(
|
||||
+ octomap-config.cmake.in
|
||||
+ "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-config.cmake"
|
||||
+ PATH_VARS OCTOMAP_INCLUDE_DIRS OCTOMAP_LIB_DIR
|
||||
+ INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/share/octomap)
|
||||
+
|
||||
+WRITE_BASIC_PACKAGE_VERSION_FILE(
|
||||
+ "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-config-version.cmake"
|
||||
+ VERSION ${OCTOMAP_VERSION}
|
||||
+ COMPATIBILITY AnyNewerVersion)
|
||||
|
||||
# Create a octomap-config.cmake file for the use from the install tree
|
||||
# and install it
|
||||
@@ -115,10 +122,17 @@ set(OCTOMAP_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include")
|
||||
set(OCTOMAP_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
#set(OCTOMAP_CMAKE_DIR "${INSTALL_DATA_DIR}/FooBar/CMake")
|
||||
|
||||
-configure_file(octomap-config.cmake.in
|
||||
- "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config.cmake" @ONLY)
|
||||
-configure_file(octomap-config-version.cmake.in
|
||||
- "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake" @ONLY)
|
||||
+CONFIGURE_PACKAGE_CONFIG_FILE(
|
||||
+ octomap-config.cmake.in
|
||||
+ "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config.cmake"
|
||||
+ PATH_VARS OCTOMAP_INCLUDE_DIRS OCTOMAP_LIB_DIR
|
||||
+ INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/share/octomap)
|
||||
+
|
||||
+WRITE_BASIC_PACKAGE_VERSION_FILE(
|
||||
+ ${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake
|
||||
+ VERSION ${OCTOMAP_VERSION}
|
||||
+ COMPATIBILITY AnyNewerVersion)
|
||||
+
|
||||
install(FILES
|
||||
"${PROJECT_BINARY_DIR}/InstallFiles/octomap-config.cmake"
|
||||
"${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake"
|
||||
diff --git a/octomap-config-version.cmake.in b/octomap-config-version.cmake.in
|
||||
deleted file mode 100644
|
||||
index c1a1173..0000000
|
||||
--- a/octomap-config-version.cmake.in
|
||||
+++ /dev/null
|
||||
@@ -1,11 +0,0 @@
|
||||
-set(PACKAGE_VERSION "@OCTOMAP_VERSION@")
|
||||
-
|
||||
-# Check whether the requested PACKAGE_FIND_VERSION is compatible
|
||||
-if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
|
||||
- set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
-else()
|
||||
- set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
- if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
|
||||
- set(PACKAGE_VERSION_EXACT TRUE)
|
||||
- endif()
|
||||
-endif()
|
||||
\ No newline at end of file
|
||||
diff --git a/octomap-config.cmake.in b/octomap-config.cmake.in
|
||||
index 2f5ba8c..5ab5dee 100644
|
||||
--- a/octomap-config.cmake.in
|
||||
+++ b/octomap-config.cmake.in
|
||||
@@ -17,18 +17,16 @@
|
||||
# LINK_DIRECTORIES with this path is NOT needed.
|
||||
# - OCTOMAP_INCLUDE_DIRS : The OctoMap include directories.
|
||||
#
|
||||
-# Based on the example CMake Tutorial
|
||||
-# http://www.vtk.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file
|
||||
-# and OpenCVConfig.cmake.in from OpenCV
|
||||
# ===================================================================================
|
||||
|
||||
-
|
||||
-set(OCTOMAP_INCLUDE_DIRS "@OCTOMAP_INCLUDE_DIRS@")
|
||||
-set(OCTOMAP_LIBRARY_DIRS "@OCTOMAP_LIB_DIR@")
|
||||
+@PACKAGE_INIT@
|
||||
+
|
||||
+set(OCTOMAP_INCLUDE_DIRS "@PACKAGE_OCTOMAP_INCLUDE_DIRS@")
|
||||
+set(OCTOMAP_LIBRARY_DIRS "@PACKAGE_OCTOMAP_LIB_DIR@")
|
||||
|
||||
|
||||
# Set library names
|
||||
set(OCTOMAP_LIBRARIES
|
||||
- "@OCTOMAP_LIB_DIR@/@OCTOMAP_LIBRARY@"
|
||||
- "@OCTOMAP_LIB_DIR@/@OCTOMATH_LIBRARY@"
|
||||
+ "@PACKAGE_OCTOMAP_LIB_DIR@/@OCTOMAP_LIBRARY@"
|
||||
+ "@PACKAGE_OCTOMAP_LIB_DIR@/@OCTOMATH_LIBRARY@"
|
||||
)
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -3,9 +3,11 @@ SECTION = "devel"
|
|||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9b0e1f01a68f441eeaf7b5e18812d3c8"
|
||||
|
||||
SRC_URI = "https://github.com/OctoMap/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz"
|
||||
SRC_URI[md5sum] = "3cba6c41544c89a8b51610bdec610f00"
|
||||
SRC_URI[sha256sum] = "3383ee9c6b18577c860d747369c84814058e2a9413f7d482846b1e02ce76f0f7"
|
||||
SRC_URI = "https://github.com/OctoMap/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
|
||||
file://0001-Improve-the-generation-of-config.cmake-and-version.c.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "e341c3ef92c978cc0261158bbafbf46a"
|
||||
SRC_URI[sha256sum] = "158f66af55bb660a2aa7d0a00c60c9e5320f6594bd0924748af1471d315d5633"
|
||||
|
||||
S = "${WORKDIR}/${BP}/${BPN}"
|
||||
|
Loading…
Reference in New Issue