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
34b2a608
Unverified
Commit
34b2a608
authored
Nov 19, 2019
by
Joseph Mirabel
Committed by
GitHub
Nov 19, 2019
Browse files
Merge pull request #108 from jmirabel/devel
[CMake] export target hpp-fcl
parents
199a3c7b
6a54b84d
Pipeline
#6874
passed with stage
in 14 minutes and 39 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
34b2a608
...
...
@@ -39,6 +39,11 @@ set(PROJECT_NAME hpp-fcl)
set
(
PROJECT_DESCRIPTION
"HPP fork of FCL -- The Flexible Collision Library"
)
SET
(
PROJECT_USE_CMAKE_EXPORT TRUE
)
# Do not support CMake older than 2.8.12
CMAKE_POLICY
(
SET CMP0022 NEW
)
SET
(
PROJECT_USE_KEYWORD_LINK_LIBRARIES TRUE
)
include
(
cmake/eigen.cmake
)
include
(
cmake/boost.cmake
)
...
...
@@ -73,16 +78,11 @@ search_for_boost()
# Optional dependencies
add_optional_dependency
(
"octomap >= 1.6"
)
if
(
OCTOMAP_FOUND
)
link_directories
(
${
OCTOMAP_LIBRARY_DIRS
}
)
SET
(
HPP_FCL_HAVE_OCTOMAP TRUE
)
add_definitions
(
-DHPP_FCL_HAVE_OCTOMAP
)
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
)
add_definitions
(
-DOCTOMAP_MAJOR_VERSION=
${
OCTOMAP_MAJOR_VERSION
}
-DOCTOMAP_MINOR_VERSION=
${
OCTOMAP_MINOR_VERSION
}
-DOCTOMAP_PATCH_VERSION=
${
OCTOMAP_PATCH_VERSION
}
)
message
(
STATUS
"FCL uses Octomap"
)
else
()
SET
(
HPP_FCL_HAVE_OCTOMAP FALSE
)
...
...
cmake
@
8e874067
Compare
0bb61257
...
8e874067
Subproject commit
0bb61257d937d82593e372844c1013c2866562d5
Subproject commit
8e87406799ea10cfeb90a56f84f3e1ef9c049753
src/CMakeLists.txt
View file @
34b2a608
...
...
@@ -93,7 +93,6 @@ 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
)
...
...
@@ -105,6 +104,15 @@ else()
endif
()
IF
(
OCTOMAP_FOUND
)
PKG_CONFIG_USE_DEPENDENCY
(
${
LIBRARY_NAME
}
octomap
)
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
)
install
(
TARGETS
${
LIBRARY_NAME
}
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
)
target_include_directories
(
${
LIBRARY_NAME
}
PUBLIC
$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>
)
install
(
TARGETS
${
LIBRARY_NAME
}
EXPORT
${
TARGETS_EXPORT_NAME
}
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
)
test/CMakeLists.txt
View file @
34b2a608
...
...
@@ -21,12 +21,12 @@ endmacro(add_fcl_test)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
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
}
>
)
IF
(
RUN_TESTS
)
add_library
(
utility STATIC utility.cpp
)
ELSE
()
add_library
(
utility STATIC EXCLUDE_FROM_ALL utility.cpp
)
ENDIF
()
target_link_libraries
(
utility hpp-fcl
)
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