add custom triplets for vcpkg

* Build only release packages.

* Use the "/fp:fast" compiler option for libsamplerate, which greatly increases
  speed (up to 10x for SRC_LINEAR).
This commit is contained in:
Roman Fomin 2023-01-11 14:54:28 +07:00
parent 95cde386eb
commit cde9dd6aec
3 changed files with 20 additions and 1 deletions

View File

@ -50,7 +50,8 @@ jobs:
- name: Configure
run: |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_WERROR=ON `
-DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake"
-DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_OVERLAY_TRIPLETS="triplets-custom"
- name: Build
run: cmake --build build

View File

@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)
if(${PORT} MATCHES "libsamplerate")
set(VCPKG_CXX_FLAGS "/fp:fast")
set(VCPKG_C_FLAGS "/fp:fast")
endif()

View File

@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)
if(${PORT} MATCHES "libsamplerate")
set(VCPKG_CXX_FLAGS "/fp:fast")
set(VCPKG_C_FLAGS "/fp:fast")
endif()