Skip to content

Commit

Permalink
a few steps towards a working windows pipeline
Browse files Browse the repository at this point in the history
Windows pipeline is now doing what the samples from run-vcpkg and run-cmake
suggest it should do and vcpkg claims that it should handle cmake find_package
calls correctly if you use their vcpkg.cmake as the toolchain.
It's not working, because for some reason the find_package call for Qt still
fails with cmake claiming it can't find a Qt5config.cmake file.
  • Loading branch information
Michel Schmid authored and g3force committed Feb 24, 2024
1 parent e918cd3 commit 89860fa
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,17 @@ jobs:
with:
vcpkgGitCommitId: 8eb57355a4ffb410a2e94c07b4dca2dffbee8e50
vcpkgDirectory: c:/vcpkg # folder must reside in c:\ otherwise qt wont install due to long path errors
# needed to actually install the vcpkg dependencies
runVcpkgInstall: true

- name: Run CMake and run vcpkg to build packages
uses: lukka/run-cmake@v10
with:
configurePreset: "windows-default"
# this preset is needed to actually install the vcpkg dependencies
configurePreset: "ninja-multi-vcpkg"
configPresetAdditionalArgs: "[-DVCPKG_TARGET_TRIPLET=x64-windows]"
buildPreset: "ninja-multi-vcpkg"
buildPresetAdditionalArgs: "['--config Release']"
env:
# [OPTIONAL] Define the vcpkg's triplet you want to enforce, otherwise the default one
# for the hosting system will be automatically choosen (x64 is the default on all
# platforms, e.g. `x64-osx`).
VCPKG_DEFAULT_TRIPLET: "x64-windows"
28 changes: 27 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,32 @@
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
}
},
{
"name": "ninja-multi-vcpkg",
"displayName": "Windows x64 Release vcpkg",
"generator": "Ninja Multi-Config",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": {
"type": "FILEPATH",
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
},
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
}
}
],
"buildPresets": [
{
"name": "ninja-multi-vcpkg",
"configurePreset": "ninja-multi-vcpkg",
"displayName": "Build ninja-multi-vcpkg",
"description": "Build ninja-multi-vcpkg Configurations"
}
]
}
}

0 comments on commit 89860fa

Please sign in to comment.