From 7c29dc9d4402a1b7a97039854504e7362204b43a Mon Sep 17 00:00:00 2001 From: Guilhem Saurel <guilhem.saurel@laas.fr> Date: Wed, 9 Oct 2019 09:02:56 +0200 Subject: [PATCH] [CMake] use OCTOMAP_FOUND As on some systems, we don't have OCTOMAP_INCLUDE_DIRS & OCTOMAP_LIBRARY_DIRS but OCTOMAP_INCLUDEDIR & OCTOMAP_LIBDIR, and therefore we get: -- Checking for module 'octomap >= 1.6' -- Found octomap , version 1.9.0 -- Pkg-config module octomap v1.9.0 has been detected with success. -- FCL does not use Octomap --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3fc08c34..d2d53d9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,7 @@ endif () search_for_boost() # Optional dependencies add_optional_dependency("octomap >= 1.6") -if (OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS) +if (OCTOMAP_FOUND) include_directories(SYSTEM ${OCTOMAP_INCLUDE_DIRS}) link_directories(${OCTOMAP_LIBRARY_DIRS}) SET(HPP_FCL_HAVE_OCTOMAP TRUE) -- GitLab