From d0af156930f80c7133b0190765d21b12a3d4a76a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 1 Nov 2012 20:05:49 +0100 Subject: [PATCH] optionally bootstrap QmlDevTools and qmlmin QmlDevTools is really meant for host tools (the two only ones using this being qmlmin in this repo and lupdate in qttools). qmake magic will take care of bootstrapping them while x-building. Change-Id: I29d921af483659d5455be0ad080dc1a88540c036 Reviewed-by: Joerg Bornemann --- src/qmldevtools/qmldevtools.pro | 9 ++++++++- tests/auto/headersclean/headersclean.pro | 2 +- tests/auto/qmldevtools/compile/compile.pro | 9 ++++++--- tests/auto/qmldevtools/compile/tst_compile.cpp | 15 +++------------ tools/qmlmin/qmlmin.pro | 1 + 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/qmldevtools/qmldevtools.pro b/src/qmldevtools/qmldevtools.pro index 3da3526..a65ef94 100644 --- a/src/qmldevtools/qmldevtools.pro +++ b/src/qmldevtools/qmldevtools.pro @@ -1,6 +1,13 @@ +option(host_build) TARGET = QtQmlDevTools QT = core -CONFIG += static internal_module +CONFIG += static no_module_headers internal_module + +MODULE_PRIVATE_INCLUDES = \ + \$\$QT_MODULE_INCLUDE_BASE \ + \$\$QT_MODULE_INCLUDE_BASE/QtQml \ + \$\$QT_MODULE_INCLUDE_BASE/QtQml/$$QT.qml.VERSION \ + \$\$QT_MODULE_INCLUDE_BASE/QtQml/$$QT.qml.VERSION/QtQml load(qt_module) diff --git a/tests/auto/headersclean/headersclean.pro b/tests/auto/headersclean/headersclean.pro index 4457fe1..2698d67 100644 --- a/tests/auto/headersclean/headersclean.pro +++ b/tests/auto/headersclean/headersclean.pro @@ -1,2 +1,2 @@ -QT = qml quick qmltest qmldevtools +QT = qml quick qmltest load(qt_headersclean) diff --git a/tests/auto/qmldevtools/compile/compile.pro b/tests/auto/qmldevtools/compile/compile.pro index ffe0778..1c65daf 100644 --- a/tests/auto/qmldevtools/compile/compile.pro +++ b/tests/auto/qmldevtools/compile/compile.pro @@ -1,9 +1,12 @@ -CONFIG += testcase +option(host_build) TARGET = tst_compile -QT = core qmldevtools-private testlib +force_bootstrap: \ + QT = bootstrap-private +else: \ + QT = core +QT += qmldevtools-private macx:CONFIG -= app_bundle SOURCES += tst_compile.cpp -CONFIG += parallel_test DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/qmldevtools/compile/tst_compile.cpp b/tests/auto/qmldevtools/compile/tst_compile.cpp index ad63922..6b13d1b 100644 --- a/tests/auto/qmldevtools/compile/tst_compile.cpp +++ b/tests/auto/qmldevtools/compile/tst_compile.cpp @@ -38,7 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include #include #include @@ -46,17 +45,9 @@ #include #include -class tst_compile : public QObject +int main() { - Q_OBJECT -public: - tst_compile() { } - -private slots: // Nothing - this test just makes sure that the QmlDevTools headers // are present, and that we can link against the library. -}; - -QTEST_MAIN(tst_compile) - -#include "tst_compile.moc" + return 0; +} diff --git a/tools/qmlmin/qmlmin.pro b/tools/qmlmin/qmlmin.pro index c7da0eb..2cbf196 100644 --- a/tools/qmlmin/qmlmin.pro +++ b/tools/qmlmin/qmlmin.pro @@ -1,3 +1,4 @@ +option(host_build) QT = core qmldevtools-private SOURCES += main.cpp -- 2.7.4