Skip to content

Commit 0839af0

Browse files
committed
update HAVE_BULLET logic, check with comple, for cross compile environment
1 parent 1fb6605 commit 0839af0

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

irteus/Makefile

+1-10
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,7 @@ INSTALLOBJDIR=$(IRTEUSDIR)/$(ARCHDIR)/obj
4848
INSTALLLIBDIR=$(IRTEUSDIR)/$(ARCHDIR)/lib
4949

5050
# check bullet version
51-
BULLET_VER_MAJOR:=$(shell pkg-config bullet --modversion --silence-errors | cut -f1 -d.)
52-
BULLET_VER_MINOR:=$(shell pkg-config bullet --modversion --silence-errors | cut -f2 -d.)
53-
ifneq ($(and $(BULLET_VER_MAJOR),$(BULLET_VER_MINOR)),)
54-
BULLET_GE_2_83=$(shell [ $(BULLET_VER_MAJOR) -gt 2 -o \( $(BULLET_VER_MAJOR) -eq 2 -a $(BULLET_VER_MINOR) -ge 83 \) ] && echo true)
55-
endif
56-
ifeq ($(BULLET_GE_2_83), true)
57-
HAVE_BULLET=1
58-
else
59-
HAVE_BULLET=0
60-
endif
51+
HAVE_BULLET=$(shell echo "\#include <btBulletCollisionCommon.h>\n\#include <BulletCollision/NarrowPhaseCollision/btGjkCollisionDescription.h>\nint main(){}" > test-bullet.c; $(CXX) -I/usr/include/bullet $(pkg-config bullet --cflags) test-bullet.c -lBulletCollision -lLinearMath $(pkg-config bullet --libs) > /dev/null 2>&1 && echo 1 || echo 0)
6152
$(info "-- HAVE_BULLET = ${HAVE_BULLET}")
6253

6354
ifneq ($(wildcard PQP/*),)

irteus/test/irteus-demo.l

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
(not (some #'null (mapcar #'(lambda (x) (cadr (memq :angle-vector x)))
9696
(crawl-walk-motion-for-sample-robot :go-backward-over nil))))))
9797

98+
#+:cross-environment-can-not-load-libeusgl?
9899
(deftest test-walk-motion-for-robots
99100
(assert
100101
(every #'identity

0 commit comments

Comments
 (0)