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