Verified Commit e79b609e authored by Justin Carpentier's avatar Justin Carpentier
Browse files

cmake: use CMake standard convention for Octomap

parent c7854199
......@@ -85,7 +85,7 @@ endif ()
search_for_boost()
# Optional dependencies
add_optional_dependency("octomap >= 1.6")
ADD_PROJECT_DEPENDENCY(octomap PKG_CONFIG_REQUIRES "octomap >= 1.6")
if (OCTOMAP_FOUND)
SET(HPP_FCL_HAVE_OCTOMAP TRUE)
string(REPLACE "." ";" VERSION_LIST ${OCTOMAP_VERSION})
......
......@@ -193,8 +193,9 @@ else()
message(STATUS "Assimp version does not have unified headers")
endif()
IF(OCTOMAP_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} octomap)
target_compile_definitions (${LIBRARY_NAME} PUBLIC
target_include_directories(${LIBRARY_NAME} SYSTEM PUBLIC ${OCTOMAP_INCLUDE_DIR})
target_link_libraries(${LIBRARY_NAME} PUBLIC ${OCTOMAP_LIBRARY})
target_compile_definitions (${LIBRARY_NAME} PRIVATE
-DHPP_FCL_HAVE_OCTOMAP
-DOCTOMAP_MAJOR_VERSION=${OCTOMAP_MAJOR_VERSION}
-DOCTOMAP_MINOR_VERSION=${OCTOMAP_MINOR_VERSION}
......
Markdown is supported
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