Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-fcl
Commits
749492c2
Unverified
Commit
749492c2
authored
May 29, 2020
by
Justin Carpentier
Committed by
GitHub
May 29, 2020
Browse files
Merge pull request #172 from jcarpent/devel
Fix packaging of the project
parents
bfb5b93c
ab8df77b
Changes
6
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
749492c2
...
...
@@ -57,6 +57,10 @@ include(cmake/hpp.cmake)
include
(
cmake/apple.cmake
)
include
(
cmake/ide.cmake
)
SET
(
CMAKE_MODULE_PATH
${
CMAKE_SOURCE_DIR
}
/cmake-modules/
${
CMAKE_MODULE_PATH
}
)
# If needed, fix CMake policy for APPLE systems
APPLY_DEFAULT_APPLE_CONFIGURATION
()
...
...
@@ -68,8 +72,8 @@ PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
ADD_PROJECT_DEPENDENCY
(
Eigen3 REQUIRED PKG_CONFIG_REQUIRES
"eigen3 >= 3.0.0"
)
if
(
BUILD_PYTHON_INTERFACE
)
ADD_PROJECT_DEPENDENCY
(
eigenpy 2.2 REQUIRED
)
endif
()
FIND_PACKAGE
(
eigenpy 2.2 REQUIRED
)
endif
()
# Required dependencies
set
(
BOOST_COMPONENTS thread date_time system
)
...
...
@@ -81,10 +85,10 @@ endif ()
search_for_boost
()
# Optional dependencies
add_optional_dependency
(
"octomap >= 1.6"
)
if
(
OCTOMAP
_FOUND
)
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
}
)
string
(
REPLACE
"."
";"
VERSION_LIST
${
octomap
_VERSION
}
)
list
(
GET VERSION_LIST 0 OCTOMAP_MAJOR_VERSION
)
list
(
GET VERSION_LIST 1 OCTOMAP_MINOR_VERSION
)
list
(
GET VERSION_LIST 2 OCTOMAP_PATCH_VERSION
)
...
...
@@ -115,7 +119,7 @@ if(HPP_FCL_HAS_QHULL)
)
endif
()
ADD_REQUIRED_DEPENDENCY
(
"assimp >= 2.0"
)
FIND_PACKAGE
(
assimp REQUIRED
)
SET
(
${
PROJECT_NAME
}
_HEADERS
include/hpp/fcl/collision_data.h
...
...
cmake
@
9d9fda17
Compare
72cf8cde
...
9d9fda17
Subproject commit
72cf8cdefcf8cde818745ad7998122bde0b54734
Subproject commit
9d9fda176e0330e0c29b9c91b5e417b3ece93848
cmake-modules/Findassimp.cmake
0 → 100644
View file @
749492c2
#
# Copyright 2020 CNRS INRIA
#
# Author: Guilhem Saurel
#
# Try to find assimp in standard prefixes and in ${assimp_PREFIX}
# Once done this will define
# assimp_FOUND - System has assimp
# assimp_INCLUDE_DIR - The assimp include directories
# assimp_LIBRARY - The libraries needed to use assimp
FIND_PATH
(
assimp_INCLUDE_DIR
NAMES assimp/defs.h
PATHS
${
assimp_PREFIX
}
${
assimp_PREFIX
}
/include
)
FIND_LIBRARY
(
assimp_LIBRARY
NAMES assimp
PATHS
${
assimp_PREFIX
}
${
assimp_PREFIX
}
/lib
)
INCLUDE
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
assimp DEFAULT_MSG assimp_LIBRARY assimp_INCLUDE_DIR
)
mark_as_advanced
(
assimp_INCLUDE_DIR assimp_LIBRARY
)
src/CMakeLists.txt
View file @
749492c2
...
...
@@ -158,9 +158,18 @@ ADD_HEADER_GROUP(PROJECT_HEADERS_FULL_PATH)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
PUBLIC
Boost::thread
Boost::date_time
Boost::system
${
Boost_THREAD_LIBRARY
}
${
Boost_DATE_TIME_LIBRARY
}
${
Boost_SYSTEM_LIBRARY
}
# Boost::thread
# Boost::date_time
# Boost::system
)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
PRIVATE
${
assimp_LIBRARY
}
# assimp::assimp # Not working
)
if
(
HPP_FCL_HAS_QHULL
)
...
...
@@ -173,6 +182,11 @@ endif()
target_include_directories
(
${
LIBRARY_NAME
}
SYSTEM PUBLIC
${
EIGEN3_INCLUDE_DIR
}
${
Boost_INCLUDE_DIRS
}
)
target_include_directories
(
${
LIBRARY_NAME
}
SYSTEM PRIVATE
${
assimp_INCLUDE_DIR
}
)
target_include_directories
(
${
LIBRARY_NAME
}
...
...
@@ -180,21 +194,15 @@ target_include_directories(${LIBRARY_NAME}
$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>
)
PKG_CONFIG_USE_DEPENDENCY
(
${
LIBRARY_NAME
}
assimp
)
if
(
NOT
${
ASSIMP_VERSION
}
VERSION_LESS
"2.0.1150"
)
target_compile_definitions
(
${
LIBRARY_NAME
}
PRIVATE -DHPP_FCL_USE_ASSIMP_UNIFIED_HEADER_NAMES
)
message
(
STATUS
"Assimp version has unified headers"
)
else
()
message
(
STATUS
"Assimp version does not have unified headers"
)
endif
()
IF
(
OCTOMAP_FOUND
)
PKG_CONFIG_USE_DEPENDENCY
(
${
LIBRARY_NAME
}
octomap
)
IF
(
octomap_FOUND
)
target_include_directories
(
${
LIBRARY_NAME
}
SYSTEM PUBLIC
${
OCTOMAP_INCLUDE_DIRS
}
)
target_link_libraries
(
${
LIBRARY_NAME
}
PUBLIC
${
OCTOMAP_LIBRARIES
}
)
target_compile_definitions
(
${
LIBRARY_NAME
}
PUBLIC
-DHPP_FCL_HAVE_OCTOMAP
-DOCTOMAP_MAJOR_VERSION=
${
OCTOMAP_MAJOR_VERSION
}
-DOCTOMAP_MINOR_VERSION=
${
OCTOMAP_MINOR_VERSION
}
-DOCTOMAP_PATCH_VERSION=
${
OCTOMAP_PATCH_VERSION
}
)
ENDIF
(
OCTOMAP
_FOUND
)
ENDIF
(
octomap
_FOUND
)
install
(
TARGETS
${
LIBRARY_NAME
}
EXPORT
${
TARGETS_EXPORT_NAME
}
...
...
src/mesh_loader/assimp.cpp
View file @
749492c2
...
...
@@ -45,21 +45,12 @@
#define AI_NO_EXCEPT
#endif
#ifdef HPP_FCL_USE_ASSIMP_UNIFIED_HEADER_NAMES
#include
<assimp/DefaultLogger.hpp>
#include
<assimp/IOStream.hpp>
#include
<assimp/IOSystem.hpp>
#include
<assimp/Importer.hpp>
#include
<assimp/postprocess.h>
#include
<assimp/scene.h>
#else
#include
<assimp/DefaultLogger.h>
#include
<assimp/assimp.hpp>
#include
<assimp/IOStream.h>
#include
<assimp/IOSystem.h>
#include
<assimp/aiPostProcess.h>
#include
<assimp/aiScene.h>
#endif
#include
<assimp/DefaultLogger.hpp>
#include
<assimp/IOStream.hpp>
#include
<assimp/IOSystem.hpp>
#include
<assimp/Importer.hpp>
#include
<assimp/postprocess.h>
#include
<assimp/scene.h>
namespace
hpp
{
...
...
test/CMakeLists.txt
View file @
749492c2
...
...
@@ -9,7 +9,6 @@ macro(add_fcl_test test_name source)
Boost::unit_test_framework
utility
)
PKG_CONFIG_USE_DEPENDENCY
(
${
test_name
}
assimp
)
target_compile_options
(
${
test_name
}
PRIVATE
"-Wno-c99-extensions"
)
if
(
HPP_FCL_HAS_QHULL
)
target_compile_options
(
${
test_name
}
PRIVATE -DHPP_FCL_HAS_QHULL
)
...
...
@@ -49,7 +48,6 @@ add_fcl_test(convex convex.cpp)
add_fcl_test
(
bvh_models bvh_models.cpp
)
add_fcl_test
(
profiling profiling.cpp
)
PKG_CONFIG_USE_DEPENDENCY
(
profiling assimp
)
add_fcl_test
(
gjk gjk.cpp
)
if
(
HPP_FCL_HAVE_OCTOMAP
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment