Skip to content

Commit 908a594

Browse files
committed
irteus/Maekfile: update HAVE_BULLET logic, check with compile, for cross compile environment
1 parent ecb5236 commit 908a594

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

irteus/Makefile

Lines changed: 1 addition & 10 deletions
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/*),)

0 commit comments

Comments
 (0)