diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,8 +21,8 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(ECMQtDeclareLoggingCategory) include(ECMAddQch) +include(ECMAddQmlModule) include(KDEPackageAppTemplates) -include(ECMGenerateQmlTypes) include(ECMSetupQtPluginMacroNames) option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) diff --git a/src/declarativeimports/calendar/CMakeLists.txt b/src/declarativeimports/calendar/CMakeLists.txt --- a/src/declarativeimports/calendar/CMakeLists.txt +++ b/src/declarativeimports/calendar/CMakeLists.txt @@ -23,7 +23,24 @@ KF5::CoreAddons ) -install(TARGETS calendarplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/calendar) -install(DIRECTORY qml/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/calendar) +ecm_add_qmlmodule(plasmacalendar + IDENTIFIER org.kde.plasma.calendar + DESTINATION ${KDE_INSTALL_QMLDIR} + PLUGIN calendarplugin + TYPEINFO plugins.qmltypes + VERSION 2.0 +) + +ecm_qmlmodule_objecttypes(plasmacalendar + INITIAL_VERSION 2.0 + OBJECT_TYPES + MonthView qml/MonthView.qml + MonthMenu qml/MonthMenu.qml +) -ecm_generate_qmltypes(org.kde.plasma.calendar 2.0 DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/calendar) +ecm_qmlmodule_internalobjecttypes(plasmacalendar + OBJECT_TYPES + CalendarToolbar qml/CalendarToolbar.qml + DayDelegate qml/DayDelegate.qml + DaysCalendar qml/DaysCalendar.qml +) diff --git a/src/declarativeimports/calendar/qml/qmldir b/src/declarativeimports/calendar/qml/qmldir deleted file mode 100644 --- a/src/declarativeimports/calendar/qml/qmldir +++ /dev/null @@ -1,8 +0,0 @@ -module org.kde.plasma.calendar -plugin calendarplugin - -MonthView 2.0 MonthView.qml -MonthMenu 2.0 MonthMenu.qml -internal CalendarToolbar CalendarToolbar.qml -internal DayDelegate DayDelegate.qml -internal DaysCalendar DaysCalendar.qml diff --git a/src/declarativeimports/core/CMakeLists.txt b/src/declarativeimports/core/CMakeLists.txt --- a/src/declarativeimports/core/CMakeLists.txt +++ b/src/declarativeimports/core/CMakeLists.txt @@ -63,18 +63,25 @@ target_link_libraries(corebindingsplugin Qt5::Gui_GLESv2) endif() -install(TARGETS corebindingsplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/core) -install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/core) - -install(FILES private/DefaultToolTip.qml DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/core/private) +ecm_add_qmlmodule(plasmacore + IDENTIFIER org.kde.plasma.core + DESTINATION ${KDE_INSTALL_QMLDIR} + PLUGIN corebindingsplugin + TYPEINFO plugins.qmltypes + VERSION 2.0 +) -ecm_generate_qmltypes(org.kde.plasma.core 2.0 DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/core) +ecm_qmlmodule_privatefiles(plasmacore + RELATIVE_PATH private + FILES + private/DefaultToolTip.qml +) #also "install" to $BUILD_DIR/bin for unit tests add_custom_target(copy ALL DEPENDS corebindingsplugin) add_custom_command(TARGET copy POST_BUILD COMMAND ${CMAKE_COMMAND} -E - copy ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${CMAKE_BINARY_DIR}/bin/org/kde/plasma/core/qmldir) + copy $ ${CMAKE_BINARY_DIR}/bin/org/kde/plasma/core/qmldir) add_custom_command(TARGET copy POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_BINARY_DIR}/bin/org/kde/plasma/core/) diff --git a/src/declarativeimports/core/qmldir b/src/declarativeimports/core/qmldir deleted file mode 100644 --- a/src/declarativeimports/core/qmldir +++ /dev/null @@ -1,2 +0,0 @@ -module org.kde.plasma.core -plugin corebindingsplugin diff --git a/src/declarativeimports/plasmacomponents/CMakeLists.txt b/src/declarativeimports/plasmacomponents/CMakeLists.txt --- a/src/declarativeimports/plasmacomponents/CMakeLists.txt +++ b/src/declarativeimports/plasmacomponents/CMakeLists.txt @@ -23,9 +23,58 @@ KF5::Service #for kplugininfo.h ) +ecm_add_qmlmodule(plasmacomponents + IDENTIFIER org.kde.plasma.components + DESTINATION ${KDE_INSTALL_QMLDIR} + PLUGIN plasmacomponentsplugin + TYPEINFO plugins.qmltypes + VERSION 2.0 +) -install(TARGETS plasmacomponentsplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/components) +ecm_qmlmodule_objecttypes(plasmacomponents + INITIAL_VERSION 2.0 + OBJECT_TYPES + BusyIndicator qml/BusyIndicator.qml + Button qml/Button.qml + ButtonColumn qml/ButtonColumn.qml + ButtonRow qml/ButtonRow.qml + CheckBox qml/CheckBox.qml + ComboBox qml/ComboBox.qml + CommonDialog qml/CommonDialog.qml + ContextMenu qml/ContextMenu.qml + Dialog qml/Dialog.qml + Highlight qml/Highlight.qml + Label qml/Label.qml + ListItem qml/ListItem.qml + ModelContextMenu qml/ModelContextMenu.qml + Page qml/Page.qml + PageStack qml/PageStack.qml + ProgressBar qml/ProgressBar.qml + QueryDialog qml/QueryDialog.qml + RadioButton qml/RadioButton.qml + ScrollBar qml/ScrollBar.qml + SectionScroller qml/SectionScroller.qml + SelectionDialog qml/SelectionDialog.qml + Slider qml/Slider.qml + Sheet qml/Sheet.qml + Switch qml/Switch.qml + TabBar qml/TabBar.qml + TabButton qml/TabButton.qml + TabGroup qml/TabGroup.qml + TextArea qml/TextArea.qml + TextField qml/TextField.qml + ToolBar qml/ToolBar.qml + ToolBarLayout qml/ToolBarLayout.qml + ToolButton qml/ToolButton.qml +) -install(DIRECTORY qml/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/components) +ecm_qmlmodule_jsresources(plasmacomponents + INITIAL_VERSION 2.0 + JS_RESOURCES + ButtonGroup qml/ButtonGroup.js +) -ecm_generate_qmltypes(org.kde.plasma.components 2.0 DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/components) +ecm_qmlmodule_privatefiles(plasmacomponents + DIRS + qml/private +) diff --git a/src/declarativeimports/plasmacomponents/qml/qmldir b/src/declarativeimports/plasmacomponents/qml/qmldir deleted file mode 100644 --- a/src/declarativeimports/plasmacomponents/qml/qmldir +++ /dev/null @@ -1,36 +0,0 @@ -module org.kde.plasma.components -plugin plasmacomponentsplugin - -BusyIndicator 2.0 BusyIndicator.qml -Button 2.0 Button.qml -ButtonColumn 2.0 ButtonColumn.qml -ButtonGroup 2.0 ButtonGroup.js -ButtonRow 2.0 ButtonRow.qml -CheckBox 2.0 CheckBox.qml -ComboBox 2.0 ComboBox.qml -CommonDialog 2.0 CommonDialog.qml -ContextMenu 2.0 ContextMenu.qml -Dialog 2.0 Dialog.qml -Highlight 2.0 Highlight.qml -Label 2.0 Label.qml -ListItem 2.0 ListItem.qml -ModelContextMenu 2.0 ModelContextMenu.qml -Page 2.0 Page.qml -PageStack 2.0 PageStack.qml -ProgressBar 2.0 ProgressBar.qml -QueryDialog 2.0 QueryDialog.qml -RadioButton 2.0 RadioButton.qml -ScrollBar 2.0 ScrollBar.qml -SectionScroller 2.0 SectionScroller.qml -SelectionDialog 2.0 SelectionDialog.qml -Slider 2.0 Slider.qml -Sheet 2.0 Sheet.qml -Switch 2.0 Switch.qml -TabBar 2.0 TabBar.qml -TabButton 2.0 TabButton.qml -TabGroup 2.0 TabGroup.qml -TextArea 2.0 TextArea.qml -TextField 2.0 TextField.qml -ToolBar 2.0 ToolBar.qml -ToolBarLayout 2.0 ToolBarLayout.qml -ToolButton 2.0 ToolButton.qml diff --git a/src/declarativeimports/plasmaextracomponents/CMakeLists.txt b/src/declarativeimports/plasmaextracomponents/CMakeLists.txt --- a/src/declarativeimports/plasmaextracomponents/CMakeLists.txt +++ b/src/declarativeimports/plasmaextracomponents/CMakeLists.txt @@ -20,12 +20,36 @@ KF5::Service KF5::Plasma) +ecm_add_qmlmodule(plasmaextracomponents + IDENTIFIER org.kde.plasma.extras + DESTINATION ${KDE_INSTALL_QMLDIR} + PLUGIN plasmaextracomponentsplugin + TYPEINFO plugins.qmltypes + VERSION 2.0 +) -install(TARGETS plasmaextracomponentsplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/extras) - -install(DIRECTORY qml/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/extras) - -ecm_generate_qmltypes(org.kde.plasma.extras 2.0 DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/extras) +ecm_qmlmodule_objecttypes(plasmaextracomponents + INITIAL_VERSION 2.0 + OBJECT_TYPES + App qml/App.qml + ConditionalLoader qml/ConditionalLoader.qml + Heading qml/Heading.qml + Paragraph qml/Paragraph.qml + PageRow qml/PageRow.qml + ScrollArea qml/ScrollArea.qml + Title qml/Title.qml + DescriptiveLabel qml/DescriptiveLabel.qml +) +ecm_qmlmodule_objecttypes(plasmaextracomponents + INITIAL_VERSION 2.0 + RELATIVE_PATH animations + OBJECT_TYPES + ActivateAnimation qml/animations/ActivateAnimation.qml + AppearAnimation qml/animations/AppearAnimation.qml + DisappearAnimation qml/animations/DisappearAnimation.qml + PressedAnimation qml/animations/PressedAnimation.qml + ReleasedAnimation qml/animations/ReleasedAnimation.qml +) # The platform specific stuff, overwrites a copy of the desktop one diff --git a/src/declarativeimports/plasmaextracomponents/qml/qmldir b/src/declarativeimports/plasmaextracomponents/qml/qmldir deleted file mode 100644 --- a/src/declarativeimports/plasmaextracomponents/qml/qmldir +++ /dev/null @@ -1,17 +0,0 @@ -module org.kde.plasma.extras -plugin plasmaextracomponentsplugin - -App 2.0 App.qml -ConditionalLoader 2.0 ConditionalLoader.qml -Heading 2.0 Heading.qml -Paragraph 2.0 Paragraph.qml -PageRow 2.0 PageRow.qml -ScrollArea 2.0 ScrollArea.qml -Title 2.0 Title.qml -DescriptiveLabel 2.0 DescriptiveLabel.qml - -ActivateAnimation 2.0 animations/ActivateAnimation.qml -AppearAnimation 2.0 animations/AppearAnimation.qml -DisappearAnimation 2.0 animations/DisappearAnimation.qml -PressedAnimation 2.0 animations/PressedAnimation.qml -ReleasedAnimation 2.0 animations/ReleasedAnimation.qml diff --git a/src/declarativeimports/platformcomponents/CMakeLists.txt b/src/declarativeimports/platformcomponents/CMakeLists.txt --- a/src/declarativeimports/platformcomponents/CMakeLists.txt +++ b/src/declarativeimports/platformcomponents/CMakeLists.txt @@ -18,7 +18,10 @@ KF5::IconThemes ) -install(TARGETS platformcomponentsplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/platformcomponents) -install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/platformcomponents) - -ecm_generate_qmltypes(org.kde.plasma.platformcomponents 2.0 DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/platformcomponents) +ecm_add_qmlmodule(platformcomponents + IDENTIFIER org.kde.plasma.platformcomponents + DESTINATION ${KDE_INSTALL_QMLDIR} + PLUGIN platformcomponentsplugin + TYPEINFO plugins.qmltypes + VERSION 2.0 +) diff --git a/src/declarativeimports/platformcomponents/qmldir b/src/declarativeimports/platformcomponents/qmldir deleted file mode 100644 --- a/src/declarativeimports/platformcomponents/qmldir +++ /dev/null @@ -1,2 +0,0 @@ -module org.kde.plasma.platformcomponents -plugin platformcomponentsplugin