Skip to content

Commit 6a7c002

Browse files
committed
Windows build fixes
A few fixes to make projectMSDL build on GitHub Actions: - Added missing "glew" vcpkg dependency (as long as we don't use a proper libprojectM vcpkg port) - Add developer command line setup action to fix issues with multiple MSVC toolsets getting mixed up - Enable binary package caching in vcpkg to speed up the build process
1 parent 9f43570 commit 6a7c002

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/build.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,19 @@ jobs:
6565
runs-on: windows-latest
6666

6767
steps:
68+
- name: Setup MSVC dev command prompt
69+
uses: TheMrMilchmann/setup-msvc-dev@v3
70+
with:
71+
arch: x64
72+
toolset: 14.38.33130
73+
74+
- name: Export GitHub Actions cache environment variables
75+
uses: actions/github-script@v6
76+
with:
77+
script: |
78+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
79+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
80+
6881
- name: Checkout libprojectM Sources
6982
uses: actions/checkout@v3
7083
with:
@@ -73,6 +86,8 @@ jobs:
7386
submodules: recursive
7487

7588
- name: Build/Install libprojectM
89+
env:
90+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
7691
run: |
7792
mkdir cmake-build-libprojectm
7893
cmake -G "Visual Studio 17 2022" -A "X64" -S "${{ github.workspace }}/projectm" -B "${{ github.workspace }}/cmake-build-libprojectm" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install-libprojectm" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=NO
@@ -86,6 +101,8 @@ jobs:
86101
submodules: recursive
87102

88103
- name: Build projectMSDL
104+
env:
105+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
89106
run: |
90107
mkdir cmake-build-frontend-sdl2
91108
cmake -G "Visual Studio 17 2022" -A "X64" -S "${{ github.workspace }}/frontend-sdl2" -B "${{ github.workspace }}/cmake-build-frontend-sdl2" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PREFIX_PATH="${{ github.workspace }}/install-libprojectm" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install-frontend-sdl2" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>" -DCMAKE_VERBOSE_MAKEFILE=YES -DSDL2_LINKAGE=static -DBUILD_TESTING=YES

vcpkg.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
33
"dependencies": [
4+
"glew",
45
"sdl2",
56
"poco",
67
"freetype"

0 commit comments

Comments
 (0)