Skip to content

Commit

Permalink
Fix qhull paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Chrétien committed Mar 9, 2014
1 parent f160f21 commit cf31247
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 10 deletions.
26 changes: 16 additions & 10 deletions Makefile.hrpsys-base
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
all: installed

INSTALL_DIR ?= ${CURDIR}
SVN_DIR = build/hrpsys-base-source
#SVN_URL = https://hrpsys-base.googlecode.com/svn/trunk
SVN_URL = http://hrpsys-base.googlecode.com/svn/tags/315.1.8
INSTALL_DIR ?= $(CURDIR)
SVN_DIR = build/hrpsys-base-source
PATCH_DIR = $(CURDIR)
#SVN_URL = https://hrpsys-base.googlecode.com/svn/trunk
SVN_URL = http://hrpsys-base.googlecode.com/svn/tags/315.1.8
#SVN_REVISION=-r@REVISION@
SVN_PATCH = ${PATCH_DIR}/patch/qhull.patch
SVN_CMDLINE = svn --non-interactive --trust-server-cert
MK_DIR = $(shell rospack find mk)
NUM_OF_CPUS = $(shell grep -c '^processor' /proc/cpuinfo)

OPENRTM_DIR ?= $(shell rospack find openrtm_aist)
PKG_CONFIG_PATH ?= $(shell rospack find openrtm_aist)/lib/pkgconfig:$(shell rospack find openhrp3)/lib/pkgconfig:$(PKG_CONFIG_PATH)
MK_DIR = $(shell rospack find mk)
NUM_OF_CPUS = $(shell grep -c '^processor' /proc/cpuinfo)

include $(MK_DIR)/svn_checkout.mk


patched_no_makefile: $(SVN_PATCH) ## copy from svn_checkout.mk
@echo "patch hrpsys-base ... "
@echo " PATCH_DIR=$(PATCH_DIR)"
ifneq ($(strip $(SVN_PATCH)),)
svn revert -R $(SVN_DIR)
endif
Expand All @@ -23,7 +25,11 @@ endif
touch rospack_nosubdirs
touch patched

installed: ${SVN_DIR} # patched_no_makefile
installed: $(SVN_DIR) patched_no_makefile
@echo "compile hrpsys-base ... "
@echo " PATH=$(PATH)"
@echo " INSTALL_DIR=$(INSTALL_DIR)"
@echo " OPENRTM_DIR=$(OPENRTM_DIR)"
(mkdir -p build/hrpsys-base && cd build/hrpsys-base && PKG_CONFIG_PATH=${PKG_CONFIG_PATH} cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DOPENRTM_DIR=${OPENRTM_DIR} -DENABLE_INSTALL_RPATH=ON -DCOMPILE_JAVA_STUFF=OFF -DEXTRA_RTC_DIRS=$(EXTRA_RTC_DIRS) -DEXTRA_IDL_FILES=$(EXTRA_IDL_FILES) -DENABLE_INSTALL_RPATH_TO_SELF=ON -DENABLE_DOXYGEN=OFF ${CURDIR}/build/hrpsys-base-source && make -j$(shell if [ $(NUM_OF_CPUS) -gt 4 ] ; then echo "4"; else echo $(NUM_OF_CPUS); fi) && make install) 2>&1 | tee ${CURDIR}/compile.log
#
touch installed
Expand Down
50 changes: 50 additions & 0 deletions patch/qhull.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Index: cmake_modules/FindQuickHull.cmake
===================================================================
--- cmake_modules/FindQuickHull.cmake
+++ cmake_modules/FindQuickHull.cmake
@@ -1,6 +1,6 @@
FIND_PATH(
QHULL_DIR
-NAMES include/qhull/qhull.h
+NAMES include/libqhull/libqhull.h
PATHS /usr /usr/local
DOC "the top directory of qhull")

Index: lib/util/BVutil.cpp
===================================================================
--- lib/util/BVutil.cpp
+++ lib/util/BVutil.cpp
@@ -1,6 +1,6 @@
#include <iostream>
extern "C" {
-#include <qhull/qhull_a.h>
+#include <libqhull/qhull_a.h>
}
#include <hrpModel/Link.h>
#include "BVutil.h"
Index: rtc/CollisionDetector/SetupCollisionPair.cpp
===================================================================
--- rtc/CollisionDetector/SetupCollisionPair.cpp
+++ rtc/CollisionDetector/SetupCollisionPair.cpp
@@ -16,7 +16,7 @@
#include <hrpCollision/ColdetModel.h>
#include "CollisionDetector.h"
extern "C" {
-#include <qhull/qhull_a.h>
+#include <libqhull/qhull_a.h>
}

#define deg2rad(x) ((x)*M_PI/180)
Index: rtc/CollisionDetector/vclip_1.0/src/PolyTree.C
===================================================================
--- rtc/CollisionDetector/vclip_1.0/src/PolyTree.C
+++ rtc/CollisionDetector/vclip_1.0/src/PolyTree.C
@@ -58,7 +58,7 @@

#if QHULL
extern "C" {
-#include "qhull/qhull_a.h"
+#include "libqhull/qhull_a.h"
}
//char qh_version[] = "vclip 1.0";
#endif

0 comments on commit cf31247

Please sign in to comment.