Add vcpkg installation script

This commit is contained in:
Howard Su 2023-12-11 08:17:50 +08:00
parent 76ca4a457a
commit b1609f80cc
4 changed files with 48 additions and 2 deletions

View file

@ -136,7 +136,6 @@ jobs:
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
runs-on: macOS-latest
steps:
@ -200,4 +199,27 @@ jobs:
# files: daedalusX64-macos-x86.tar.gz
# tag_name: ${{ steps.tag.outputs.VERSION }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-windows:
runs-on: windows-latest
envs:
VCPKG_DEFAULT_TRIPLET: x64-windows
steps:
- uses: actions/checkout@v2
- uses: lukka/get-cmake@latest
- name: Setup a new (or from cache) vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: aa628ceb5f15f0c30d4d481f14fa5b2be2b4a658
runVcpkgInstall: true
- name: Run CMake config
run: |
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$ENV:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -G "Visual Studio 16 2019" -A x64
- name: Build
run: |
cmake --build build --config Release

1
.gitignore vendored
View file

@ -28,3 +28,4 @@ Source/tmp
*.cia
*.3dsx
/debug/
/vcpkg_installed/

14
vcpkg-configuration.json Normal file
View file

@ -0,0 +1,14 @@
{
"default-registry": {
"kind": "git",
"baseline": "aa628ceb5f15f0c30d4d481f14fa5b2be2b4a658",
"repository": "https://github.com/microsoft/vcpkg"
},
"registries": [
{
"kind": "artifact",
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
"name": "microsoft"
}
]
}

9
vcpkg.json Normal file
View file

@ -0,0 +1,9 @@
{
"dependencies": [
"zlib",
"glew",
"libpng",
"sdl2",
"sdl2-ttf"
]
}