Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KDE Connect
Commits
ed3ae873
Commit
ed3ae873
authored
Sep 11, 2022
by
Nicolas Fella
Browse files
Port to ecm_add_qml_module
Reduces some boilerplate
parent
4ecf463c
Pipeline
#238085
passed with stage
in 3 minutes and 58 seconds
Changes
5
Pipelines
2
Expand all
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
ed3ae873
...
...
@@ -38,6 +38,7 @@ include(GenerateExportHeader)
include
(
ECMGenerateQmlTypes
)
include
(
KDEClangFormat
)
include
(
KDEGitCommitHooks
)
include
(
ECMQmlModule
)
if
(
NOT SAILFISHOS
)
include
(
ECMQMLModules
)
endif
()
...
...
declarativeplugin/CMakeLists.txt
View file @
ed3ae873
add_library
(
kdeconnectdeclarativeplugin SHARED
ecm_add_qml_module
(
kdeconnectdeclarativeplugin URI
"org.kde.kdeconnect"
VERSION 1.0
)
target_sources
(
kdeconnectdeclarativeplugin PRIVATE
kdeconnectdeclarativeplugin.cpp
responsewaiter.cpp
objectfactory.cpp
pointerlocker.cpp
resources.qrc
)
target_link_libraries
(
kdeconnectdeclarativeplugin
Qt5::Qml
kdeconnectinterfaces
kdeconnectcore
)
ecm_target_qml_sources
(
kdeconnectdeclarativeplugin
SOURCES
qml/DBusProperty.qml
qml/PluginChecker.qml
qml/RemoteKeyboard.qml
VERSION 1.0
)
if
(
TARGET KF5::WaylandClient
)
target_sources
(
kdeconnectdeclarativeplugin PRIVATE pointerlockerwayland.cpp
)
target_link_libraries
(
kdeconnectdeclarativeplugin KF5::WaylandClient
)
target_link_libraries
(
kdeconnectdeclarativeplugin
PRIVATE
KF5::WaylandClient
)
target_compile_definitions
(
kdeconnectdeclarativeplugin PRIVATE -DWITH_WAYLAND=1
)
else
()
target_compile_definitions
(
kdeconnectdeclarativeplugin PRIVATE -DWITH_WAYLAND=0
)
endif
()
install
(
TARGETS kdeconnectdeclarativeplugin DESTINATION
${
KDE_INSTALL_QMLDIR
}
/org/kde/kdeconnect
)
install
(
FILES qmldir DESTINATION
${
KDE_INSTALL_QMLDIR
}
/org/kde/kdeconnect
)
target_link_libraries
(
kdeconnectdeclarativeplugin PRIVATE Qt::Quick kdeconnectinterfaces kdeconnectcore
)
ecm_generate_qmltypes
(
org.kde.kdeconnect 1.0 DESTINATION
${
KDE_INSTALL_QMLDIR
}
/org/kde/kdeconnect
)
# So qml apps using this plugin can be run from build/bin directory
add_custom_target
(
copy_to_build_dir_bin
)
file
(
MAKE_DIRECTORY
${
CMAKE_BINARY_DIR
}
/bin/org/kde/kdeconnect
)
add_custom_command
(
TARGET copy_to_build_dir_bin
COMMAND
${
CMAKE_COMMAND
}
-E
copy
${
CMAKE_CURRENT_SOURCE_DIR
}
/qmldir
${
CMAKE_BINARY_DIR
}
/bin/org/kde/kdeconnect/
)
add_dependencies
(
kdeconnectdeclarativeplugin copy_to_build_dir_bin
)
set_target_properties
(
kdeconnectdeclarativeplugin
PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/bin/org/kde/kdeconnect/
)
ecm_finalize_qml_module
(
kdeconnectdeclarativeplugin DESTINATION
${
KDE_INSTALL_QMLDIR
}
)
declarativeplugin/plugins.qmltypes
deleted
100644 → 0
View file @
4ecf463c
This diff is collapsed.
Click to expand it.
declarativeplugin/qmldir
deleted
100644 → 0
View file @
4ecf463c
module org.kde.kdeconnect
DBusProperty 1.0 qrc:///kdeconnect/qml/DBusProperty.qml
PluginChecker 1.0 qrc:///kdeconnect/qml/PluginChecker.qml
RemoteKeyboard 1.0 qrc:///kdeconnect/qml/RemoteKeyboard.qml
plugin kdeconnectdeclarativeplugin
declarativeplugin/resources.qrc
deleted
100644 → 0
View file @
4ecf463c
<!DOCTYPE RCC>
<RCC
version=
"1.0"
>
<qresource
prefix=
"/kdeconnect"
>
<file>
qml/DBusProperty.qml
</file>
<file>
qml/PluginChecker.qml
</file>
<file>
qml/RemoteKeyboard.qml
</file>
</qresource>
</RCC>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment