From 64ee0aaccf420889ab0d3bd79f9904c6d4fc7795 Mon Sep 17 00:00:00 2001 From: p0358 Date: Fri, 25 Oct 2024 02:38:19 +0200 Subject: [PATCH] work around bug in install-qt-action :) --- .github/workflows/cmake.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 15fb88f..6bdbef0 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -61,7 +61,7 @@ jobs: echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - name: Create Qt dir on Linux - if: env.QT_HOST == 'linux' + if: matrix.os != 'windows-latest' run: | mkdir /Qt chmod 777 /Qt @@ -77,6 +77,20 @@ jobs: dir: '/' setup-python: false + - name: Fix env vars if needed + uses: actions/github-script@v7 + with: + script: | + # QT_ROOT_DIR + if (process.env.QT_ROOT_DIR) { + core.exportVariable('QT_ROOT_DIR', process.env.QT_ROOT_DIR.replace(/[/\\]bin[/\\]qmake[^/\\]*/i, "")); + core.exportVariable('Qt6_DIR', process.env.QT_ROOT_DIR + "/lib/cmake"); + } + if (process.env.QT_PLUGIN_PATH) + core.exportVariable('QT_PLUGIN_PATH', process.env.QT_PLUGIN_PATH.replace(/[/\\]bin[/\\]qmake[^/\\]*/i, "")); + if (process.env.QML2_IMPORT_PATH) + core.exportVariable('QML2_IMPORT_PATH', process.env.QML2_IMPORT_PATH.replace(/[/\\]bin[/\\]qmake[^/\\]*/i, "")); + - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type