From 729171003a11089d1021b87318d1fce9116604b3 Mon Sep 17 00:00:00 2001 From: Alexey Rochev Date: Mon, 16 Dec 2024 22:23:44 +0300 Subject: [PATCH] Add Windows on ARM support --- .github/workflows/build-windows-msvc.yml | 20 +- CMakePresets.json | 650 ++++++++++-------- .../arm64-windows-static.cmake | 10 + vcpkg.json | 9 +- 4 files changed, 380 insertions(+), 309 deletions(-) create mode 100644 vcpkg-overlay-triplets/arm64-windows-static.cmake diff --git a/.github/workflows/build-windows-msvc.yml b/.github/workflows/build-windows-msvc.yml index d04ed680..7e131e93 100644 --- a/.github/workflows/build-windows-msvc.yml +++ b/.github/workflows/build-windows-msvc.yml @@ -20,6 +20,15 @@ on: jobs: build-windows-msvc: + strategy: + fail-fast: false + matrix: + include: + - msvc-arch: 'amd64' + cmake-preset-arch: 'x86_64' + - msvc-arch: 'amd64_arm64' + cmake-preset-arch: 'arm64' + runs-on: windows-latest steps: @@ -30,6 +39,8 @@ jobs: - name: Set up MSVC environment uses: equeim/action-setup-msvc-environment@v1 + with: + arch: ${{ matrix.msvc-arch }} - name: Upgrade LLVM if: inputs.build-with-msvc-clang-toolchain == 'true' @@ -42,19 +53,20 @@ jobs: vcpkg-root: ${{ github.workspace }}\vcpkg binary-cache-path: ${{ github.workspace }}\vcpkg_binary_cache save-cache: ${{ github.event_name != 'pull_request' && inputs.build-with-msvc-clang-toolchain != 'true' }} + cache-key-tag: ${{ matrix.cmake-preset-arch }} - - name: Build Tremotesf with ${{ inputs.build-with-msvc-clang-toolchain == 'true' && 'MSVC + Clang' || 'MSVC' }} toolchain + - name: Build Tremotesf with ${{ inputs.build-with-msvc-clang-toolchain == 'true' && 'MSVC + Clang' || 'MSVC' }} toolchain for ${{ matrix.cmake-preset-arch }} architecture id: build uses: equeim/action-cmake-build@v10 with: - cmake-arguments: --preset ${{ inputs.build-with-msvc-clang-toolchain == 'true' && 'windows-msvc-clang-vcpkg' || 'windows-msvc-vcpkg' }} -D VCPKG_INSTALLED_DIR=${{ github.workspace }}/vcpkg_installed -D TREMOTESF_ASAN=${{ inputs.release-tag == '' && inputs.build-with-msvc-clang-toolchain == 'false' && 'ON' || 'OFF' }} + cmake-arguments: --preset ${{ inputs.build-with-msvc-clang-toolchain == 'true' && 'windows-${{matrix.cmake-preset-arch}}-msvc-clang-vcpkg' || 'windows-${{matrix.cmake-preset-arch}}-msvc-vcpkg' }} -D VCPKG_INSTALLED_DIR=${{ github.workspace }}/vcpkg_installed -D TREMOTESF_ASAN=${{ inputs.release-tag == '' && inputs.build-with-msvc-clang-toolchain == 'false' && 'ON' || 'OFF' }} package: true - name: Archive packages if: inputs.release-tag == '' uses: actions/upload-artifact@v4 with: - name: ${{ inputs.build-with-msvc-clang-toolchain == 'true' && 'windows-msvc-clang-packages' || 'windows-msvc-packages' }} + name: ${{ inputs.build-with-msvc-clang-toolchain == 'true' && 'windows-${{matrix.cmake-preset-arch}}-msvc-clang-packages' || 'windows-${{matrix.cmake-preset-arch}}-msvc-packages' }} retention-days: ${{ github.event_name == 'push' && 7 || 3 }} path: | ${{ steps.build.outputs.build-directory }}\packaging\windows\*.zip @@ -73,6 +85,6 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: ${{ inputs.build-with-msvc-clang-toolchain == 'true' && 'windows-msvc-clang-vcpkg-logs' || 'windows-msvc-vcpkg-logs' }} + name: ${{ inputs.build-with-msvc-clang-toolchain == 'true' && 'windows-${{matrix.cmake-preset-arch}}-msvc-clang-vcpkg-logs' || 'windows-${{matrix.cmake-preset-arch}}-msvc-vcpkg-logs' }} retention-days: ${{ github.event_name == 'push' && 7 || 3 }} path: ${{ env.VCPKG_ROOT }}\buildtrees\*\*.log diff --git a/CMakePresets.json b/CMakePresets.json index 1c3facb8..1ee7efe3 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -1,303 +1,355 @@ { "version": 3, - "configurePresets": [ - { - "name": "base", - "displayName": "Base", - "generator": "Ninja Multi-Config", - "binaryDir": "${sourceDir}/out/build/${presetName}", - "installDir": "${sourceDir}/out/install/${presetName}", - "warnings": { - "dev": true, - "deprecated": true - }, - "cacheVariables": { - "CMAKE_CONFIGURATION_TYPES": "Debug;Release;RelWithDebInfo", - "CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE": "ON" - } - }, - { - "name": "base-vcpkg", - "displayName": "Base vcpkg", - "inherits": "base", - "hidden": true, - "cacheVariables": { - "TREMOTESF_QT6": "ON", - "TREMOTESF_WITH_HTTPLIB": "system", - "VCPKG_INSTALLED_DIR": "${sourceDir}/vcpkg-installed", - "VCPKG_INSTALL_OPTIONS": "--disable-metrics;--clean-buildtrees-after-build;--clean-packages-after-build", - "VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/vcpkg-overlay-triplets" - }, - "toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" - }, - { - "name": "windows-msvc-vcpkg", - "displayName": "Windows with MSVC toolchain and vcpkg", - "inherits": "base-vcpkg", - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - }, - "architecture": { - "value": "x64", - "strategy": "external" - }, - "cacheVariables": { - "VCPKG_TARGET_TRIPLET": "x64-windows-static", - "VCPKG_HOST_TRIPLET": "x64-windows-static" - }, - "vendor": { - "microsoft.com/VisualStudioSettings/CMake/1.0": { - "hostOS": [ - "Windows" - ] + "configurePresets": [ + { + "name": "base", + "generator": "Ninja Multi-Config", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "installDir": "${sourceDir}/out/install/${presetName}", + "warnings": { + "dev": true, + "deprecated": true + }, + "cacheVariables": { + "CMAKE_CONFIGURATION_TYPES": "Debug;Release;RelWithDebInfo", + "CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE": "ON" + } + }, + { + "name": "base-vcpkg", + "inherits": "base", + "hidden": true, + "cacheVariables": { + "TREMOTESF_QT6": "ON", + "TREMOTESF_WITH_HTTPLIB": "system", + "VCPKG_INSTALLED_DIR": "${sourceDir}/vcpkg-installed", + "VCPKG_INSTALL_OPTIONS": "--disable-metrics;--clean-packages-after-build", + "VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/vcpkg-overlay-triplets" + }, + "toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + }, + { + "name": "base-windows-msvc-vcpkg", + "inherits": "base-vcpkg", + "hidden": true, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + }, + "vendor": { + "microsoft.com/VisualStudioSettings/CMake/1.0": { + "hostOS": [ + "Windows" + ] + } + } + }, + { + "name": "windows-arm64-msvc-vcpkg", + "inherits": "base-windows-msvc-vcpkg", + "architecture": { + "value": "arm64", + "strategy": "external" + }, + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "arm64-windows-static", + "VCPKG_HOST_TRIPLET": "x64-windows-release" + } + }, + { + "name": "windows-x86_64-msvc-vcpkg", + "inherits": "base-windows-msvc-vcpkg", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "x64-windows-static", + "VCPKG_HOST_TRIPLET": "x64-windows-static" + } + }, + { + "name": "windows-arm64-msvc-clang-vcpkg", + "inherits": "windows-arm64-msvc-vcpkg", + "cacheVariables": { + "CMAKE_CXX_COMPILER": "clang-cl.exe" + } + }, + { + "name": "windows-x86_64-msvc-clang-vcpkg", + "inherits": "windows-x86_64-msvc-vcpkg", + "cacheVariables": { + "CMAKE_CXX_COMPILER": "clang-cl.exe" + } + }, + { + "name": "base-macos-vcpkg", + "inherits": "base-vcpkg", + "hidden": true, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + } + }, + { + "name": "macos-arm64-vcpkg", + "inherits": "base-macos-vcpkg", + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "arm64-osx-release", + "CMAKE_OSX_ARCHITECTURES": "arm64" + } + }, + { + "name": "macos-x86_64-vcpkg", + "inherits": "base-macos-vcpkg", + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "x64-osx-release", + "CMAKE_OSX_ARCHITECTURES": "x86_64" + } } - } - }, - { - "name": "windows-msvc-clang-vcpkg", - "displayName": "Windows with MSVC + Clang toolchain and vcpkg", - "inherits": "windows-msvc-vcpkg", - "cacheVariables": { - "CMAKE_CXX_COMPILER": "clang-cl.exe" - } - }, - { - "name": "base-macos-vcpkg", - "displayName": "Base macOS with vcpkg", - "inherits": "base-vcpkg", - "hidden": true, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Darwin" - } - }, - { - "name": "macos-arm64-vcpkg", - "displayName": "macOS arm64 with vcpkg", - "inherits": "base-macos-vcpkg", - "cacheVariables": { - "VCPKG_TARGET_TRIPLET": "arm64-osx-release", - "CMAKE_OSX_ARCHITECTURES": "arm64" - } - }, - { - "name": "macos-x86_64-vcpkg", - "displayName": "macOS x86_64 with vcpkg", - "inherits": "base-macos-vcpkg", - "cacheVariables": { - "VCPKG_TARGET_TRIPLET": "x64-osx-release", - "CMAKE_OSX_ARCHITECTURES": "x86_64" - } - } - ], - "buildPresets": [ - { - "name": "base-debug", - "displayName": "Debug", - "configurePreset": "base", - "configuration": "Debug" - }, - { - "name": "base-release", - "displayName": "Release", - "configurePreset": "base", - "configuration": "Release" - }, - { - "name": "base-relwithdebinfo", - "displayName": "RelWithDebInfo", - "configurePreset": "base", - "configuration": "RelWithDebInfo" - }, - { - "name": "windows-msvc-vcpkg-debug", - "displayName": "Debug", - "configurePreset": "windows-msvc-vcpkg", - "configuration": "Debug" - }, - { - "name": "windows-msvc-vcpkg-release", - "displayName": "Release", - "configurePreset": "windows-msvc-vcpkg", - "configuration": "Release" - }, - { - "name": "windows-msvc-vcpkg-relwithdebinfo", - "displayName": "RelWithDebInfo", - "configurePreset": "windows-msvc-vcpkg", - "configuration": "RelWithDebInfo" - }, - { - "name": "windows-msvc-clang-vcpkg-debug", - "displayName": "Debug", - "configurePreset": "windows-msvc-clang-vcpkg", - "configuration": "Debug" - }, - { - "name": "windows-msvc-clang-vcpkg-release", - "displayName": "Release", - "configurePreset": "windows-msvc-clang-vcpkg", - "configuration": "Release" - }, - { - "name": "windows-msvc-clang-vcpkg-relwithdebinfo", - "displayName": "RelWithDebInfo", - "configurePreset": "windows-msvc-clang-vcpkg", - "configuration": "RelWithDebInfo" - }, - { - "name": "macos-arm64-vcpkg-debug", - "displayName": "Debug", - "configurePreset": "macos-arm64-vcpkg", - "configuration": "Debug" - }, - { - "name": "macos-arm64-vcpkg-release", - "displayName": "Release", - "configurePreset": "macos-arm64-vcpkg", - "configuration": "Release" - }, - { - "name": "macos-arm64-vcpkg-relwithdebinfo", - "displayName": "RelWithDebInfo", - "configurePreset": "macos-arm64-vcpkg", - "configuration": "RelWithDebInfo" - }, - { - "name": "macos-x86_64-vcpkg-debug", - "displayName": "Debug", - "configurePreset": "macos-x86_64-vcpkg", - "configuration": "Debug" - }, - { - "name": "macos-x86_64-vcpkg-release", - "displayName": "Release", - "configurePreset": "macos-x86_64-vcpkg", - "configuration": "Release" - }, - { - "name": "macos-x86_64-vcpkg-relwithdebinfo", - "displayName": "RelWithDebInfo", - "configurePreset": "macos-x86_64-vcpkg", - "configuration": "RelWithDebInfo" - } - ], - "testPresets": [ - { - "name": "base", - "displayName": "Base", - "hidden": true, - "output": { - "outputOnFailure": true - } - }, - { - "name": "base-debug", - "displayName": "Debug", - "inherits": "base", - "configurePreset": "base", - "configuration": "Debug" - }, - { - "name": "base-release", - "displayName": "Release", - "inherits": "base", - "configurePreset": "base", - "configuration": "Release" - }, - { - "name": "base-relwithdebinfo", - "displayName": "RelWithDebInfo", - "inherits": "base", - "configurePreset": "base", - "configuration": "RelWithDebInfo" - }, - { - "name": "windows-msvc-vcpkg-debug", - "displayName": "Debug", - "inherits": "base", - "configurePreset": "windows-msvc-vcpkg", - "configuration": "Debug" - }, - { - "name": "windows-msvc-vcpkg-release", - "displayName": "Release", - "inherits": "base", - "configurePreset": "windows-msvc-vcpkg", - "configuration": "Release" - }, - { - "name": "windows-msvc-vcpkg-relwithdebinfo", - "displayName": "RelWithDebInfo", - "inherits": "base", - "configurePreset": "windows-msvc-vcpkg", - "configuration": "RelWithDebInfo" - }, - { - "name": "windows-msvc-clang-vcpkg-debug", - "displayName": "Debug", - "inherits": "base", - "configurePreset": "windows-msvc-clang-vcpkg", - "configuration": "Debug" - }, - { - "name": "windows-msvc-clang-vcpkg-release", - "displayName": "Release", - "inherits": "base", - "configurePreset": "windows-msvc-clang-vcpkg", - "configuration": "Release" - }, - { - "name": "windows-msvc-clang-vcpkg-relwithdebinfo", - "displayName": "RelWithDebInfo", - "inherits": "base", - "configurePreset": "windows-msvc-clang-vcpkg", - "configuration": "RelWithDebInfo" - }, - { - "name": "macos-arm64-vcpkg-debug", - "displayName": "Debug", - "inherits": "base", - "configurePreset": "macos-arm64-vcpkg", - "configuration": "Debug" - }, - { - "name": "macos-arm64-vcpkg-release", - "displayName": "Release", - "inherits": "base", - "configurePreset": "macos-arm64-vcpkg", - "configuration": "Release" - }, - { - "name": "macos-arm64-vcpkg-relwithdebinfo", - "displayName": "RelWithDebInfo", - "inherits": "base", - "configurePreset": "macos-arm64-vcpkg", - "configuration": "RelWithDebInfo" - }, - { - "name": "macos-x86_64-vcpkg-debug", - "displayName": "Debug", - "inherits": "base", - "configurePreset": "macos-x86_64-vcpkg", - "configuration": "Debug" - }, - { - "name": "macos-x86_64-vcpkg-release", - "displayName": "Release", - "inherits": "base", - "configurePreset": "macos-x86_64-vcpkg", - "configuration": "Release" - }, - { - "name": "macos-x86_64-vcpkg-relwithdebinfo", - "displayName": "RelWithDebInfo", - "inherits": "base", - "configurePreset": "macos-x86_64-vcpkg", - "configuration": "RelWithDebInfo" - } - ] + ], + "buildPresets": [ + { + "name": "base-debug", + "configurePreset": "base", + "configuration": "Debug" + }, + { + "name": "base-release", + "configurePreset": "base", + "configuration": "Release" + }, + { + "name": "base-relwithdebinfo", + "configurePreset": "base", + "configuration": "RelWithDebInfo" + }, + { + "name": "windows-arm64-msvc-vcpkg-debug", + "configurePreset": "windows-arm64-msvc-vcpkg", + "configuration": "Debug" + }, + { + "name": "windows-arm64-msvc-vcpkg-release", + "configurePreset": "windows-arm64-msvc-vcpkg", + "configuration": "Release" + }, + { + "name": "windows-arm64-msvc-vcpkg-relwithdebinfo", + "configurePreset": "windows-arm64-msvc-vcpkg", + "configuration": "RelWithDebInfo" + }, + { + "name": "windows-x86_64-msvc-vcpkg-debug", + "configurePreset": "windows-x86_64-msvc-vcpkg", + "configuration": "Debug" + }, + { + "name": "windows-x86_64-msvc-vcpkg-release", + "configurePreset": "windows-x86_64-msvc-vcpkg", + "configuration": "Release" + }, + { + "name": "windows-x86_64-msvc-vcpkg-relwithdebinfo", + "configurePreset": "windows-x86_64-msvc-vcpkg", + "configuration": "RelWithDebInfo" + }, + { + "name": "windows-arm64-msvc-clang-vcpkg-debug", + "configurePreset": "windows-arm64-msvc-clang-vcpkg", + "configuration": "Debug" + }, + { + "name": "windows-arm64-msvc-clang-vcpkg-release", + "configurePreset": "windows-arm64-msvc-clang-vcpkg", + "configuration": "Release" + }, + { + "name": "windows-arm64-msvc-clang-vcpkg-relwithdebinfo", + "configurePreset": "windows-arm64-msvc-clang-vcpkg", + "configuration": "RelWithDebInfo" + }, + { + "name": "windows-x86_64-msvc-clang-vcpkg-debug", + "configurePreset": "windows-x86_64-msvc-clang-vcpkg", + "configuration": "Debug" + }, + { + "name": "windows-x86_64-msvc-clang-vcpkg-release", + "configurePreset": "windows-x86_64-msvc-clang-vcpkg", + "configuration": "Release" + }, + { + "name": "windows-x86_64-msvc-clang-vcpkg-relwithdebinfo", + "configurePreset": "windows-x86_64-msvc-clang-vcpkg", + "configuration": "RelWithDebInfo" + }, + { + "name": "macos-arm64-vcpkg-debug", + "configurePreset": "macos-arm64-vcpkg", + "configuration": "Debug" + }, + { + "name": "macos-arm64-vcpkg-release", + "configurePreset": "macos-arm64-vcpkg", + "configuration": "Release" + }, + { + "name": "macos-arm64-vcpkg-relwithdebinfo", + "configurePreset": "macos-arm64-vcpkg", + "configuration": "RelWithDebInfo" + }, + { + "name": "macos-x86_64-vcpkg-debug", + "configurePreset": "macos-x86_64-vcpkg", + "configuration": "Debug" + }, + { + "name": "macos-x86_64-vcpkg-release", + "configurePreset": "macos-x86_64-vcpkg", + "configuration": "Release" + }, + { + "name": "macos-x86_64-vcpkg-relwithdebinfo", + "configurePreset": "macos-x86_64-vcpkg", + "configuration": "RelWithDebInfo" + } + ], + "testPresets": [ + { + "name": "base", + "hidden": true, + "output": { + "outputOnFailure": true + } + }, + { + "name": "base-debug", + "inherits": "base", + "configurePreset": "base", + "configuration": "Debug" + }, + { + "name": "base-release", + "inherits": "base", + "configurePreset": "base", + "configuration": "Release" + }, + { + "name": "base-relwithdebinfo", + "inherits": "base", + "configurePreset": "base", + "configuration": "RelWithDebInfo" + }, + { + "name": "windows-arm64-msvc-vcpkg-debug", + "inherits": "base", + "configurePreset": "windows-arm64-msvc-vcpkg", + "configuration": "Debug" + }, + { + "name": "windows-arm64-msvc-vcpkg-release", + "inherits": "base", + "configurePreset": "windows-arm64-msvc-vcpkg", + "configuration": "Release" + }, + { + "name": "windows-arm64-msvc-vcpkg-relwithdebinfo", + "inherits": "base", + "configurePreset": "windows-arm64-msvc-vcpkg", + "configuration": "RelWithDebInfo" + }, + { + "name": "windows-x86_64-msvc-vcpkg-debug", + "inherits": "base", + "configurePreset": "windows-x86_64-msvc-vcpkg", + "configuration": "Debug" + }, + { + "name": "windows-x86_64-msvc-vcpkg-release", + "inherits": "base", + "configurePreset": "windows-x86_64-msvc-vcpkg", + "configuration": "Release" + }, + { + "name": "windows-x86_64-msvc-vcpkg-relwithdebinfo", + "inherits": "base", + "configurePreset": "windows-x86_64-msvc-vcpkg", + "configuration": "RelWithDebInfo" + }, + { + "name": "windows-arm64-msvc-clang-vcpkg-debug", + "inherits": "base", + "configurePreset": "windows-arm64-msvc-clang-vcpkg", + "configuration": "Debug" + }, + { + "name": "windows-arm64-msvc-clang-vcpkg-release", + "inherits": "base", + "configurePreset": "windows-arm64-msvc-clang-vcpkg", + "configuration": "Release" + }, + { + "name": "windows-arm64-msvc-clang-vcpkg-relwithdebinfo", + "inherits": "base", + "configurePreset": "windows-arm64-msvc-clang-vcpkg", + "configuration": "RelWithDebInfo" + }, + { + "name": "windows-x86_64-msvc-clang-vcpkg-debug", + "inherits": "base", + "configurePreset": "windows-x86_64-msvc-clang-vcpkg", + "configuration": "Debug" + }, + { + "name": "windows-x86_64-msvc-clang-vcpkg-release", + "inherits": "base", + "configurePreset": "windows-x86_64-msvc-clang-vcpkg", + "configuration": "Release" + }, + { + "name": "windows-x86_64-msvc-clang-vcpkg-relwithdebinfo", + "inherits": "base", + "configurePreset": "windows-x86_64-msvc-clang-vcpkg", + "configuration": "RelWithDebInfo" + }, + { + "name": "macos-arm64-vcpkg-debug", + "inherits": "base", + "configurePreset": "macos-arm64-vcpkg", + "configuration": "Debug" + }, + { + "name": "macos-arm64-vcpkg-release", + "inherits": "base", + "configurePreset": "macos-arm64-vcpkg", + "configuration": "Release" + }, + { + "name": "macos-arm64-vcpkg-relwithdebinfo", + "inherits": "base", + "configurePreset": "macos-arm64-vcpkg", + "configuration": "RelWithDebInfo" + }, + { + "name": "macos-x86_64-vcpkg-debug", + "inherits": "base", + "configurePreset": "macos-x86_64-vcpkg", + "configuration": "Debug" + }, + { + "name": "macos-x86_64-vcpkg-release", + "inherits": "base", + "configurePreset": "macos-x86_64-vcpkg", + "configuration": "Release" + }, + { + "name": "macos-x86_64-vcpkg-relwithdebinfo", + "inherits": "base", + "configurePreset": "macos-x86_64-vcpkg", + "configuration": "RelWithDebInfo" + } + ] } diff --git a/vcpkg-overlay-triplets/arm64-windows-static.cmake b/vcpkg-overlay-triplets/arm64-windows-static.cmake new file mode 100644 index 00000000..cd7a8282 --- /dev/null +++ b/vcpkg-overlay-triplets/arm64-windows-static.cmake @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2015-2024 Alexey Rochev +# +# SPDX-License-Identifier: CC0-1.0 + +include("${VCPKG_ROOT_DIR}/triplets/community/arm64-windows-static.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/../cmake/WindowsMinimumVersion.cmake") +# /await:strict - use C++20 coroutines ABI when building C++17 dependencies +set(flags "/await:strict /DWINVER=${TREMOTESF_WINDOWS_WINVER_MACRO} /D_WIN32_WINNT=${TREMOTESF_WINDOWS_WINVER_MACRO}") +set(VCPKG_CXX_FLAGS "${flags}") +set(VCPKG_C_FLAGS "${flags}") diff --git a/vcpkg.json b/vcpkg.json index 38dd373a..af7cc359 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -7,11 +7,7 @@ { "name": "qtbase", "host": true, - "default-features": false, - "features": [ - "network", - "widgets" - ] + "default-features": false }, { "name": "qtbase", @@ -49,7 +45,8 @@ "cpp-httplib", { "name": "pkgconf", - "platform": "windows" + "platform": "windows", + "host": true } ] }