From e7e37888fbfc8c27f66399c02b4b43b598e9c62d Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sun, 21 Aug 2022 17:49:15 -0400 Subject: [PATCH] Add CI for assimp target build flag + Update README --- .github/workflows/build-test.yml | 38 ++++++++++++++++++++++++++++++++ README.md | 10 ++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index d69b0a2..0157c72 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -39,3 +39,41 @@ jobs: run: | cmake -S . -B build/ ${{ matrix.cmake }} && cmake --build build/ \ --target qtk-main + + Build-Qtk-Assimp-Targets: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + include: + - os: ubuntu-latest + cmake: -DCMAKE_PREFIX_PATH="/home/runner/work/qtk/Qt/6.3.1/gcc_64/" -DQTK_UPDATE_SUBMODULES=OFF + - os: macos-latest + cmake: -DCMAKE_PREFIX_PATH="/home/runner/work/qtk/Qt/6.3.1/gcc_64/" -DASSIMP_NEW_INTERFACE=ON -DQTK_UPDATE_SUBMODULES=OFF + + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + + - name: Install Qt + uses: jurplel/install-qt-action@v2 + with: + version: '6.3.1' + + - name: Install Assimp MacOS + if: matrix.os == 'macos-latest' + shell: bash + run: | + brew install assimp + + - name: Install Assimp Ubuntu + if: matrix.os == 'ubuntu-latest' + shell: bash + run: | + sudo apt install libassimp-dev + + - name: Build Qtk + shell: bash + run: | + cmake -S . -B build/ ${{ matrix.cmake }} && cmake --build build/ \ + --target qtk-main diff --git a/README.md b/README.md index ca762a2..c4f7986 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ To get textures loading on models look into [material files](http://www.paulbour and see some examples in the `resources/models/` directory. -### Building +### Source Builds Builds are configured for CLion or [Qt Creator](https://github.com/qt-creator/qt-creator). Simply open the root `CMakeLists.txt` with either of these editors and configurations will be loaded. @@ -41,6 +41,14 @@ cmake -DQTK_UPDATE_SUBMODULES=OFF -DCMAKE_PREFIX_PATH=$HOME/Qt/6.3.1/gcc_64 -S q ./qtk/build/qtk-main ``` +If you are building on **Windows / Mac** and bringing your own installation of Assimp, consider setting the `-DASSIMP_NEW_INTERFACE` build flag. +```bash +cmake -DASSIMP_NEW_INTERFACE=ON -DQTK_UPDATE_SUBMODULES=OFF -DCMAKE_PREFIX_PATH=$HOME/Qt/6.3.1/gcc_64;/path/to/assimp/ -S qtk/ -B qtk/build/ && cmake --build qtk/build/ -j $(nproc --ignore=2) --target qtk-main +``` + + +### Controls + You can fly around the scene if you hold the right mouse button and use WASD. If you see a small triangle floating by a model it represents the light source that is being used for the shader rendering the model. These appear on models