on xenial help sign in
Prepare unity8 for cross-building.
963a518Michał Sawicz
cmake/modules/Plugins.cmake+18−9
@@ -1,3 +1,9 @@
1+find_program(qmlplugindump_exe qmlplugindump)
2+
3+if(NOT qmlplugindump_exe)
4+ msg(FATAL_ERROR "Could not locate qmlplugindump.")
5+endif()
6+
1# Creates target for copying and installing qmlfiles
7# Creates target for copying and installing qmlfiles
2#
8#
3# export_qmlfiles(plugin sub_path)
9# export_qmlfiles(plugin sub_path)
@@ -40,16 +46,19 @@ macro(export_qmlplugin PLUGIN VERSION PLUGIN_SUBPATH)
40 set(multi_value_keywords TARGETS)
46 set(multi_value_keywords TARGETS)
41 cmake_parse_arguments(qmlplugin "" "" "${multi_value_keywords}" ${ARGN})
47 cmake_parse_arguments(qmlplugin "" "" "${multi_value_keywords}" ${ARGN})
42
48
49+ # Only try to generate .qmltypes if not cross compiling
50+ if(NOT CMAKE_CROSSCOMPILING)
43− # create the plugin.qmltypes file
51+ # create the plugin.qmltypes file
44− add_custom_target(${PLUGIN}-qmltypes ALL
52+ add_custom_target(${PLUGIN}-qmltypes ALL
45− COMMAND qmlplugindump -notrelocatable ${PLUGIN} ${VERSION} ${CMAKE_BINARY_DIR}/plugins > ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
53+ COMMAND ${qmlplugindump_exe} -notrelocatable ${PLUGIN} ${VERSION} ${CMAKE_BINARY_DIR}/plugins > ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
46− )
54+ )
47− add_dependencies(${PLUGIN}-qmltypes ${PLUGIN}-qmlfiles ${qmlplugin_TARGETS})
55+ add_dependencies(${PLUGIN}-qmltypes ${PLUGIN}-qmlfiles ${qmlplugin_TARGETS})
48
56
49− # install the qmltypes file.
57+ # install the qmltypes file.
50− install(FILES ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
58+ install(FILES ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
51− DESTINATION ${SHELL_PRIVATE_LIBDIR}/qml/${PLUGIN_SUBPATH}
59+ DESTINATION ${SHELL_PRIVATE_LIBDIR}/qml/${PLUGIN_SUBPATH}
52− )
60+ )
61+ endif()
53
62
54 # install the additional targets
63 # install the additional targets
55 install(TARGETS ${qmlplugin_TARGETS}
64 install(TARGETS ${qmlplugin_TARGETS}
debian/control+2−2
@@ -22,9 +22,9 @@ Build-Depends: cmake,
22 libusermetricsoutput1-dev,
22 libusermetricsoutput1-dev,
23 libxcb1-dev,
23 libxcb1-dev,
24 pkg-config,
24 pkg-config,
25− python (>= 2.7),
25+ python:any (>= 2.7),
26 python-setuptools,
26 python-setuptools,
27− python3,
27+ python3:any,
28 qt5-default,
28 qt5-default,
29 qtbase5-dev,
29 qtbase5-dev,
30 qtbase5-private-dev,
30 qtbase5-private-dev,