diff --git a/recipes-ros/octomap/octomap/0001-Improve-the-generation-of-config.cmake-and-version.c.patch b/recipes-ros/octomap/octomap/0001-Improve-the-generation-of-config.cmake-and-version.c.patch new file mode 100644 index 0000000..49c623d --- /dev/null +++ b/recipes-ros/octomap/octomap/0001-Improve-the-generation-of-config.cmake-and-version.c.patch @@ -0,0 +1,123 @@ +From 64f9a20cf201936acdfdad40cbd6ee372ff2d9cc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Javier=20V=2E=20G=C3=B3mez?= +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 +--- + 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 + diff --git a/recipes-ros/octomap/octomap_1.6.9.bb b/recipes-ros/octomap/octomap_1.8.0.bb similarity index 60% rename from recipes-ros/octomap/octomap_1.6.9.bb rename to recipes-ros/octomap/octomap_1.8.0.bb index 2f4fd6c..e21c405 100644 --- a/recipes-ros/octomap/octomap_1.6.9.bb +++ b/recipes-ros/octomap/octomap_1.8.0.bb @@ -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}"