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
59aca862
Unverified
Commit
59aca862
authored
Jun 25, 2021
by
Guilhem Saurel
Committed by
GitHub
Jun 25, 2021
Browse files
Merge pull request #233 from nim65s/topic/qhull
[CMake] use system Qhull if available
parents
89ee27aa
0eeeb0be
Pipeline
#15037
failed with stage
in 8 minutes and 20 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
59aca862
...
@@ -108,6 +108,11 @@ if(HPP_FCL_HAS_QHULL)
...
@@ -108,6 +108,11 @@ if(HPP_FCL_HAS_QHULL)
if
(
DEFINED CMAKE_CXX_STANDARD AND CMAKE_CXX_STANDARD EQUAL 98
)
if
(
DEFINED CMAKE_CXX_STANDARD AND CMAKE_CXX_STANDARD EQUAL 98
)
message
(
FATAL_ERROR
"Cannot use qhull library with C++ < 11.
\n
You may add -DCMAKE_CXX_STANDARD=11"
)
message
(
FATAL_ERROR
"Cannot use qhull library with C++ < 11.
\n
You may add -DCMAKE_CXX_STANDARD=11"
)
endif
()
endif
()
find_package
(
Qhull COMPONENTS qhull_r qhullcpp
)
if
(
Qhull_FOUND
)
set
(
HPP_FCL_USE_SYSTEM_QHULL TRUE
)
else
()
message
(
STATUS
"Qhullcpp not found: it will be build from sources, if Qhull_r is found"
)
file
(
MAKE_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/third-parties
)
file
(
MAKE_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/third-parties
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E create_symlink
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E create_symlink
${
CMAKE_SOURCE_DIR
}
/third-parties/qhull/src/libqhullcpp
${
CMAKE_SOURCE_DIR
}
/third-parties/qhull/src/libqhullcpp
...
@@ -122,6 +127,10 @@ if(HPP_FCL_HAS_QHULL)
...
@@ -122,6 +127,10 @@ if(HPP_FCL_HAS_QHULL)
NAMES libqhull_r.so
NAMES libqhull_r.so
PATHS
${
Qhull_PREFIX
}
PATHS
${
Qhull_PREFIX
}
)
)
if
(
NOT Qhull_r_LIBRARY
)
message
(
FATAL_ERROR
"Qhull_r not found, please install it or turn HPP_FCL_HAS_QHULL OFF"
)
endif
()
endif
()
endif
()
endif
()
FIND_PACKAGE
(
assimp REQUIRED
)
FIND_PACKAGE
(
assimp REQUIRED
)
...
...
src/CMakeLists.txt
View file @
59aca862
...
@@ -85,7 +85,7 @@ if(HPP_FCL_HAS_OCTOMAP)
...
@@ -85,7 +85,7 @@ if(HPP_FCL_HAS_OCTOMAP)
list
(
APPEND
${
LIBRARY_NAME
}
_SOURCES octree.cpp
)
list
(
APPEND
${
LIBRARY_NAME
}
_SOURCES octree.cpp
)
endif
(
HPP_FCL_HAS_OCTOMAP
)
endif
(
HPP_FCL_HAS_OCTOMAP
)
if
(
HPP_FCL_HAS_QHULL
)
if
(
HPP_FCL_HAS_QHULL
AND NOT HPP_FCL_USE_SYSTEM_QHULL
)
set
(
set
(
libqhullcpp_HEADERS
libqhullcpp_HEADERS
${
Qhullcpp_PREFIX
}
/libqhullcpp/Coordinates.h
${
Qhullcpp_PREFIX
}
/libqhullcpp/Coordinates.h
...
@@ -188,9 +188,13 @@ ENDIF(WIN32)
...
@@ -188,9 +188,13 @@ ENDIF(WIN32)
if
(
HPP_FCL_HAS_QHULL
)
if
(
HPP_FCL_HAS_QHULL
)
target_compile_definitions
(
${
LIBRARY_NAME
}
PRIVATE -DHPP_FCL_HAS_QHULL
)
target_compile_definitions
(
${
LIBRARY_NAME
}
PRIVATE -DHPP_FCL_HAS_QHULL
)
if
(
HPP_FCL_USE_SYSTEM_QHULL
)
target_link_libraries
(
${
LIBRARY_NAME
}
PRIVATE Qhull::qhull_r Qhull::qhullcpp
)
else
()
target_include_directories
(
${
LIBRARY_NAME
}
SYSTEM PRIVATE
target_include_directories
(
${
LIBRARY_NAME
}
SYSTEM PRIVATE
${
Qhull_r_INCLUDE_DIR
}
${
Qhullcpp_PREFIX
}
)
${
Qhull_r_INCLUDE_DIR
}
${
Qhullcpp_PREFIX
}
)
target_link_libraries
(
${
LIBRARY_NAME
}
PRIVATE
"
${
Qhull_r_LIBRARY
}
"
)
target_link_libraries
(
${
LIBRARY_NAME
}
PRIVATE
"
${
Qhull_r_LIBRARY
}
"
)
endif
()
endif
()
endif
()
target_include_directories
(
${
LIBRARY_NAME
}
target_include_directories
(
${
LIBRARY_NAME
}
...
...
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