Skip to content

Commit

Permalink
Custom triplet for windows to use UE compatible MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
pasotee committed Nov 7, 2024
1 parent 51272db commit 6a261da
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/plugin-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,25 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install forced MSVC
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToAdd= @(
"Microsoft.VisualStudio.Component.VC.14.34.17.4.x86.x64"
)
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# should be run twice
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
- name: Install via vcpkg
run: |
git clone https://github.com/microsoft/vcpkg build/vcpkg
git -C build/vcpkg checkout ${{ env.VCPKG_COMMIT_HASH }}
./build/vcpkg/bootstrap-vcpkg.bat
./build/vcpkg/vcpkg install configcat[core,sha] --triplet x64-windows
./build/vcpkg/vcpkg install configcat[core,sha] --triplet x64-windows-unreal --overlay-triplets "$env:GITHUB_WORKSPACE/Extras/triplets"
- uses: actions/upload-artifact@v3
with:
Expand Down
5 changes: 5 additions & 0 deletions Extras/triplets/x64-windows-unreal.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)

set(VCPKG_PLATFORM_TOOLSET_VERSION 14.34)

0 comments on commit 6a261da

Please sign in to comment.