From 409d68567b6ec0d105c5e8c09d74b9ef3ad6ab6c Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Fri, 5 Mar 2021 20:56:41 -0500 Subject: [PATCH] add assimp workaround and instructions in README --- Makefile | 8 ++++++++ README | 27 ++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8e5c732..7a22c1d 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,14 @@ SOURCES := $(SRCDIR)/main.cpp OBJECTS := $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(SOURCES)) 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) +CXXFLAGS += -I$(ASSIMP_DIR)/include +LDFLAGS := -lSDL2 -lGLEW -lGL -L$(ASSIMP_DIR)/lib -lassimp +endif + all: mkdirs $(BIN) $(TEST_BIN) .PHONY: all diff --git a/README b/README index c7a7e91..09b5ac7 100644 --- a/README +++ b/README @@ -7,17 +7,34 @@ Dependencies: https://github.com/catchorg/Catch2/blob/devel/docs/Readme.md TODO: - add git submodule for libTangerine - try out Catch2 for testing: https://github.com/catchorg/Catch2 + add GUI to demo application for modifying orbit parameters + add equations for parabolic and hyperbolic trajectories + make algorithm for Hohmann transfer orbits you know, make the actual game Building: install dependencies for your environment: - eg) $ sudo pacman -S assimp glew glm sdl2 catch2 gcc make + Arch) $ sudo pacman -S assimp glew glm sdl2 catch2 gcc make + Fedora) $ sudo dnf install assimp-devel glew-devel glm-devel \ + SDL2-devel catch-devel gcc-c++ make checkout, and initialise submodule dependencies: - $ git submodule init - $ git submodule update --recursive + $ git submodule update --init --recursive build: $ make 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 + + For example after doing the git submodule commands above do: + + $ cd ext/tangerine + $ make build_assimp && USE_INTERNAL_ASSIMP=y make + + then, to run the demo, + + $ cd ../../bin + $ LD_LIBRARY_PATH=../ext/tangerine/ext/assimp/lib ./orbital_shipping +