Skip to content

Commit 0dd8d5c

Browse files
committed
cmake: Specify Windows plugin path in test_bitcoin-qt property
1 parent 48d4b93 commit 0dd8d5c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,6 @@ jobs:
295295
- name: Run test suite
296296
if: matrix.job-type == 'standard'
297297
working-directory: build
298-
env:
299-
QT_PLUGIN_PATH: '${{ github.workspace }}\build\vcpkg_installed\x64-windows\Qt6\plugins'
300298
run: |
301299
ctest --output-on-failure --stop-on-failure -j $NUMBER_OF_PROCESSORS -C Release
302300

src/qt/test/CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,15 @@ add_test(NAME test_bitcoin-qt
4040
COMMAND test_bitcoin-qt
4141
)
4242
if(WIN32 AND VCPKG_TARGET_TRIPLET)
43-
# On Windows, vcpkg configures Qt with `-opengl dynamic`, which makes
44-
# the "minimal" platform plugin unusable due to internal Qt bugs.
45-
set_tests_properties(test_bitcoin-qt PROPERTIES
46-
ENVIRONMENT "QT_QPA_PLATFORM=windows"
43+
set(plugin_path "$<SHELL_PATH:$<PATH:GET_PARENT_PATH,$<PATH:GET_PARENT_PATH,$<TARGET_PROPERTY:Qt6::QWindowsIntegrationPlugin,LOCATION_$<CONFIG>>>>>")
44+
set_property(TEST test_bitcoin-qt APPEND PROPERTY
45+
ENVIRONMENT_MODIFICATION
46+
# On Windows, vcpkg configures Qt with `-opengl dynamic`, which makes
47+
# the "minimal" platform plugin unusable due to internal Qt bugs.
48+
QT_QPA_PLATFORM=set:windows
49+
QT_PLUGIN_PATH=set:${plugin_path}
4750
)
51+
unset(plugin_path)
4852
endif()
4953

5054
install_binary_component(test_bitcoin-qt INTERNAL)

0 commit comments

Comments
 (0)