-
|
Hi! Is there any way to force vcpkg to build qtbase with C++20? The reason I want to do this is my Windows application is built with C++20, and I get linker errors ( I've previously built Qt manually using their configure.bat build script like this: call ..\configure.bat^
-prefix "%qt_install_dir%"^
-static^
-static-runtime^
-nomake tests^
-nomake examples^
-platform win32-msvc^
-c++std c++20^
-debug-and-releasewhich works, but I'm trying to move the dependency handling to vcpkg and I'd like to avoid writing my own port. Any suggestions welcome! The application I'm building is part of a big monolith codebase, so it's not necessarily simple to just switch to C++17, or encapsulate the Qt code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Try something like this in your custom triplet: list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_STANDARD=20")https://learn.microsoft.com/en-us/vcpkg/users/triplets#vcpkg_cmake_configure_options |
Beta Was this translation helpful? Give feedback.
Thanks for the answer! Adding
-DCMAKE_CXX_STANDARD=20did not work. However, I was able to solve it by adding-DFEATURE_cxx20=ONto my triplet: