Skip to content

Commit 78648c0

Browse files
author
Ioan Sucan
committed
fix linking for old qhull versions; remove use of config file
1 parent 6f61f80 commit 78648c0

File tree

4 files changed

+6
-15
lines changed

4 files changed

+6
-15
lines changed

CMakeLists.txt

+5-7
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ else()
3535
set(IS_ASSIMP3 0) # most likely not
3636
endif()
3737

38-
find_package(Qhull REQUIRED)
3938
find_package(octomap REQUIRED)
4039
find_package(catkin COMPONENTS shape_msgs resource_retriever shape_tools random_numbers console_bridge eigen_stl_containers)
4140

@@ -46,12 +45,11 @@ catkin_package(
4645
DEPENDS Eigen console_bridge
4746
)
4847

49-
### ---[ Create the config.h file
50-
set(config_h_in "${CMAKE_CURRENT_SOURCE_DIR}/config.h.in")
51-
set(config_h "${CMAKE_CURRENT_BINARY_DIR}/include/config.h")
52-
configure_file(${config_h_in} ${config_h})
48+
find_package(Qhull REQUIRED)
49+
if (HAVE_QHULL_2011)
50+
add_definitions(-DGEOMETRIC_SHAPES_HAVE_QHULL_2011)
51+
endif()
5352

54-
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
5553
include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} ${ASSIMP_INCLUDE_DIRS})
5654
include_directories(include)
5755
include_directories(${catkin_INCLUDE_DIRS})
@@ -63,7 +61,7 @@ add_library(${PROJECT_NAME}
6361
src/mesh_operations.cpp
6462
src/bodies.cpp
6563
src/body_operations.cpp)
66-
target_link_libraries(${PROJECT_NAME} ${ASSIMP_LIBRARIES} ${QHULL_LIB} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
64+
target_link_libraries(${PROJECT_NAME} ${ASSIMP_LIBRARIES} ${QHULL_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
6765

6866

6967
# Unit tests

cmake/FindQhull.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# QHULL_FOUND - True if QHULL was found.
66
# QHULL_INCLUDE_DIRS - Directories containing the QHULL include files.
77
# QHULL_LIBRARIES - Libraries needed to use QHULL.
8-
# QHULL_DEFINITIONS - Compiler flags for QHULL.
98
# If QHULL_USE_STATIC is specified then look for static libraries ONLY else
109
# look for shared ones
1110

config.h.in

-4
This file was deleted.

src/bodies.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@
3939

4040
#include <console_bridge/console.h>
4141

42-
#include "config.h"
43-
4442
extern "C"
4543
{
46-
#ifdef HAVE_QHULL_2011
44+
#ifdef GEOMETRIC_SHAPES_HAVE_QHULL_2011
4745
#include <libqhull/libqhull.h>
4846
#include <libqhull/mem.h>
4947
#include <libqhull/qset.h>

0 commit comments

Comments
 (0)