From d1662aa198586b282366843af8b69851610bcf13 Mon Sep 17 00:00:00 2001 From: Wolfgang Merkt Date: Wed, 11 May 2022 21:27:10 +0100 Subject: [PATCH] Also set lowercase octomap_* variables in CMake config (#369) Relates to https://github.com/OctoMap/octomap/issues/138 --- octomap/octomap-config.cmake.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/octomap/octomap-config.cmake.in b/octomap/octomap-config.cmake.in index 2f686bef..0bcacc7d 100644 --- a/octomap/octomap-config.cmake.in +++ b/octomap/octomap-config.cmake.in @@ -39,4 +39,15 @@ set(OCTOMAP_LIBRARIES "@PACKAGE_OCTOMAP_LIB_DIR@/@OCTOMATH_LIBRARY@" ) +# Additionally set the variables using a lower-case project name. +# This fixes discovery for downstream packages that search for lower-case octomap, which has been common in downstream code: +set(octomap_MAJOR_VERSION "${OCTOMAP_MAJOR_VERSION}") +set(octomap_MINOR_VERSION "${OCTOMAP_MINOR_VERSION}") +set(octomap_PATCH_VERSION "${OCTOMAP_PATCH_VERSION}") +set(octomap_VERSION "${OCTOMAP_VERSION}") +set(octomap_INCLUDE_DIRS "${OCTOMAP_INCLUDE_DIRS}") +set(octomap_LIBRARY_DIRS "${OCTOMAP_LIBRARY_DIRS}") +set(octomap_LIBRARIES "${OCTOMAP_LIBRARIES}") + + @OCTOMAP_INCLUDE_TARGETS@