Skip to content

Commit

Permalink
Fix finding octomap (#1275)
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 authored Apr 20, 2019
1 parent b427e40 commit b23f04d
Showing 1 changed file with 32 additions and 22 deletions.
54 changes: 32 additions & 22 deletions cmake/DARTFindDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,30 +90,40 @@ dart_find_package(Boost)

# octomap
dart_find_package(octomap)
if (octomap_FOUND AND NOT MSVC)
if (MSVC)
# Supporting Octomap on Windows is disabled for the following issue:
# https://github.com/OctoMap/octomap/pull/213
message(WARNING "Octomap ${octomap_VERSION} is found, but Octomap "
"is not supported on Windows until "
"'https://github.com/OctoMap/octomap/pull/213' "
"is resolved.")
set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
elseif (NOT octomap_VERSION VERSION_LESS 1.9.0)
message(WARNING "Octomap ${octomap_VERSION} is found, but Octomap 1.9.0 or "
"greater is not supported yet. Please see "
"'https://github.com/dartsim/dart/issues/1078' for the details")
set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
else()
set(HAVE_OCTOMAP TRUE CACHE BOOL "Check if octomap found." FORCE)
if(DART_VERBOSE)
message(STATUS "Looking for octomap - version ${octomap_VERSION} found")
if(MSVC)
# Supporting Octomap on Windows is disabled for the following issue:
# https://github.com/OctoMap/octomap/pull/213
message(WARNING "Octomap ${octomap_VERSION} is found, but Octomap "
"is not supported on Windows until "
"'https://github.com/OctoMap/octomap/pull/213' "
"is resolved.")
set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
else()
if(OCTOMAP_FOUND OR octomap_FOUND)
if(NOT DEFINED octomap_VERSION)
set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
message(STATUS "Looking for octomap - octomap_VERSION is not defined, "
"please install octomap with version information"
)
else()
if(NOT octomap_VERSION VERSION_LESS 1.9.0)
message(WARNING "Octomap ${octomap_VERSION} is found, but Octomap 1.9.0 or "
"greater is not supported yet. Please see "
"'https://github.com/dartsim/dart/issues/1078' for the details")
set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
else()
set(HAVE_OCTOMAP TRUE CACHE BOOL "Check if octomap found." FORCE)
if(DART_VERBOSE)
message(STATUS "Looking for octomap - version ${octomap_VERSION} found")
endif()
endif()
endif()
else()
set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
message(STATUS "Looking for octomap - NOT found, to use VoxelGridShape, "
"please install octomap"
)
endif()
else()
set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
message(STATUS "Looking for octomap - NOT found, to use VoxelGridShape, "
"please install octomap")
endif()

#--------------------
Expand Down

0 comments on commit b23f04d

Please sign in to comment.