Skip to content

Link vcruntime140 statically. #40

Link vcruntime140 statically.

Link vcruntime140 statically. #40

Workflow file for this run

name: CMake Build
on: [push]
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Protoc
uses: arduino/setup-protoc@v3
# maybe this helps with build times
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
with:
workspaces: "src/rust"
- name: vcpkg
uses: johnwason/vcpkg-action@v6
with:
pkgs: libqrencode
triplet: x86-windows-static
token: ${{ github.token }}
# NOTE: Ninja does not support specifying an architecture, so I am going with the default which seems to be MSBuild
# NOTE: CMAKE_GENERATOR_PLATFORM must take WIN32, not x86 because consistency (thanks to https://stackoverflow.com/questions/28350214/#comment121308920_52846043 and https://github.com/microsoft/vcpkg/issues/15465)
- name: Configure
run: cmake -DCMAKE_GENERATOR_PLATFORM=WIN32 -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x86-windows-static -DVCPKG_MANIFEST_MODE=OFF -DCMAKE_BUILD_TYPE=Release -S . -B build
- name: Build
run: cmake --build build --config Release
- name: Strip
run: strip -s build/Release/libpresage.dll
- name: Upload
uses: actions/upload-artifact@v4
with:
path: build/Release/libpresage.dll
name: libpresage.dll