diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-09-28 14:01:41 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-09-28 15:00:47 +0200 |
commit | c306176a7889dcc830d95fc7a8c9c5e51c3ab1c4 (patch) | |
tree | e91331fa297bfbaadfeac1fa864e6dee7d9d4ee9 | |
parent | c2804d27eafcf534cc78ba15f96d2682202a34eb (diff) |
CMake: Fix porting of basic example
In a static build, the qmake project explicitly linked to the virtual
keyboard plugin. This was missing in CMake.
Amends f8db8d979afc38215f9bbfc3daaf75cfd61b5f1d
Pick-to: 6.2 6.4
Fixes: QTBUG-106894
Change-Id: Idfc8dd018825a284ebd82be59a63463db960d0db
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
-rw-r--r-- | examples/virtualkeyboard/basic/CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/virtualkeyboard/basic/CMakeLists.txt b/examples/virtualkeyboard/basic/CMakeLists.txt index 83647ca3..1fcaf438 100644 --- a/examples/virtualkeyboard/basic/CMakeLists.txt +++ b/examples/virtualkeyboard/basic/CMakeLists.txt @@ -13,6 +13,9 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/virtualkeyboard/basic") find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick) +if(QT_FEATURE_static) + find_package(Qt6 REQUIRED COMPONENTS Svg) +endif() qt_add_executable(basic main.cpp @@ -51,10 +54,12 @@ qt6_add_resources(basic "demo" ) if(QT_FEATURE_static) - find_package(Qt6 REQUIRED COMPONENTS Svg) - target_link_libraries(basic PUBLIC + target_link_libraries(basic PRIVATE Qt::Svg ) + qt_import_plugins(basic + INCLUDE Qt::QVirtualKeyboardPlugin + ) endif() if(NOT QT_FEATURE_vkb_desktop) |