on xenial help sign in
fixing cmake
61752ebDiego Sarmentero
plugins/Ubuntu/DownloadDaemonListener/CMakeLists.txt+9−20
@@ -1,3 +1,8 @@
1+# export_qmlplugin macro
2+include(Plugins)
3+
4+set(CMAKE_AUTOMOC ON)
5+
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
11 )
16 )
12
17
13−add_library(DownloadDaemonListener MODULE
18+add_library(DownloadDaemonListener MODULE ${DOWNLOADDAEMONLISTENER_SOURCES})
14− ${DOWNLOADDAEMONLISTENER_SOURCES}
15− )
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)
21
19
22qt5_use_modules(DownloadDaemonListener Qml Quick DBus Core)
20qt5_use_modules(DownloadDaemonListener Qml Quick DBus Core)
23
21
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}
27− )
28−
29−install(TARGETS DownloadDaemonListener
24+export_qmlplugin(Ubuntu.DownloadDaemonListener 0.1 Ubuntu/DownloadDaemonListener TARGETS DownloadDaemonListener)
30− DESTINATION ${SHELL_APP_DIR}/plugins/Ubuntu/DownloadDaemonListener
31− )
32−
33−install(FILES qmldir
34− DESTINATION ${SHELL_APP_DIR}/plugins/Ubuntu/DownloadDaemonListener
35− )