Skip to content

Commit

Permalink
work around bug in install-qt-action :)
Browse files Browse the repository at this point in the history
  • Loading branch information
p0358 committed Oct 25, 2024
1 parent e99a114 commit 64ee0aa
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 64ee0aa

Please sign in to comment.