From 6e6f27b6ec4455bf42343bac575109ed1de20c3a Mon Sep 17 00:00:00 2001 From: Christian Stromme Date: Mon, 7 Dec 2015 22:09:35 +0100 Subject: Use CROSS_COMPILE when setting PKG_CONFIG. If CROSS_COMPILE is set on a Debian multiarch platform, then PKG_CONFIG should be set the same way as the other cross compilation tools. Change-Id: Id359a6bbdcbf8a136a0268a82301fc086a2adcfe Reviewed-by: Oswald Buddenhagen --- mkspecs/devices/common/linux_device_pre.conf | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/devices/common/linux_device_pre.conf b/mkspecs/devices/common/linux_device_pre.conf index 16becbdd52..cfbdc23d63 100644 --- a/mkspecs/devices/common/linux_device_pre.conf +++ b/mkspecs/devices/common/linux_device_pre.conf @@ -23,3 +23,6 @@ QMAKE_AR = $${CROSS_COMPILE}ar cqs QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy QMAKE_NM = $${CROSS_COMPILE}nm -P QMAKE_STRIP = $${CROSS_COMPILE}strip + +contains(DISTRO_OPTS, deb-multi-arch): \ + PKG_CONFIG = $${CROSS_COMPILE}pkg-config -- cgit v1.2.3 From bf4b2810999f9c1b0512437101170d93e3ff9613 Mon Sep 17 00:00:00 2001 From: Christian Stromme Date: Fri, 23 Oct 2015 00:59:45 +0200 Subject: Add generic g++ spec for arm devices. A minimal device spec that can be used to build for arm devices. Change-Id: I4c9949d8cc59ad534fc7617034f6beb40d6a987e Reviewed-by: Oswald Buddenhagen --- mkspecs/devices/linux-arm-generic-g++/qmake.conf | 9 ++++++ .../devices/linux-arm-generic-g++/qplatformdefs.h | 34 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 mkspecs/devices/linux-arm-generic-g++/qmake.conf create mode 100644 mkspecs/devices/linux-arm-generic-g++/qplatformdefs.h (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-arm-generic-g++/qmake.conf b/mkspecs/devices/linux-arm-generic-g++/qmake.conf new file mode 100644 index 0000000000..3dbd297b94 --- /dev/null +++ b/mkspecs/devices/linux-arm-generic-g++/qmake.conf @@ -0,0 +1,9 @@ +# +# Generic qmake configuration for building with g++ on arm devices. +# +# A minimal configure line could look something like this: +# ./configure -device arm-generic-g++ -device-option CROSS_COMPILE=arm-linux-gnueabi- + +include(../common/linux_device_pre.conf) +include(../common/linux_arm_device_post.conf) +load(qt_config) diff --git a/mkspecs/devices/linux-arm-generic-g++/qplatformdefs.h b/mkspecs/devices/linux-arm-generic-g++/qplatformdefs.h new file mode 100644 index 0000000000..5ae49b35dd --- /dev/null +++ b/mkspecs/devices/linux-arm-generic-g++/qplatformdefs.h @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../../linux-g++/qplatformdefs.h" -- cgit v1.2.3 From 604ef6d4a7108d6c5632a1c85d0f248249f6dbe5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 18 Nov 2015 13:09:26 +0100 Subject: automatically put TESTDATA into RESOURCES on android/ios/winrt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QFINDTESTDATA is already prepared to find it there. Change-Id: I467392786ce6bcfbf1bd0b6079f60c9df06834b1 Reviewed-by: Tor Arne Vestbø Reviewed-by: Oliver Wolff Reviewed-by: Maurice Kalinowski --- mkspecs/features/qt_build_config.prf | 3 +++ mkspecs/features/testcase.prf | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index 7197f84c9a..eaf23cf63a 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -55,6 +55,9 @@ QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR cross_compile: \ CONFIG += force_bootstrap +android|ios|winrt: \ + CONFIG += builtin_testdata + CONFIG += \ create_prl link_prl \ prepare_docs qt_docs_targets \ diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf index 6f6f073f70..6bac0546c3 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf @@ -79,7 +79,7 @@ isEmpty(BUILDS)|build_pass { INSTALLS += target } -contains(INSTALLS, target) { +!builtin_testdata:contains(INSTALLS, target) { # Install testdata and helpers as well, but only if we're actually installing the test. # # Testdata is installed relative to the directory containing the testcase @@ -180,6 +180,20 @@ contains(INSTALLS, target) { } } +builtin_testdata { + ALL_TESTDATA = $$TESTDATA $$GENERATED_TESTDATA + # RESOURCES does not support wildcards (for good reasons) + for(td, ALL_TESTDATA): \ + testdata.files += $$files($$absolute_path($$td, $$_PRO_FILE_PWD_)) + !isEmpty(testdata.files) { + testdata.base = $$_PRO_FILE_PWD_ + RESOURCES += testdata + } + + !isEmpty(TEST_HELPER_INSTALLS): \ + error("This platform does not support tests which require helpers.") +} + macx-xcode:bundle:isEmpty(QMAKE_BUNDLE_EXTENSION) { QMAKE_PBX_PRODUCT_TYPE = com.apple.product-type.bundle.unit-test QMAKE_PBX_BUNDLE_TYPE = wrapper.cfbundle -- cgit v1.2.3 From 769027dcb3d9bd9f6a0fa7a97adf9ea3142904c4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 11 Dec 2015 12:13:58 +0100 Subject: don't call qtAddToolEnv() directly qtPrepareTool() does it anyway, so this saves repeated manipulations. for now, this is just nicer, but soon it will be a requirement. Change-Id: I5184e0e4597c6d5a4d7dd4cc4d81e7f742a79fc8 Reviewed-by: Joerg Bornemann --- mkspecs/features/qml_plugin.prf | 5 +++-- mkspecs/features/qt_docs.prf | 23 ++++++++++++----------- 2 files changed, 15 insertions(+), 13 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index 1bc05caefe..daedeca3a0 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -90,7 +90,6 @@ load(qt_common) qmlplugindump = qmlplugindump importpath.name = QML2_IMPORT_PATH } - qtPrepareTool(QMLPLUGINDUMP, $$qmlplugindump) importpath.value = for(qmod, QTREPOS) { qml1_target: \ @@ -100,7 +99,9 @@ load(qt_common) exists($$qmod): importpath.value += $$shell_path($$qmod) } importpath.value = $$unique(importpath.value) - qtAddToolEnv(QMLPLUGINDUMP, importpath) + QT_TOOL_ENV = importpath + qtPrepareTool(QMLPLUGINDUMP, $$qmlplugindump) + QT_TOOL_ENV = TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, ) qmltypes.target = qmltypes qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$replace(TARGETPATHBASE, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf index bcc16ada78..15bd12072a 100644 --- a/mkspecs/features/qt_docs.prf +++ b/mkspecs/features/qt_docs.prf @@ -18,7 +18,19 @@ QMAKE_DOCS_TARGET = $$replace(QMAKE_DOCS, ^(.*/)?(.*)\\.qdocconf$, \\2) isEmpty(QMAKE_DOCS_TARGETDIR): QMAKE_DOCS_TARGETDIR = $$QMAKE_DOCS_TARGET QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR +qtver.name = QT_VERSION +qtver.value = $$VERSION +isEmpty(qtver.value): qtver.value = $$MODULE_VERSION +isEmpty(qtver.value): error("No version for documentation specified.") +qtmver.name = QT_VER +qtmver.value = $$replace(qtver.value, ^(\\d+\\.\\d+).*$, \\1) +qtvertag.name = QT_VERSION_TAG +qtvertag.value = $$replace(qtver.value, \.,) +qtdocs.name = QT_INSTALL_DOCS +qtdocs.value = $$[QT_INSTALL_DOCS/src] +QT_TOOL_ENV = qtver qtmver qtvertag qtdocs qtPrepareTool(QDOC, qdoc) +QT_TOOL_ENV = QDOC += -outputdir $$QMAKE_DOCS_OUTPUTDIR !build_online_docs: \ QDOC += -installdir $$[QT_INSTALL_DOCS] @@ -43,17 +55,6 @@ DOC_INDEXES = PREP_DOC_INDEXES += -indexdir $$[QT_INSTALL_DOCS/get] DOC_INDEXES += -indexdir $$[QT_INSTALL_DOCS/get] } -qtver.name = QT_VERSION -qtver.value = $$VERSION -isEmpty(qtver.value): qtver.value = $$MODULE_VERSION -isEmpty(qtver.value): error("No version for documentation specified.") -qtmver.name = QT_VER -qtmver.value = $$replace(qtver.value, ^(\\d+\\.\\d+).*$, \\1) -qtvertag.name = QT_VERSION_TAG -qtvertag.value = $$replace(qtver.value, \.,) -qtdocs.name = QT_INSTALL_DOCS -qtdocs.value = $$[QT_INSTALL_DOCS/src] -qtAddToolEnv(QDOC, qtver qtmver qtvertag qtdocs) doc_command = $$QDOC $$QMAKE_DOCS prepare_docs { prepare_docs.commands += $$doc_command -prepare $$PREP_DOC_INDEXES -no-link-errors -- cgit v1.2.3 From efcd4d6f866d731a930b48a20f68b4bbee9146fe Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 11 Dec 2015 13:29:01 +0100 Subject: ensure that we don't leak QT_TOOL_ENV beyond qt_tool.prf the variable is later re-used by qtPrepareTool(), so the tools used to build the tool would get excess variables passed. Change-Id: Ib1bdd2211b4a8615e2be9ba0310822f373f5efb0 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_tool.prf | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index 3f0301a292..839c3d6b88 100644 --- a/mkspecs/features/qt_tool.prf +++ b/mkspecs/features/qt_tool.prf @@ -64,3 +64,5 @@ DEFINES *= QT_USE_QSTRINGBUILDER cache(QT_TOOL.$${MODULE}.$$var, transient) } +# The variable is re-used by qtPrepareTool(), and we really don't want that. +unset(QT_TOOL_ENV) -- cgit v1.2.3