Enables Vcpkg usage for CMake builds

Configures CMake to utilize vcpkg for dependency management on both Linux and Windows platforms.
This ensures consistent build environments across different operating systems and simplifies the integration of external libraries.
This commit is contained in:
2025-10-27 08:07:25 +03:00
parent 063f43e74c
commit 5e4fae9e42

View File

@@ -21,8 +21,6 @@ jobs:
container: archlinux:latest container: archlinux:latest
env: env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg VCPKG_ROOT: ${{ github.workspace }}/vcpkg
OMATH_BUILD_VIA_VCPKG: ON
steps: steps:
- name: Install basic tool-chain with pacman - name: Install basic tool-chain with pacman
shell: bash shell: bash
@@ -42,7 +40,7 @@ jobs:
git clone --depth 1 https://github.com/microsoft/vcpkg "$VCPKG_ROOT" git clone --depth 1 https://github.com/microsoft/vcpkg "$VCPKG_ROOT"
- name: Configure (cmake --preset) - name: Configure (cmake --preset)
shell: bash shell: bash
run: cmake --preset linux-release -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF run: cmake --preset linux-release -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF -DOMATH_BUILD_VIA_VCPKG=ON
- name: Build - name: Build
shell: bash shell: bash
@@ -61,7 +59,6 @@ jobs:
name: Windows (MSVC) name: Windows (MSVC)
runs-on: windows-latest runs-on: windows-latest
env: env:
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
OMATH_BUILD_VIA_VCPKG: ON OMATH_BUILD_VIA_VCPKG: ON
steps: steps:
@@ -76,14 +73,9 @@ jobs:
- name: Set up MSVC developer command-prompt - name: Set up MSVC developer command-prompt
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
- name: Set up vcpkg
shell: pwsh
run: |
git clone --depth 1 https://github.com/microsoft/vcpkg $env:VCPKG_ROOT
- name: Configure (cmake --preset) - name: Configure (cmake --preset)
shell: bash shell: bash
run: cmake --preset windows-release -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF run: cmake --preset windows-release -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF -DOMATH_BUILD_VIA_VCPKG=ON
- name: Build - name: Build
shell: bash shell: bash