From 60e120ea302058c160e4f00095bc3bccba13968f Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sun, 14 Aug 2022 18:17:05 -0400 Subject: [PATCH] Don't build assimp from source in CI --- .github/workflows/build-test.yml | 46 +++----------------------------- CMakeLists.txt | 3 ++- 2 files changed, 5 insertions(+), 44 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index b080b48..1e97797 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -13,61 +13,21 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] include: - os: ubuntu-latest - cmake: -DCMAKE_PREFIX_PATH="/home/runner/work/qtk/Qt/6.3.1/gcc_64/;../assimp" + cmake: -DCMAKE_PREFIX_PATH="/home/runner/work/qtk/Qt/6.3.1/gcc_64/" - os: windows-latest - cmake: -DCMAKE_PREFIX_PATH="D:/a/qtk/qtk/Qt/6.3.1/mingw81_64/;../assimp" -DASSIMP_NEW_INTERFACE=on + cmake: -DCMAKE_PREFIX_PATH="D:/a/qtk/qtk/Qt/6.3.1/mingw81_64/" - os: macos-latest - cmake: -DCMAKE_PREFIX_PATH="/home/runner/work/qtk/Qt/6.3.1/gcc_64/;../assimp" -DASSIMP_NEW_INTERFACE=on + cmake: -DCMAKE_PREFIX_PATH="/home/runner/work/qtk/Qt/6.3.1/gcc_64/" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - name: Clone Assimp - uses: actions/checkout@v3 - with: - repository: 'assimp/assimp' - path: 'assimp' - - - name: Build Assimp - shell: bash - run: | - pwd - ls - cmake -S assimp/ -B assimp/build/ -DCMAKE_INSTALL_PREFIX=../assimp && cmake --build assimp/build - name: Install Qt uses: jurplel/install-qt-action@v2 with: version: '6.3.1' - # - name: Install Assimp Linux - # if: matrix.os == 'ubuntu-latest' - # shell: bash - # run: | - # sudo apt install libassimp-dev -y - # - # - name: Install Assimp MacOS - # if: matrix.os == 'macos-latest' - # shell: bash - # run: | - # brew install assimp - # - # - name: Install Assimp Windows - # if: matrix.os == 'windows-latest' - # shell: bash - # run: | - # git clone https://github.com/Microsoft/vcpkg.git - # cd vcpkg - # ./bootstrap-vcpkg.sh - # ./vcpkg integrate install - # vcpkg install assimp - - - name: Install Assimp MacOS - if: matrix.os == 'macos-latest' - shell: bash - run: | - brew install assimp - - name: Build Qtk shell: bash run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f2f814..6c4b751 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,12 +22,13 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) # Qtk build options option(QTK_DEBUG "Enable debugger" ON) option(BUILD_SHARED_LIBS "Build shared library" ON) -option(UPDATE_SUBMODULES "Update external project (assimp) git submodule" ON) # Qt options set(QT_DIR "$ENV{HOME}/Code/Clones/Qt/6.3.1/gcc_64/" CACHE PATH "Path to Qt6") # Options for bringing your own assimp installation; Otherwise not needed +# + If assimp is available system-wide we can just set UPDATE_SUBMODULES OFF +option(UPDATE_SUBMODULES "Update external project (assimp) git submodule" ON) set(ASSIMP_DIR "" CACHE PATH "Path to local installation of assimp") option(ASSIMP_NEW_INTERFACE "Use the assimp::assimp interface (WIN / OSX)" OFF)