You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commit 2312fb2 tried to fix the windows pipeline, but cmake still does not find Qt for some reason.
Qt5 is installed via vcpkg and in the pipeline specifically with https://github.com/lukka/run-vcpkg/tree/v11.0, but the documentation from run-vcpkg says the dependencies are only built if the option runVcpkgInstall is set to true, but suggests it to not use that (and using it does not solve the problem, I have tried that).
Instead it suggests to let https://github.com/lukka/run-cmake/tree/v10 handle it, by using a preset set in CMakePreset.json that sets the CMAKE_TOOLCHAIN_FILE to the vcpkg.cmake contained in the vcpkg installation.
The vcpkg documentation claims that if vcpkg.cmake is used as the toolchain file the find_package calls should just work.
This is what is currently implemented, but it still fails.
Specifically the mentioned commit is heavily inspired by the samples linked in the run-cmake README, i.e. this workflow file https://github.com/lukka/CppBuildTasks-Validation/blob/v10/.github/workflows/hosted-ninja-vcpkg.yml and this CMakePreset.json for its ninja-multi-vcpkg preset: https://github.com/lukka/CppBuildTasks-Validation/blob/v10/cmakepresets/CMakePresets.json
This answer on a vcpkg issue microsoft/vcpkg#11247 (comment) says that it should work if the vcpkg triplet is explicitly set, but that also did not solve the problem, unless I did not set them correctly.
The text was updated successfully, but these errors were encountered:
I also tried setting: set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/cmake/Qt5") set(Qt5_DIR "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/cmake/Qt5") set(CMAKE_PREFIX_PATH "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/cmake/Qt5") find_package(Qt5 COMPONENTS Core Widgets OpenGL Network REQUIRED)
but I still get the 'cannot find Qt5' error and that it wants a Qt5Config.cmake, but if make cmake print out the contents of Qt5_DIR with: file(GLOB qt_dir "${Qt5_DIR}/*") message(FATAL_ERROR ${qt_dir})
(the FATAL_ERROR is just there so that it crashes at the message and I don't have to find the message within a million cmake prints)
I get this output:
"D:/a/grSim/grSim/out/build/ninja-multi-vcpkg/vcpkg_installed/x64-windows/share/cmake/Qt5/Qt5Config.cmakeD:/a/grSim/grSim/out/build/ninja-multi-vcpkg/vcpkg_installed/x64-windows/share/cmake/Qt5/Qt5ConfigVersion.cmakeD:/a/grSim/grSim/out/build/ninja-multi-vcpkg/vcpkg_installed/x64-windows/share/cmake/Qt5/Qt5ModuleLocation.cmake" which clearly contains "D:/a/grSim/grSim/out/build/ninja-multi-vcpkg/vcpkg_installed/x64-windows/share/cmake/Qt5/Qt5Config.cmake"
So whoever picks up this issue in the future: good luck, you're going to need it.
Commit 2312fb2 tried to fix the windows pipeline, but cmake still does not find Qt for some reason.
Qt5 is installed via vcpkg and in the pipeline specifically with https://github.com/lukka/run-vcpkg/tree/v11.0, but the documentation from run-vcpkg says the dependencies are only built if the option runVcpkgInstall is set to true, but suggests it to not use that (and using it does not solve the problem, I have tried that).
Instead it suggests to let https://github.com/lukka/run-cmake/tree/v10 handle it, by using a preset set in CMakePreset.json that sets the CMAKE_TOOLCHAIN_FILE to the vcpkg.cmake contained in the vcpkg installation.
The vcpkg documentation claims that if vcpkg.cmake is used as the toolchain file the find_package calls should just work.
This is what is currently implemented, but it still fails.
Specifically the mentioned commit is heavily inspired by the samples linked in the run-cmake README, i.e. this workflow file https://github.com/lukka/CppBuildTasks-Validation/blob/v10/.github/workflows/hosted-ninja-vcpkg.yml and this CMakePreset.json for its ninja-multi-vcpkg preset: https://github.com/lukka/CppBuildTasks-Validation/blob/v10/cmakepresets/CMakePresets.json
This answer on a vcpkg issue microsoft/vcpkg#11247 (comment) says that it should work if the vcpkg triplet is explicitly set, but that also did not solve the problem, unless I did not set them correctly.
The text was updated successfully, but these errors were encountered: