Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-fcl
Commits
199a3c7b
Unverified
Commit
199a3c7b
authored
Nov 19, 2019
by
Joseph Mirabel
Committed by
GitHub
Nov 19, 2019
Browse files
Merge pull request #105 from jcarpent/devel
Update cmake to follow recent policy
parents
dcf359c6
7f4da1ff
Changes
4
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
199a3c7b
...
...
@@ -44,28 +44,17 @@ include(cmake/eigen.cmake)
include
(
cmake/boost.cmake
)
include
(
cmake/python.cmake
)
include
(
cmake/hpp.cmake
)
include
(
cmake/apple.cmake
)
IF
(
APPLE
)
SET
(
CMAKE_MACOSX_RPATH TRUE
)
SET
(
CMAKE_SKIP_BUILD_RPATH FALSE
)
SET
(
CMAKE_BUILD_WITH_INSTALL_RPATH FALSE
)
SET
(
CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE
)
set
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
list
(
FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
isSystemDir
)
if
(
"
${
isSystemDir
}
"
STREQUAL
"-1"
)
set
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
endif
(
"
${
isSystemDir
}
"
STREQUAL
"-1"
)
ENDIF
(
APPLE
)
# If needed, fix CMake policy for APPLE systems
APPLY_DEFAULT_APPLE_CONFIGURATION
()
OPTION
(
BUILD_PYTHON_INTERFACE
"Build the python bindings"
OFF
)
# Tell CMake that we compute the PROJECT_VERSION manually.
CMAKE_POLICY
(
SET CMP0048 OLD
)
project
(
${
PROJECT_NAME
}
CXX
)
COMPUTE_PROJECT_ARGS
(
PROJECT_ARGS LANGUAGES CXX
)
PROJECT
(
${
PROJECT_NAME
}
${
PROJECT_ARGS
}
)
add_required_dependency
(
"eigen3 >= 3.0.0"
)
include_directories
(
SYSTEM
${
EIGEN3_INCLUDE_DIRS
}
)
# Add a cache variable to allow not compiling and running tests
set
(
RUN_TESTS TRUE CACHE BOOL
"compile and run unit tests"
)
...
...
@@ -84,7 +73,6 @@ search_for_boost()
# Optional dependencies
add_optional_dependency
(
"octomap >= 1.6"
)
if
(
OCTOMAP_FOUND
)
include_directories
(
SYSTEM
${
OCTOMAP_INCLUDE_DIRS
}
)
link_directories
(
${
OCTOMAP_LIBRARY_DIRS
}
)
SET
(
HPP_FCL_HAVE_OCTOMAP TRUE
)
add_definitions
(
-DHPP_FCL_HAVE_OCTOMAP
)
...
...
@@ -102,14 +90,6 @@ else()
endif
()
ADD_REQUIRED_DEPENDENCY
(
"assimp >= 2.0"
)
if
(
ASSIMP_FOUND
)
if
(
NOT
${
ASSIMP_VERSION
}
VERSION_LESS
"2.0.1150"
)
add_definitions
(
-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
()
endif
()
SET
(
${
PROJECT_NAME
}
_HEADERS
include/hpp/fcl/collision_data.h
...
...
cmake
@
0bb61257
Compare
46dc4a57
...
0bb61257
Subproject commit
46dc4a57521bde14ea75c959b6b4f887af50c65d
Subproject commit
0bb61257d937d82593e372844c1013c2866562d5
src/CMakeLists.txt
View file @
199a3c7b
...
...
@@ -82,8 +82,6 @@ set(${LIBRARY_NAME}_SOURCES
mesh_loader/loader.cpp
)
# Declare boost include directories
include_directories
(
SYSTEM
${
Boost_INCLUDE_DIRS
}
)
link_directories
(
${
Boost_LIBRARY_DIRS
}
)
add_library
(
${
LIBRARY_NAME
}
...
...
@@ -91,11 +89,22 @@ add_library(${LIBRARY_NAME}
${${
LIBRARY_NAME
}
_SOURCES
}
)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
${
Boost_LIBRARIES
}
)
target_include_directories
(
${
LIBRARY_NAME
}
SYSTEM PUBLIC
${
EIGEN3_INCLUDE_DIRS
}
${
Boost_INCLUDE_DIRS
}
$<$<BOOL:
${
HPP_FCL_HAVE_OCTOMAP
}
>:
${
OCTOMAP_INCLUDE_DIRS
}
>
)
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
)
ENDIF
(
OCTOMAP_FOUND
)
#PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} flann)
install
(
TARGETS
${
LIBRARY_NAME
}
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
)
test/CMakeLists.txt
View file @
199a3c7b
...
...
@@ -20,9 +20,13 @@ macro(add_fcl_test test_name)
endmacro
(
add_fcl_test
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
include_directories
(
SYSTEM
${
Boost_INCLUDE_DIRS
}
)
add_library
(
utility STATIC utility.cpp
)
target_include_directories
(
utility SYSTEM PUBLIC
${
EIGEN3_INCLUDE_DIRS
}
${
Boost_INCLUDE_DIRS
}
$<$<BOOL:
${
HPP_FCL_HAVE_OCTOMAP
}
>:
${
OCTOMAP_INCLUDE_DIRS
}
>
)
add_fcl_test
(
math math.cpp
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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