1find_program(qmlplugindump_exe qmlplugindump)
3if(NOT qmlplugindump_exe)
4 msg(FATAL_ERROR "Could not locate qmlplugindump.")
7# Creates target for copying and installing qmlfiles
9# export_qmlfiles(plugin sub_path)
12# Target to be created:
13# - plugin-qmlfiles - Copies the qml files (*.qml, *.js, qmldir) into the shadow build folder.
15macro(export_qmlfiles PLUGIN PLUGIN_SUBPATH)
23 # copy the qmldir file
24 add_custom_target(${PLUGIN}-qmlfiles ALL
25 COMMAND cp ${QMLFILES} ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}
30 # install the qmlfiles file.
31 install(FILES ${QMLFILES}
32 DESTINATION ${SHELL_INSTALL_QML}/${PLUGIN_SUBPATH}
34endmacro(export_qmlfiles)
37# Creates target for generating the qmltypes file for a plugin and installs plugin files
39# export_qmlplugin(plugin version sub_path [TARGETS target1 [target2 ...]])
41# TARGETS additional install targets (eg the plugin shared object)
43# Target to be created:
44# - plugin-qmltypes - Generates the qmltypes file in the shadow build folder.
46macro(export_qmlplugin PLUGIN VERSION PLUGIN_SUBPATH)
47 set(multi_value_keywords TARGETS)
48 cmake_parse_arguments(qmlplugin "" "" "${multi_value_keywords}" ${ARGN})
50 # Only try to generate .qmltypes if not cross compiling
51 if(NOT CMAKE_CROSSCOMPILING)
52 # create the plugin.qmltypes file
53 add_custom_target(${PLUGIN}-qmltypes ALL
54 COMMAND ${qmlplugindump_exe} -notrelocatable ${PLUGIN} ${VERSION} ${CMAKE_BINARY_DIR}/plugins > ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
56 add_dependencies(${PLUGIN}-qmltypes ${PLUGIN}-qmlfiles ${qmlplugin_TARGETS})
58 # install the qmltypes file.
59 install(FILES ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
60 DESTINATION ${SHELL_INSTALL_QML}/${PLUGIN_SUBPATH}
64 # install the additional targets
65 install(TARGETS ${qmlplugin_TARGETS}
66 DESTINATION ${SHELL_INSTALL_QML}/${PLUGIN_SUBPATH}
68endmacro(export_qmlplugin)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list