Browse Source

update libTangerine dependency

main
cinnaboot 5 years ago
parent
commit
b8d667a94d
  1. 8
      Makefile
  2. 20
      README
  3. 2
      ext/tangerine

8
Makefile

@ -1,4 +1,5 @@
SHELL := /bin/sh
OBJDIR := build
SRCDIR := src
TESTDIR := tests
@ -26,7 +27,8 @@ BIN := $(BINDIR)/orbital_shipping
# NOTE: Fixes an issue on Fedora where the default assimp version doesn't
# support glTF2
ifeq ($(USE_INTERNAL_ASSIMP), y)
$(info using internal assimp)
$(warning using internal assimp)
ASSIMP_DIR := $(LIBDIR)/ext/assimp
CXXFLAGS += -I$(ASSIMP_DIR)/include
LDFLAGS := -lSDL2 -lGLEW -lGL -L$(ASSIMP_DIR)/lib -lassimp
endif
@ -38,7 +40,7 @@ all: mkdirs $(BIN) $(TEST_BIN)
-include $(OBJDIR)/*.d
mkdirs:
mkdir -p ./bin ./build
@-mkdir -p ./bin ./build
.PHONY: mkdirs
$(BIN): $(COMMON_OBJECTS) $(OBJECTS) $(LIB)
@ -60,9 +62,11 @@ $(TEST_MAIN_OBJ): $(TEST_MAIN_SOURCE)
$(CXX) $(CXXFLAGS) -c -MMD $(TESTDIR)/tests_main.cpp -o $(OBJDIR)/tests_main.o
$(LIB):
USE_INTERNAL_ASSIMP=$(USE_INTERNAL_ASSIMP) $(MAKE) -C $(LIBDIR) build_assimp
$(MAKE) -C $(LIBDIR)
clean:
rm -rf $(OBJDIR)/* $(BIN) bin/test_orbit
$(MAKE) -C $(LIBDIR) clean
.PHONY: clean

20
README

@ -25,16 +25,22 @@ Building:
binaries will be in ./bin
NOTE: if you get errors regarding assimp when building, you can build a
recent version of assimp with the instructions here:
https://gitlab.com/cinnaboot/tangerine
recent version of assimp by passing USE_INTERNAL_ASSIMP=y to make
For example after doing the git submodule commands above do:
$ cd ext/tangerine
$ make build_assimp && USE_INTERNAL_ASSIMP=y make
$ USE_INTERNAL_ASSIMP=y make
then, to run the demo,
$ cd ../../bin
$ cd bin
$ LD_LIBRARY_PATH=../ext/tangerine/ext/assimp/lib ./orbital_shipping
# TODO:
# (libTangerine) fold in build_assimp to make dependency
# turn off unused default features of internal assimp
# compile assimp as static lib into libTangerine if built internal
# (can remove LD_LIBRARY_PATH requirement)
# (orbital_shipping) update makefile $(LIB) target
# make sure git submodule hashes are updated
#

2
ext/tangerine

@ -1 +1 @@
Subproject commit c246258bbdc931027a597be0354a43ac9125b514
Subproject commit 7676be82d4ea31e94dee2b105a9fa37518dc53cd
Loading…
Cancel
Save