Win32: Pass triplet option to vcpkg

This commit is contained in:
Nobuyoshi Nakada 2024-07-14 19:09:13 +09:00
parent 7472fff7f1
commit 880b7f1513
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
2 changed files with 11 additions and 5 deletions

View File

@ -54,6 +54,7 @@ jobs:
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
OS_VER: windows-${{ matrix.vs < 2022 && '2019' || matrix.vs }}
VCPKG_DEFAULT_TRIPLET: ${{ matrix.target || 'x64' }}-windows
steps:
- run: md build
@ -143,7 +144,7 @@ jobs:
- name: Install libraries with vcpkg
run: |
vcpkg install --triplet x64-windows
vcpkg install
working-directory: src
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
@ -161,7 +162,7 @@ jobs:
- name: Configure
run: >-
../src/win32/configure.bat --disable-install-doc
--with-opt-dir=D:/a/ruby/ruby/src/vcpkg_installed/x64-windows
--with-opt-dir=D:/a/ruby/ruby/src/vcpkg_installed/%VCPKG_DEFAULT_TRIPLET%
- run: nmake prepare-vcpkg

View File

@ -594,14 +594,19 @@ $(SCRIPTPROGRAMS): $(STUBPROGRAM)
update-src::
@cd "$(srcdir:/=\)" && set LC_TIME=C && $(VCSUP)
!ifndef VCPKG_DEFAULT_TRIPLET
VCPKG_DEFAULT_TRIPLET = $(MACHINE)-windows
!endif
TRIPLET_OPTION = --triplet $(VCPKG_DEFAULT_TRIPLET)
update-vcpkg::
@cd "$(srcdir:/=\)" && set LC_TIME=C && vcpkg x-update-baseline
@cd "$(srcdir:/=\)" && set LC_TIME=C && vcpkg x-update-baseline $(TRIPLET_OPTION)
install-vcpkg::
@cd "$(srcdir:/=\)" && set LC_TIME=C && vcpkg install
@cd "$(srcdir:/=\)" && set LC_TIME=C && vcpkg install $(TRIPLET_OPTION)
prepare-vcpkg::
for %%I in ($(srcdir:/=\)\vcpkg_installed\x64-windows\bin\*.dll) do ( \
for %%I in ($(srcdir:/=\)\vcpkg_installed\$(VCPKG_DEFAULT_TRIPLET)\bin\*.dll) do @( \
if not %%~nI == readline mklink %%~nxI %%I \
)