diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index d2788c6..151d590 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -68,14 +68,16 @@ jobs: if: runner.os == 'Windows' run: | cmake -G "Visual Studio 17 2022" -A x64 + $sourceDir = "${{ github.workspace }}" + $replaceText = "${{ github.workspace }}" + $replacement = '$(SolutionDir)' + + Get-ChildItem -Path $sourceDir -File -Recurse | ForEach-Object { + $content = Get-Content $_.FullName + $newContent = $content -replace [regex]::Escape($replaceText), $replacement + Set-Content -Path $_.FullName -Value $newContent + } - - name: Replace absolute path with relative path - if: runner.os == 'Windows' - uses: jacobtomlinson/gha-find-replace@v3 - with: - find: ${{ github.workspace }} - replace: "$(SolutionDir)" - regex: false - name: Build # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).