Generate the qmltypes files without a full path being stored inside them.
commit16d28a9edc1277d64898970b083d5d1f1f5624f4
authorRodney Dawes <rodney.dawes@canonical.com>
dateThu 26 Jun 2014, 09:47 (12 years ago)
parente942de2
cmake/modules/QmlPlugins.cmake+6−2
@@ -111,10 +111,13 @@ macro(export_qmlplugin PLUGIN VERSION PATH)
111111 set(qmlplugin_dir ${QMLPLUGIN_BINARY_DIR}/${PATH})
112112 else()
113113 # Find import path to point qmlplugindump at
114− string(REGEX REPLACE "${PATH}$" "" QMLPLUGIN_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
114+ string(REGEX REPLACE "/${PATH}$" "" QMLPLUGIN_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
115115 set(qmlplugin_dir ${CMAKE_CURRENT_BINARY_DIR})
116116 endif()
117117
118+ # Relative path for the module
119+ string(REPLACE "${CMAKE_BINARY_DIR}/" "" QMLPLUGIN_MODULE_DIR "${QMLPLUGIN_BINARY_DIR}")
120+
118121 # Find the last segment of the plugin name to use as qmltypes basename
119122 string(REGEX MATCH "[^.]+$" plugin_suffix ${PLUGIN})
120123 set(target_prefix ${QMLPLUGIN_TARGET_PREFIX}${PLUGIN})
@@ -122,7 +125,8 @@ macro(export_qmlplugin PLUGIN VERSION PATH)
122125
123126 add_custom_target(${target_prefix}-qmltypes
124127 COMMAND env ${QMLPLUGIN_ENVIRONMENT} ${qmlplugindump_executable} -notrelocatable
125− ${PLUGIN} ${VERSION} ${QMLPLUGIN_BINARY_DIR} > ${qmltypes_path}
128+ ${PLUGIN} ${VERSION} ${QMLPLUGIN_MODULE_DIR} > ${qmltypes_path}
129+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
126130 )
127131 add_dependencies(${target_prefix}-qmltypes ${target_prefix}-qmlfiles ${QMLPLUGIN_TARGETS})
128132 add_dependencies(qmltypes ${target_prefix}-qmltypes)
plugins/AccountsService/AccountsService.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable AccountsService 0.1 /home/michal/dev/canonical/unity8/repo/builddir/plugins/'
7+// 'qmlplugindump -notrelocatable AccountsService 0.1 plugins'
88
99Module {
1010 Component {
plugins/Dash/Dash.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Dash 0.1 /home/michal/dev/canonical/unity8/repo/builddir/plugins/'
7+// 'qmlplugindump -notrelocatable Dash 0.1 plugins'
88
99Module {
1010 Component {
plugins/HudClient/HudClient.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable HudClient 0.1 /home/michal/dev/canonical/unity8/repo/builddir/plugins/'
7+// 'qmlplugindump -notrelocatable HudClient 0.1 plugins'
88
99Module {
1010 Component {
plugins/LightDM/LightDM.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable LightDM 0.1 /home/michal/dev/canonical/unity8/repo/builddir/plugins/'
7+// 'qmlplugindump -notrelocatable LightDM 0.1 plugins'
88
99Module {
1010 Component {
plugins/Powerd/Powerd.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Powerd 0.1 /home/michal/dev/canonical/unity8/repo/builddir/plugins/'
7+// 'qmlplugindump -notrelocatable Powerd 0.1 plugins'
88
99Module {
1010 Component {
plugins/SessionBroadcast/SessionBroadcast.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable SessionBroadcast 0.1 /home/michal/dev/canonical/unity8/repo/builddir/plugins/'
7+// 'qmlplugindump -notrelocatable SessionBroadcast 0.1 plugins'
88
99Module {
1010 Component {
plugins/Ubuntu/DownloadDaemonListener/DownloadDaemonListener.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Ubuntu.DownloadDaemonListener 0.1 /home/michal/dev/canonical/unity8/repo/builddir/plugins/'
7+// 'qmlplugindump -notrelocatable Ubuntu.DownloadDaemonListener 0.1 plugins'
88
99Module {
1010 Component {
plugins/Ubuntu/Gestures/Gestures.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Ubuntu.Gestures 0.1 /home/michal/dev/canonical/unity8/repo/builddir/plugins/'
7+// 'qmlplugindump -notrelocatable Ubuntu.Gestures 0.1 plugins'
88
99Module {
1010 Component {
plugins/Unity/Indicators/Indicators.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Unity.Indicators 0.1 /home/michal/dev/canonical/unity8/repo/builddir/plugins/'
7+// 'qmlplugindump -notrelocatable Unity.Indicators 0.1 plugins'
88
99Module {
1010 Component {
plugins/Unity/Launcher/Launcher.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Unity.Launcher 0.1 /home/michal/dev/canonical/unity8/repo/builddir/plugins/'
7+// 'qmlplugindump -notrelocatable Unity.Launcher 0.1 plugins'
88
99Module {
1010 Component {
plugins/Unity/Session/Session.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Unity.Session 0.1 /home/michal/dev/canonical/unity8/repo/builddir/plugins/'
7+// 'qmlplugindump -notrelocatable Unity.Session 0.1 plugins'
88
99Module {
1010 Component {
plugins/Utils/Utils.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Utils 0.1 /home/michal/dev/canonical/unity8/repo/builddir/plugins/'
7+// 'qmlplugindump -notrelocatable Utils 0.1 plugins'
88
99Module {
1010 Component {
tests/mocks/AccountsService/AccountsService.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable AccountsService 0.1 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable AccountsService 0.1 tests/mocks'
88
99Module {
1010 Component {
tests/mocks/GSettings.1.0/GSettings.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable GSettings 1.0 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable GSettings 1.0 tests/mocks'
88
99Module {
1010 Component {
tests/mocks/HudClient/HudClient.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable HudClient 0.1 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable HudClient 0.1 tests/mocks'
88
99Module {
1010 Component {
tests/mocks/LightDM/LightDM.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable LightDM 0.1 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable LightDM 0.1 tests/mocks'
88
99Module {
1010 Component {
tests/mocks/Powerd/Powerd.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Powerd 0.1 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable Powerd 0.1 tests/mocks'
88
99Module {
1010 Component {
tests/mocks/QMenuModel/QMenuModel.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable QMenuModel 0.1 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable QMenuModel 0.1 tests/mocks'
88
99Module {
1010 Component {
tests/mocks/QtMultimedia/QtMultimedia.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable QtMultimedia 5.0 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable QtMultimedia 5.0 tests/mocks'
88
99Module {
1010 Component {
tests/mocks/Ubuntu/DownloadDaemonListener/DownloadDaemonListener.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Ubuntu.DownloadDaemonListener 0.1 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable Ubuntu.DownloadDaemonListener 0.1 tests/mocks'
88
99Module {
1010 Component {
tests/mocks/Ubuntu/Thumbnailer/Thumbnailer.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Ubuntu.Thumbnailer 0.1 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable Ubuntu.Thumbnailer 0.1 tests/mocks'
88
99Module {
1010 Component {
tests/mocks/Unity/Application/Application.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Unity.Application 0.1 /home/michal/dev/canonical/unity8/repo/builddir/nonmirplugins'
7+// 'qmlplugindump -notrelocatable Unity.Application 0.1 nonmirplugins'
88
99Module {
1010 Component {
tests/mocks/Unity/Indicators/Indicators.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Unity.Indicators 0.1 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable Unity.Indicators 0.1 tests/mocks'
88
99Module {
1010 Component {
tests/mocks/Unity/Launcher/Launcher.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Unity.Launcher 0.1 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable Unity.Launcher 0.1 tests/mocks'
88
99Module {
1010 Component {
tests/mocks/Unity/Notifications/Notifications.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Unity.Notifications 1.0 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable Unity.Notifications 1.0 tests/mocks'
88
99Module {
1010}
tests/mocks/Unity/Unity.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Unity 0.2 /home/michal/dev/canonical/unity8/repo/builddir/tests/mocks/'
7+// 'qmlplugindump -notrelocatable Unity 0.2 tests/mocks'
88
99Module {
1010 Component {
tests/utils/modules/Unity/Test/Test.qmltypes+1−1
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Unity.Test 0.1 /home/michal/dev/canonical/unity8/repo/builddir/tests/utils/modules/'
7+// 'qmlplugindump -notrelocatable Unity.Test 0.1 tests/utils/modules'
88
99Module {
1010 Component {