Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
coal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coal
coal
Commits
b417be3e
Commit
b417be3e
authored
5 years ago
by
Joseph Mirabel
Browse files
Options
Downloads
Patches
Plain Diff
[CMake] Use 'by target' API of CMake
parent
e37b3e63
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+0
-10
0 additions, 10 deletions
CMakeLists.txt
src/CMakeLists.txt
+13
-4
13 additions, 4 deletions
src/CMakeLists.txt
test/CMakeLists.txt
+5
-1
5 additions, 1 deletion
test/CMakeLists.txt
with
18 additions
and
15 deletions
CMakeLists.txt
+
0
−
10
View file @
b417be3e
...
...
@@ -55,7 +55,6 @@ 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"
)
...
...
@@ -74,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
)
...
...
@@ -92,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
...
...
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
13
−
4
View file @
b417be3e
...
...
@@ -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
}
)
This diff is collapsed.
Click to expand it.
test/CMakeLists.txt
+
5
−
1
View file @
b417be3e
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment