From 0dd8d5c237e2fdb0168d9ca644e7f2f5a8b6ed72 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:02:29 +0000 Subject: [PATCH] cmake: Specify Windows plugin path in `test_bitcoin-qt` property --- .github/workflows/ci.yml | 2 -- src/qt/test/CMakeLists.txt | 12 ++++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ffaafe329a..e4c5c8abcc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -295,8 +295,6 @@ jobs: - name: Run test suite if: matrix.job-type == 'standard' working-directory: build - env: - QT_PLUGIN_PATH: '${{ github.workspace }}\build\vcpkg_installed\x64-windows\Qt6\plugins' run: | ctest --output-on-failure --stop-on-failure -j $NUMBER_OF_PROCESSORS -C Release diff --git a/src/qt/test/CMakeLists.txt b/src/qt/test/CMakeLists.txt index af28271356b..2fb8beadea3 100644 --- a/src/qt/test/CMakeLists.txt +++ b/src/qt/test/CMakeLists.txt @@ -40,11 +40,15 @@ add_test(NAME test_bitcoin-qt COMMAND test_bitcoin-qt ) if(WIN32 AND VCPKG_TARGET_TRIPLET) - # On Windows, vcpkg configures Qt with `-opengl dynamic`, which makes - # the "minimal" platform plugin unusable due to internal Qt bugs. - set_tests_properties(test_bitcoin-qt PROPERTIES - ENVIRONMENT "QT_QPA_PLATFORM=windows" + set(plugin_path "$>>>>") + set_property(TEST test_bitcoin-qt APPEND PROPERTY + ENVIRONMENT_MODIFICATION + # On Windows, vcpkg configures Qt with `-opengl dynamic`, which makes + # the "minimal" platform plugin unusable due to internal Qt bugs. + QT_QPA_PLATFORM=set:windows + QT_PLUGIN_PATH=set:${plugin_path} ) + unset(plugin_path) endif() install_binary_component(test_bitcoin-qt INTERNAL)