diff options
Diffstat (limited to 'examples/quick/customitems')
-rw-r--r-- | examples/quick/customitems/CMakeLists.txt | 5 | ||||
-rw-r--r-- | examples/quick/customitems/painteditem/CMakeLists.txt | 55 |
2 files changed, 56 insertions, 4 deletions
diff --git a/examples/quick/customitems/CMakeLists.txt b/examples/quick/customitems/CMakeLists.txt index 86cb951940..4afbfe3f6b 100644 --- a/examples/quick/customitems/CMakeLists.txt +++ b/examples/quick/customitems/CMakeLists.txt @@ -1,7 +1,4 @@ # Generated from customitems.pro. -# special case begin -# Needs public QML Plugin API -#add_subdirectory(painteditem) -# special case end +add_subdirectory(painteditem) add_subdirectory(maskedmousearea) diff --git a/examples/quick/customitems/painteditem/CMakeLists.txt b/examples/quick/customitems/painteditem/CMakeLists.txt new file mode 100644 index 0000000000..48fb6bc3ea --- /dev/null +++ b/examples/quick/customitems/painteditem/CMakeLists.txt @@ -0,0 +1,55 @@ +# Generated from painteditem.pro. + +cmake_minimum_required(VERSION 3.14) +project(qmltextballoonplugin LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Quick) + +qt6_add_qml_module(qmltextballoonplugin + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/TextBalloonPlugin" + VERSION 1.0 + URI "TextBalloonPlugin" + INSTALL_LOCATION ${INSTALL_EXAMPLEDIR} +) + +target_sources(qmltextballoonplugin PRIVATE + TextBalloonPlugin/plugin.h + textballoon.cpp textballoon.h +) +target_link_libraries(qmltextballoonplugin PUBLIC + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick +) + +# Resources: +set(painteditem_resource_files + "textballoon.h" + "textballoons.qml" +) + +QT6_ADD_RESOURCES(qmltextballoonplugin "painteditem" + PREFIX + "/painteditem" + FILES + ${painteditem_resource_files} +) + + +install(TARGETS qmltextballoonplugin + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |