on xenial help sign in
Prepare unity8 for cross-building.

Approved by PS Jenkins bot, Michael Terry.

commit963a5184329405b0819a3dd397afcfb9c55ebd27 authorMichał Sawicz <michal.sawicz@canonical.com> dateThu 8 Aug 2013, 19:31 (13 years ago) parent8e8d358a30533a
2 files changed+20−11
cmake/modules/Plugins.cmake+18−9 debian/control+2−2
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+
17# Creates target for copying and installing qmlfiles
28#
39# export_qmlfiles(plugin sub_path)
@@ -40,16 +46,19 @@ macro(export_qmlplugin PLUGIN VERSION PLUGIN_SUBPATH)
4046 set(multi_value_keywords TARGETS)
4147 cmake_parse_arguments(qmlplugin "" "" "${multi_value_keywords}" ${ARGN})
4248
43− # create the plugin.qmltypes file
44− add_custom_target(${PLUGIN}-qmltypes ALL
45− COMMAND qmlplugindump -notrelocatable ${PLUGIN} ${VERSION} ${CMAKE_BINARY_DIR}/plugins > ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
46− )
47− add_dependencies(${PLUGIN}-qmltypes ${PLUGIN}-qmlfiles ${qmlplugin_TARGETS})
49+ # Only try to generate .qmltypes if not cross compiling
50+ if(NOT CMAKE_CROSSCOMPILING)
51+ # create the plugin.qmltypes file
52+ add_custom_target(${PLUGIN}-qmltypes ALL
53+ COMMAND ${qmlplugindump_exe} -notrelocatable ${PLUGIN} ${VERSION} ${CMAKE_BINARY_DIR}/plugins > ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
54+ )
55+ add_dependencies(${PLUGIN}-qmltypes ${PLUGIN}-qmlfiles ${qmlplugin_TARGETS})
4856
49− # install the qmltypes file.
50− install(FILES ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
51− DESTINATION ${SHELL_PRIVATE_LIBDIR}/qml/${PLUGIN_SUBPATH}
52− )
57+ # install the qmltypes file.
58+ install(FILES ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
59+ DESTINATION ${SHELL_PRIVATE_LIBDIR}/qml/${PLUGIN_SUBPATH}
60+ )
61+ endif()
5362
5463 # install the additional targets
5564 install(TARGETS ${qmlplugin_TARGETS}
debian/control+2−2
@@ -22,9 +22,9 @@ Build-Depends: cmake,
2222 libusermetricsoutput1-dev,
2323 libxcb1-dev,
2424 pkg-config,
25− python (>= 2.7),
25+ python:any (>= 2.7),
2626 python-setuptools,
27− python3,
27+ python3:any,
2828 qt5-default,
2929 qtbase5-dev,
3030 qtbase5-private-dev,