From b8d667a94de093a85f412ee8c121f11623e4b8a6 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Sat, 6 Mar 2021 18:01:24 -0500 Subject: [PATCH] update libTangerine dependency --- Makefile | 8 ++++++-- README | 20 +++++++++++++------- ext/tangerine | 2 +- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 7a22c1d..b78b032 100644 --- a/Makefile +++ b/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 + diff --git a/README b/README index 09b5ac7..420736b 100644 --- a/README +++ b/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 +# + diff --git a/ext/tangerine b/ext/tangerine index c246258..7676be8 160000 --- a/ext/tangerine +++ b/ext/tangerine @@ -1 +1 @@ -Subproject commit c246258bbdc931027a597be0354a43ac9125b514 +Subproject commit 7676be82d4ea31e94dee2b105a9fa37518dc53cd