diff options
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/android-clang/qmake.conf | 3 | ||||
-rw-r--r-- | mkspecs/android-g++/qmake.conf | 4 | ||||
-rw-r--r-- | mkspecs/common/android-base-head.conf | 1 | ||||
-rw-r--r-- | mkspecs/common/android-base-tail.conf | 3 | ||||
-rw-r--r-- | mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in | 4 | ||||
-rw-r--r-- | mkspecs/features/qml_module.prf | 20 | ||||
-rw-r--r-- | mkspecs/features/qml_plugin.prf | 44 | ||||
-rw-r--r-- | mkspecs/features/qt_build_extra.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/qt_common.prf | 8 | ||||
-rwxr-xr-x | mkspecs/features/uikit/device_destinations.sh | 3 | ||||
-rw-r--r-- | mkspecs/features/uikit/xcodebuild.mk | 5 | ||||
-rw-r--r-- | mkspecs/features/winrt/package_manifest.prf | 7 | ||||
-rwxr-xr-x | mkspecs/macx-ios-clang/ios_devices.pl | 50 | ||||
-rw-r--r-- | mkspecs/macx-xcode/default.xcscheme | 4 |
14 files changed, 115 insertions, 43 deletions
diff --git a/mkspecs/android-clang/qmake.conf b/mkspecs/android-clang/qmake.conf index 6d53bb921d..9758546fd4 100644 --- a/mkspecs/android-clang/qmake.conf +++ b/mkspecs/android-clang/qmake.conf @@ -12,7 +12,6 @@ include(../common/android-base-head.conf) NDK_LLVM_PATH = $$NDK_ROOT/toolchains/llvm/prebuilt/$$NDK_HOST QMAKE_CC = $$NDK_LLVM_PATH/bin/clang QMAKE_CXX = $$NDK_LLVM_PATH/bin/clang++ -QMAKE_GCC = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-g++ equals(ANDROID_TARGET_ARCH, armeabi-v7a): \ QMAKE_CFLAGS = -target armv7-none-linux-androideabi @@ -29,4 +28,6 @@ else: equals(ANDROID_TARGET_ARCH, mips): \ else: equals(ANDROID_TARGET_ARCH, mips64): \ QMAKE_CFLAGS = -target mips64el-none-linux-android +QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -gcc-toolchain $$NDK_TOOLCHAIN_PATH + include(../common/android-base-tail.conf) diff --git a/mkspecs/android-g++/qmake.conf b/mkspecs/android-g++/qmake.conf index 93bd5fa1c2..50d1fd6cf2 100644 --- a/mkspecs/android-g++/qmake.conf +++ b/mkspecs/android-g++/qmake.conf @@ -10,9 +10,9 @@ include(../common/gcc-base-unix.conf) include(../common/android-base-head.conf) QMAKE_CC = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-gcc -QMAKE_CXX = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-g++ -QMAKE_GCC = $$QMAKE_CXX +QMAKE_CXX = $$QMAKE_GCC QMAKE_CFLAGS = +QMAKE_LINK = $$QMAKE_GCC include(../common/android-base-tail.conf) diff --git a/mkspecs/common/android-base-head.conf b/mkspecs/common/android-base-head.conf index 7b2e988808..b75bcfaacb 100644 --- a/mkspecs/common/android-base-head.conf +++ b/mkspecs/common/android-base-head.conf @@ -76,3 +76,4 @@ ANDROID_SOURCES_CXX_STL_INCDIR = $$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$$NDK_ equals(ANDROID_TARGET_ARCH, x86_64)|equals(ANDROID_TARGET_ARCH, mips64): \ QMAKE_ANDROID_PLATFORM_LIBDIR = $${QMAKE_ANDROID_PLATFORM_LIBDIR}64 +QMAKE_GCC = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-g++ diff --git a/mkspecs/common/android-base-tail.conf b/mkspecs/common/android-base-tail.conf index 0dcaf64cff..47eaa83e42 100644 --- a/mkspecs/common/android-base-tail.conf +++ b/mkspecs/common/android-base-tail.conf @@ -78,8 +78,7 @@ QMAKE_LIBDIR_X11 = QMAKE_INCDIR_OPENGL = $$QMAKE_ANDROID_PLATFORM_INCDIR QMAKE_LIBDIR_OPENGL = $$QMAKE_ANDROID_PLATFORM_LIBDIR -QMAKE_LINK = $$QMAKE_GCC -QMAKE_LINK_SHLIB = $$QMAKE_GCC +QMAKE_LINK_SHLIB = $$QMAKE_LINK QMAKE_LFLAGS = --sysroot=$$ANDROID_PLATFORM_ROOT_PATH QMAKE_RPATHLINK = $$QMAKE_ANDROID_PLATFORM_LIBDIR QMAKE_LFLAGS_APP = -Wl,--no-undefined -Wl,-z,noexecstack -shared diff --git a/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in index fc6bfcebcf..9c25feb43f 100644 --- a/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in +++ b/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in @@ -22,7 +22,9 @@ </Properties> <Dependencies> - <TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.10586.0\" MaxVersionTested=\"10.0.10586.0\" />$${WINRT_MANIFEST.dependencies} + <TargetDeviceFamily Name=\"Windows.Universal\" + MinVersion=\"$${WINRT_MANIFEST.minVersion}\" + MaxVersionTested=\"$${WINRT_MANIFEST.maxVersionTested}\" />$${WINRT_MANIFEST.dependencies} </Dependencies> <Resources> diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index 6b08ea3a1a..4db0040dc5 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -14,10 +14,13 @@ equals(TEMPLATE, app): TEMPLATE = aux isEmpty(TARGETPATH): error("Must set TARGETPATH (QML import name)") qmldir_file = $$_PRO_FILE_PWD_/qmldir -fq_qml_files = $$qmldir_file +fq_qml_files = for(qmlf, QML_FILES): fq_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_) +fq_aux_qml_files = +for(qmlf, AUX_QML_FILES): fq_aux_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_) + load(qt_build_paths) qml1_target { @@ -32,8 +35,9 @@ qml1_target { builtin_resources { URITARGET = $$replace(URI, "\\.", "_") - # Ensure the qml files are included in the resources - $${URITARGET}.files = $$fq_qml_files + # Ensure the QML files are included in the resources. In static builds, + # the QML engine reads also the qmldir file from the resources. + $${URITARGET}.files = $$qmldir_file $$fq_qml_files # qt-project.org/imports is the path used for locating imports inside the resources $${URITARGET}.prefix = /qt-project.org/imports/$$TARGETPATH RESOURCES += $${URITARGET} @@ -41,8 +45,9 @@ builtin_resources { # Install rules qmldir.base = $$_PRO_FILE_PWD_ -!builtin_resources: qmldir.files = $$fq_qml_files -else: qmldir.files = $$qmldir_file +# Tools need qmldir and plugins.qmltypes always installed on the file system +qmldir.files = $$qmldir_file $$fq_aux_qml_files +!builtin_resources: qmldir.files += $$fq_qml_files qmldir.path = $$instbase/$$TARGETPATH INSTALLS += qmldir @@ -50,8 +55,9 @@ INSTALLS += qmldir !prefix_build { COPIES += qmldir } else { - # For non-installed static builds, qmlimportscanner needs qmldir file in build dir - qmldir2build.files = $$qmldir_file + # For non-installed static builds, tools need qmldir and plugins.qmltypes + # files in the build dir + qmldir2build.files = $$qmldir_file $$fq_aux_qml_files qmldir2build.path = $$DESTDIR COPIES += qmldir2build } diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index a55ab1928e..149b3cff56 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -40,7 +40,7 @@ URI = $$replace(TARGETPATH, "/", ".") QMAKE_MOC_OPTIONS += -Muri=$$URI QMLTYPEFILE = $$_PRO_FILE_PWD_/plugins.qmltypes -exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE +exists($$QMLTYPEFILE): AUX_QML_FILES += $$QMLTYPEFILE # Install rules @@ -73,6 +73,29 @@ load(qt_common) # directory. Then review and commit the changes made to plugins.qmltypes. # !cross_compile { + qml1_target { + qmlplugindump = qml1plugindump + importpath.name = QML_IMPORT_PATH + } else { + qmlplugindump = qmlplugindump + importpath.name = QML2_IMPORT_PATH + } + importpath.value = + for(qmod, QTREPOS) { + qml1_target: \ + qmod = $$qmod/imports + else: \ + qmod = $$qmod/qml + exists($$qmod): importpath.value += $$shell_path($$qmod) + } + importpath.value = $$unique(importpath.value) + QT_TOOL_ENV = importpath + qtPrepareTool(QMLPLUGINDUMP, $$qmlplugindump) + QT_TOOL_ENV = + + # qtPrepareTool() must be called outside a build pass, as it protects + # against concurrent wrapper creation by omitting it during build passes. + # However, creating the actual targets is reserved to the build passes. build_pass|!debug_and_release { isEmpty(IMPORT_VERSION) { no_cxx_module { @@ -84,25 +107,6 @@ load(qt_common) } load(resolve_target) - qml1_target { - qmlplugindump = qml1plugindump - importpath.name = QML_IMPORT_PATH - } else { - qmlplugindump = qmlplugindump - importpath.name = QML2_IMPORT_PATH - } - importpath.value = - for(qmod, QTREPOS) { - qml1_target: \ - qmod = $$qmod/imports - else: \ - qmod = $$qmod/qml - exists($$qmod): importpath.value += $$shell_path($$qmod) - } - importpath.value = $$unique(importpath.value) - 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_build_extra.prf b/mkspecs/features/qt_build_extra.prf index 448da9b797..a1512c3a19 100644 --- a/mkspecs/features/qt_build_extra.prf +++ b/mkspecs/features/qt_build_extra.prf @@ -13,7 +13,7 @@ equals(TEMPLATE, subdirs): return() # It's likely that these extra flags will be wrong for host builds, # and the bootstrapped tools usually don't need them anyway. -host_build:force_bootstrap: return() +host_build:cross_compile: return() # The headersclean check needs defines and includes even for # header-only modules. diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index 57f1034d28..e754a17790 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -43,9 +43,9 @@ contains(TEMPLATE, .*lib) { QMAKE_PRL_INSTALL_REPLACE += lib_replace } -# The remainder of this file must not apply to bootstrapped tools, +# The remainder of this file must not apply to host tools/libraries, # as the host compiler's version and capabilities are not checked. -host_build:force_bootstrap: return() +host_build:cross_compile: return() # Extra warnings for Qt non-example code, to ensure cleanliness of the sources. # The block below may turn these warnings into errors for some Qt targets. @@ -70,10 +70,10 @@ warnings_are_errors:warning_clean { # compiler. clang:!uikit { # Apple clang 4.0-4.2,5.0-5.1,6.0-6.4 - # Regular clang 3.3-3.8 + # Regular clang 3.3-3.9 apple_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION} reg_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION} - contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]")|contains(reg_ver, "3\\.[3-8]") { + contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]")|contains(reg_ver, "3\\.[3-9]") { QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR } } else:intel_icc:linux { diff --git a/mkspecs/features/uikit/device_destinations.sh b/mkspecs/features/uikit/device_destinations.sh index 2c117d0ad4..e87508bed9 100755 --- a/mkspecs/features/uikit/device_destinations.sh +++ b/mkspecs/features/uikit/device_destinations.sh @@ -39,7 +39,8 @@ ## ############################################################################# -booted_simulator=$(xcrun simctl list devices | grep -E '$1' | grep -v unavailable | grep Booted | perl -lne 'print $2 if /\((.*?)\)/') +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +booted_simulator=$($DIR/ios_devices.pl '$1' "Booted" "NOT unavailable" | tail -n 1) echo "SIMULATOR_DEVICES = $booted_simulator" xcodebuild test -scheme $2 -destination 'id=0' -destination-timeout 1 2>&1| sed -n 's/{ \(platform:.*\) }/\1/p' | while read destination; do diff --git a/mkspecs/features/uikit/xcodebuild.mk b/mkspecs/features/uikit/xcodebuild.mk index b8674947fe..057f4f75ac 100644 --- a/mkspecs/features/uikit/xcodebuild.mk +++ b/mkspecs/features/uikit/xcodebuild.mk @@ -56,11 +56,12 @@ simulator-install: ACTION = build release-%: CONFIGURATION = Release debug-%: CONFIGURATION = Debug +SPECDIR := $(dir $(lastword $(MAKEFILE_LIST))) + # Test and build (device) destinations ifneq ($(filter check%,$(MAKECMDGOALS)),) ifeq ($(DEVICES),) $(info Enumerating test destinations (you may override this by setting DEVICES explicitly), please wait...) - SPECDIR := $(dir $(lastword $(MAKEFILE_LIST))) DESTINATIONS_INCLUDE = /tmp/device_destinations.mk $(shell $(SPECDIR)/../features/uikit/device_destinations.sh '$(EXPORT_DEVICE_FILTER)' $(TARGET) > $(DESTINATIONS_INCLUDE)) include $(DESTINATIONS_INCLUDE) @@ -71,7 +72,7 @@ endif %-device: DEVICES = $(HARDWARE_DEVICES) GENERIC_DEVICE_DESTINATION := $(EXPORT_GENERIC_DEVICE_DESTINATION) -GENERIC_SIMULATOR_DESTINATION := "id=$(shell xcrun simctl list devices | grep -E '$(EXPORT_DEVICE_FILTER)' | grep -v unavailable | perl -lne 'print $$1 if /\((.*?)\)/' | tail -n 1)" +GENERIC_SIMULATOR_DESTINATION := "id=$(shell $(SPECDIR)/ios_devices.pl '$(EXPORT_DEVICE_FILTER)' "NOT unavailable" | tail -n 1)" %-simulator: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_SIMULATOR_DESTINATION)) %-device: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_DEVICE_DESTINATION)) diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf index 291ebec6e9..e17bda3c8e 100644 --- a/mkspecs/features/winrt/package_manifest.prf +++ b/mkspecs/features/winrt/package_manifest.prf @@ -31,6 +31,8 @@ # WINRT_MANIFEST.capabilities: Specifies capabilities to add to the capability list. # WINRT_MANIFEST.capabilities_device: Specifies device capabilities to add to the capability list. (location, webcam...) # WINRT_MANIFEST.dependencies: Specifies dependencies required by the package. +# WINRT_MANIFEST.minVersion: Specifies the minimum required Windows version to run the package. Defaults to %UCRTVersion% +# WINRT_MANIFEST.maxVersionTested: Specifies the maximum Windows version the package has been tested against. Defaults to WINRT_MANIFEST.minVersion # The manifest is generated for each build pass for normal apps, and only once for vcapps. # - Normal apps have their package root directory in the same place as the target (one for each build pass). @@ -91,6 +93,11 @@ isEmpty(WINRT_MANIFEST.background): WINRT_MANIFEST.background = green isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en + *-msvc2015 { + isEmpty(WINRT_MANIFEST.minVersion): WINRT_MANIFEST.minVersion = $$(UCRTVersion) + isEmpty(WINRT_MANIFEST.minVersion): error("No UCRTVersion found in environment.")) + isEmpty(WINRT_MANIFEST.maxVersionTested): WINRT_MANIFEST.maxVersionTested = $$WINRT_MANIFEST.minVersion + } INDENT = "$$escape_expand(\\r\\n) " diff --git a/mkspecs/macx-ios-clang/ios_devices.pl b/mkspecs/macx-ios-clang/ios_devices.pl new file mode 100755 index 0000000000..eb45d1dab9 --- /dev/null +++ b/mkspecs/macx-ios-clang/ios_devices.pl @@ -0,0 +1,50 @@ +#!/usr/bin/perl + +############################################################################# +## +## Copyright (C) 2016 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is the build configuration utility 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$ +## +############################################################################# + +$output = `xcrun simctl list devices --json 2>&1`; +$output =~ s/\n//g; + +BLOCK: +foreach $block ($output =~ /{.*?}/g) { + foreach $filter (@ARGV) { + if ($filter =~ /^NOT\s(.*)/) { + $block =~ /$1/ && next BLOCK; + } else { + $block =~ /$filter/ || next BLOCK; + } + } + $block =~ /udid[:|\s|\"]+(.*)\"/; + print "$1\n"; +} diff --git a/mkspecs/macx-xcode/default.xcscheme b/mkspecs/macx-xcode/default.xcscheme index ab2f6a8ab7..6beb0d8280 100644 --- a/mkspecs/macx-xcode/default.xcscheme +++ b/mkspecs/macx-xcode/default.xcscheme @@ -62,7 +62,7 @@ useCustomWorkingDirectory = "NO" buildConfiguration = "Debug" ignoresPersistentStateOnLaunch = "NO" - debugDocumentVersioning = "YES" + debugDocumentVersioning = "NO" allowLocationSimulation = "YES"> <BuildableProductRunnable> <BuildableReference @@ -88,7 +88,7 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" buildConfiguration = "Release" - debugDocumentVersioning = "YES"> + debugDocumentVersioning = "NO"> <BuildableProductRunnable> <BuildableReference BuildableIdentifier = "primary" |