diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 793eed9..41512c5 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -29,7 +29,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Install dependencies based on OS + # Install dependencies - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | @@ -51,6 +51,13 @@ jobs: choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + # Set up MSVC environment on Windows + - name: Set up MSVC environment + if: matrix.os == 'windows-latest' + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" + $env:CMAKE_PREFIX_PATH = "C:\Qt\6.5.3\msvc2019_64\lib\cmake" + # Configure CMake - name: Configure CMake (Ubuntu and macOS) if: matrix.os != 'windows-latest' @@ -64,10 +71,9 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - $env:CMAKE_PREFIX_PATH = "C:\Qt\6.5.3\msvc2019_64\lib\cmake" cmake -B "${{ github.workspace }}\build" ` -DCMAKE_BUILD_TYPE=Release ` - -DCMAKE_PREFIX_PATH="$env:CMAKE_PREFIX_PATH" ` + -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ` -G "Ninja" ` -S "${{ github.workspace }}" shell: pwsh