From 29ad8b1b17cebad33f57b565984d8c6516d96c10 Mon Sep 17 00:00:00 2001 From: Julia Nechaevskaya Date: Thu, 7 Nov 2024 21:54:38 +0300 Subject: [PATCH] Make local MSVC build independent of `builtin-baseline` (#21) * Better local build * Proper branch * Remove vcpkg.json for classic mode * Bash shell * Go to main branch --- .github/workflows/main.yml | 9 ++++++++- cmake/triplets/x64-windows-static-release.cmake | 6 ++++++ vcpkg.json | 6 ------ 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 cmake/triplets/x64-windows-static-release.cmake diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8bcc969..df2910a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,9 +32,16 @@ jobs: run: | .\vcpkg\bootstrap-vcpkg.bat + - name: Remove vcpkg.json for classic mode + shell: bash + run: | + if [ -f "vcpkg.json" ]; then + rm "vcpkg.json" + fi + - name: Install Dependencies with vcpkg run: | - .\vcpkg\vcpkg.exe install --overlay-triplets=cmake/triplets --triplet=x64-windows-static-release + .\vcpkg\vcpkg.exe install sdl2 sdl2-mixer[libflac,libmodplug,mpg123,opusfile] libsamplerate --triplet x64-windows-static-release --overlay-triplets=cmake/triplets - name: Configure CMake run: | diff --git a/cmake/triplets/x64-windows-static-release.cmake b/cmake/triplets/x64-windows-static-release.cmake new file mode 100644 index 0000000..8ebb60f --- /dev/null +++ b/cmake/triplets/x64-windows-static-release.cmake @@ -0,0 +1,6 @@ +set(VCPKG_TARGET_TRIPLET "x64-windows-static-release") +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE static) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_BUILD_TYPE release) diff --git a/vcpkg.json b/vcpkg.json index 1c01838..7a24bdc 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -8,11 +8,5 @@ "features": [ "libflac", "libmodplug", "mpg123", "opusfile" ] }, "libsamplerate" - ], - "overrides": [ - { - "name": "triplet", - "version-string": "x64-windows-static-release" - } ] }