Commit cfc4ec67 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

[CMake] Fix pkg config file when using Octomap

parent 2e34b5bc
......@@ -78,6 +78,7 @@ add_optional_dependency("octomap >= 1.6")
if (OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS)
include_directories(${OCTOMAP_INCLUDE_DIRS})
link_directories(${OCTOMAP_LIBRARY_DIRS})
SET(FCL_HAVE_OCTOMAP TRUE)
add_definitions (-DFCL_HAVE_OCTOMAP)
string(REPLACE "." ";" VERSION_LIST ${OCTOMAP_VERSION})
list(GET VERSION_LIST 0 OCTOMAP_MAJOR_VERSION)
......@@ -88,6 +89,7 @@ if (OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS)
-DOCTOMAP_PATCH_VERSION=${OCTOMAP_PATCH_VERSION})
message(STATUS "FCL uses Octomap")
else()
SET(FCL_HAVE_OCTOMAP FALSE)
message(STATUS "FCL does not use Octomap")
endif()
......@@ -98,6 +100,7 @@ if(ASSIMP_FOUND)
SET(WITH_FCL_USE_ASSIMP_UNIFIED_HEADER_NAMES TRUE)
message(STATUS "Assimp version has unified headers")
else()
SET(WITH_FCL_USE_ASSIMP_UNIFIED_HEADER_NAMES FALSE)
message(STATUS "Assimp version does not have unified headers")
endif()
endif()
......@@ -161,10 +164,9 @@ PKG_CONFIG_APPEND_BOOST_LIBS(thread date_time filesystem system)
IF(WITH_FCL_USE_ASSIMP_UNIFIED_HEADER_NAMES)
PKG_CONFIG_APPEND_CFLAGS("-DFCL_USE_ASSIMP_UNIFIED_HEADER_NAMES")
ENDIF(WITH_FCL_USE_ASSIMP_UNIFIED_HEADER_NAMES)
PKG_CONFIG_APPEND_CFLAGS("-DFCL_HAVE_OCTOMAP=${FCL_HAVE_OCTOMAP}")
IF(FCL_HAVE_OCTOMAP)
PKG_CONFIG_APPEND_CFLAGS(
"-DOCTOMAP_MAJOR_VERSION=${OCTOMAP_MAJOR_VERSION} -DOCTOMAP_MINOR_VERSION=${OCTOMAP_MINOR_VERSION} -DOCTOMAP_PATCH_VERSION=${OCTOMAP_PATCH_VERSION}")
"-DFCL_HAVE_OCTOMAP -DOCTOMAP_MAJOR_VERSION=${OCTOMAP_MAJOR_VERSION} -DOCTOMAP_MINOR_VERSION=${OCTOMAP_MINOR_VERSION} -DOCTOMAP_PATCH_VERSION=${OCTOMAP_PATCH_VERSION}")
ENDIF(FCL_HAVE_OCTOMAP)
setup_project_finalize()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment