@@ -1,3 +1,8 @@
1+# export_qmlplugin macro
1include_directories(
6include_directories(
2 ${CMAKE_CURRENT_SOURCE_DIR}
7 ${CMAKE_CURRENT_SOURCE_DIR}
3 ${CMAKE_CURRENT_BINARY_DIR}
8 ${CMAKE_CURRENT_BINARY_DIR}
@@ -10,26 +15,10 @@ set(DOWNLOADDAEMONLISTENER_SOURCES
10 interface/downloadtrackeradaptor.cpp
15 interface/downloadtrackeradaptor.cpp
13−add_library(DownloadDaemonListener MODULE
18+add_library(DownloadDaemonListener MODULE ${DOWNLOADDAEMONLISTENER_SOURCES})
14− ${DOWNLOADDAEMONLISTENER_SOURCES}
16−# Because this is an internal support library, we want
17−# to expose all symbols in it. Consider changing this
18−# either to a static library or just using the
19−# files directly in targets.
20−set_target_properties(DownloadDaemonListener PROPERTIES COMPILE_FLAGS -fvisibility=default)
22qt5_use_modules(DownloadDaemonListener Qml Quick DBus Core)
20qt5_use_modules(DownloadDaemonListener Qml Quick DBus Core)
24−# copy qmldir file into build directory for shadow builds
22+# export the qmldir qmltypes and plugin files
25−file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
23+export_qmlfiles(Ubuntu.DownloadDaemonListener Ubuntu/DownloadDaemonListener)
26− DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
29−install(TARGETS DownloadDaemonListener
24+export_qmlplugin(Ubuntu.DownloadDaemonListener 0.1 Ubuntu/DownloadDaemonListener TARGETS DownloadDaemonListener)
30− DESTINATION ${SHELL_APP_DIR}/plugins/Ubuntu/DownloadDaemonListener
34− DESTINATION ${SHELL_APP_DIR}/plugins/Ubuntu/DownloadDaemonListener