summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/aix-g++-64/qplatformdefs.h40
-rw-r--r--mkspecs/aix-g++/qplatformdefs.h40
-rw-r--r--mkspecs/android-clang/qmake.conf141
-rw-r--r--mkspecs/android-clang/qplatformdefs.h42
-rw-r--r--mkspecs/android-g++/qmake.conf35
-rw-r--r--mkspecs/common/aix/qplatformdefs.h40
-rw-r--r--mkspecs/common/android-base-head.conf78
-rw-r--r--mkspecs/common/android-base-tail.conf90
-rw-r--r--mkspecs/common/android/qplatformdefs.h46
-rw-r--r--mkspecs/common/angle.conf13
-rw-r--r--mkspecs/common/bsd/qplatformdefs.h40
-rw-r--r--mkspecs/common/c89/qplatformdefs.h40
-rw-r--r--mkspecs/common/clang-mac.conf1
-rw-r--r--mkspecs/common/clang.conf19
-rw-r--r--mkspecs/common/g++-base.conf8
-rw-r--r--mkspecs/common/g++-win32.conf8
-rw-r--r--mkspecs/common/gcc-base-unix.conf2
-rw-r--r--mkspecs/common/gcc-base.conf20
-rw-r--r--mkspecs/common/ghs-base.conf5
-rw-r--r--mkspecs/common/ghs-integrity-armv8.conf12
-rw-r--r--mkspecs/common/icc-base-unix.conf10
-rw-r--r--mkspecs/common/integrity/qplatformdefs.h40
-rw-r--r--mkspecs/common/mac.conf1
-rw-r--r--mkspecs/common/mac/qplatformdefs.h40
-rw-r--r--mkspecs/common/macx.conf7
-rw-r--r--mkspecs/common/msvc-based-version.conf13
-rw-r--r--mkspecs/common/msvc-desktop.conf8
-rw-r--r--mkspecs/common/msvc-version.conf42
-rw-r--r--mkspecs/common/nacl/g++-nacl32.conf12
-rw-r--r--mkspecs/common/nacl/g++-nacl64.conf12
-rw-r--r--mkspecs/common/nacl/nacl-base.conf11
-rw-r--r--mkspecs/common/nacl/qplatformdefs.h54
-rw-r--r--mkspecs/common/posix/qplatformdefs.h42
-rw-r--r--mkspecs/common/qcc-base-qnx-aarch64le.conf2
-rw-r--r--mkspecs/common/qcc-base-qnx-armle-v7.conf2
-rw-r--r--mkspecs/common/qcc-base-qnx-x86-64.conf2
-rw-r--r--mkspecs/common/qcc-base-qnx-x86.conf2
-rw-r--r--mkspecs/common/qcc-base-qnx.conf4
-rw-r--r--mkspecs/common/qcc-base.conf2
-rw-r--r--mkspecs/common/qnx/qplatformdefs.h47
-rw-r--r--mkspecs/common/rtems-base.conf73
-rw-r--r--mkspecs/common/rtems/qplatformdefs.h36
-rw-r--r--mkspecs/common/sanitize.conf10
-rw-r--r--mkspecs/common/solaris.conf1
-rw-r--r--mkspecs/common/uikit.conf2
-rw-r--r--mkspecs/common/uikit/GLES2/gl2.h40
-rw-r--r--mkspecs/common/uikit/clang.conf4
-rw-r--r--mkspecs/common/vxworks/qplatformdefs.h52
-rw-r--r--mkspecs/common/wasm/qplatformdefs.h (renamed from mkspecs/android-g++/qplatformdefs.h)54
-rw-r--r--mkspecs/common/wasm/wasm.conf86
-rw-r--r--mkspecs/common/windows-desktop.conf5
-rw-r--r--mkspecs/common/winrt_winphone/assets/logo_150x150.pngbin2638 -> 0 bytes
-rw-r--r--mkspecs/common/winrt_winphone/assets/logo_30x30.pngbin737 -> 0 bytes
-rw-r--r--mkspecs/common/winrt_winphone/assets/logo_310x150.pngbin2655 -> 0 bytes
-rw-r--r--mkspecs/common/winrt_winphone/assets/logo_310x310.pngbin2903 -> 0 bytes
-rw-r--r--mkspecs/common/winrt_winphone/assets/logo_44x44.pngbin1066 -> 0 bytes
-rw-r--r--mkspecs/common/winrt_winphone/assets/logo_480x800.pngbin6820 -> 0 bytes
-rw-r--r--mkspecs/common/winrt_winphone/assets/logo_620x300.pngbin5752 -> 0 bytes
-rw-r--r--mkspecs/common/winrt_winphone/assets/logo_70x70.pngbin2024 -> 0 bytes
-rw-r--r--mkspecs/common/winrt_winphone/assets/logo_71x71.pngbin1060 -> 0 bytes
-rw-r--r--mkspecs/common/winrt_winphone/assets/logo_store.pngbin1159 -> 0 bytes
-rw-r--r--mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in51
-rw-r--r--mkspecs/common/winrt_winphone/qmake.conf102
-rw-r--r--mkspecs/common/winrt_winphone/qplatformdefs.h139
-rw-r--r--mkspecs/cygwin-g++/qplatformdefs.h42
-rw-r--r--mkspecs/darwin-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/freebsd-generic-clang/qplatformdefs.h40
-rw-r--r--mkspecs/devices/freebsd-rasp-pi-clang/qplatformdefs.h40
-rw-r--r--mkspecs/devices/integrity-armv8-SA8155P/qmake.conf47
-rw-r--r--mkspecs/devices/integrity-armv8-SA8155P/qplatformdefs.h9
-rw-r--r--mkspecs/devices/integrity-armv8-drive-cx/qplatformdefs.h40
-rw-r--r--mkspecs/devices/integrity-armv8-msm8996au/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-archos-gen8-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp44
-rw-r--r--mkspecs/devices/linux-arm-amlogic-8726M-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-arm-generic-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-arm-trident-pnx8473-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-beagleboard-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-colibri-vf-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-drive-cx-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-emu-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-generic-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-imx53qsb-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-imx6-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-imx7-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-imx8-g++/qmake.conf41
-rw-r--r--mkspecs/devices/linux-imx8-g++/qplatformdefs.h4
-rw-r--r--mkspecs/devices/linux-jetson-tk1-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-jetson-tk1-pro-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-jetson-tx1-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp40
-rw-r--r--mkspecs/devices/linux-mipsel-broadcom-97425-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-mipsel-ci20-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-nuc-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-odroid-xu3-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-rasp-pi-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-rasp-pi2-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-rasp-pi3-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-rasp-pi3-vc4-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf25
-rw-r--r--mkspecs/devices/linux-rasp-pi4-aarch64/qplatformdefs.h8
-rw-r--r--mkspecs/devices/linux-rasp-pi4-v3d-g++/qmake.conf40
-rw-r--r--mkspecs/devices/linux-rasp-pi4-v3d-g++/qplatformdefs.h4
-rw-r--r--mkspecs/devices/linux-rcar-h2-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-rcar-m3-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-snowball-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-tegra2-g++/qplatformdefs.h40
-rw-r--r--mkspecs/devices/linux-tinkerboard-g++/qplatformdefs.h40
-rw-r--r--mkspecs/features/android/android.prf63
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf109
-rw-r--r--mkspecs/features/android/default_pre.prf81
-rw-r--r--mkspecs/features/android/resolve_config.prf29
-rw-r--r--mkspecs/features/android/sdk.prf2
-rw-r--r--mkspecs/features/cmake_functions.prf9
-rw-r--r--mkspecs/features/configure.prf6
-rw-r--r--mkspecs/features/coverage.prf13
-rw-r--r--mkspecs/features/create_cmake.prf201
-rw-r--r--mkspecs/features/ctest_testcase_common.prf1
-rw-r--r--mkspecs/features/data/cmake/ExtraSourceIncludes.cmake.in7
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in377
-rw-r--r--mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in11
-rw-r--r--mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in11
-rw-r--r--mkspecs/features/data/dumpvcvars.bat27
-rwxr-xr-xmkspecs/features/data/mac/objc_namespace.sh141
-rw-r--r--mkspecs/features/data/testserver/Dockerfile29
-rw-r--r--mkspecs/features/data/testserver/docker-compose-common.yml38
-rw-r--r--mkspecs/features/data/unix/findclasslist.pl64
-rw-r--r--mkspecs/features/dbuscommon.pri2
-rw-r--r--mkspecs/features/default_post.prf33
-rw-r--r--mkspecs/features/default_pre.prf15
-rw-r--r--mkspecs/features/exclusive_builds.prf9
-rw-r--r--mkspecs/features/exclusive_builds_post.prf2
-rw-r--r--mkspecs/features/java.prf11
-rw-r--r--mkspecs/features/lex.prf50
-rw-r--r--mkspecs/features/lrelease.prf3
-rw-r--r--mkspecs/features/ltcg.prf14
-rw-r--r--mkspecs/features/mac/asset_catalogs.prf2
-rw-r--r--mkspecs/features/mac/default_post.prf153
-rw-r--r--mkspecs/features/mac/no_warn_empty_obj_files.prf7
-rw-r--r--mkspecs/features/mac/sdk.mk10
-rw-r--r--mkspecs/features/metatypes.prf64
-rw-r--r--mkspecs/features/moc.prf6
-rw-r--r--mkspecs/features/permissions.prf40
-rw-r--r--mkspecs/features/qlalr.prf2
-rw-r--r--mkspecs/features/qmake_use.prf8
-rw-r--r--mkspecs/features/qml_module.prf17
-rw-r--r--mkspecs/features/qml_plugin.prf20
-rw-r--r--mkspecs/features/qmltestcase.prf14
-rw-r--r--mkspecs/features/qt.prf186
-rw-r--r--mkspecs/features/qt_android_deps.prf90
-rw-r--r--mkspecs/features/qt_app.prf65
-rw-r--r--mkspecs/features/qt_build_config.prf147
-rw-r--r--mkspecs/features/qt_build_extra.prf41
-rw-r--r--mkspecs/features/qt_build_paths.prf29
-rw-r--r--mkspecs/features/qt_clear_installs.prf12
-rw-r--r--mkspecs/features/qt_common.prf166
-rw-r--r--mkspecs/features/qt_config.prf3
-rw-r--r--mkspecs/features/qt_configure.prf2522
-rw-r--r--mkspecs/features/qt_docs.prf106
-rw-r--r--mkspecs/features/qt_docs_targets.prf45
-rw-r--r--mkspecs/features/qt_example_installs.prf143
-rw-r--r--mkspecs/features/qt_functions.prf59
-rw-r--r--mkspecs/features/qt_helper_lib.prf85
-rw-r--r--mkspecs/features/qt_installs.prf64
-rw-r--r--mkspecs/features/qt_module.prf338
-rw-r--r--mkspecs/features/qt_module_headers.prf312
-rw-r--r--mkspecs/features/qt_module_pris.prf226
-rw-r--r--mkspecs/features/qt_parts.prf84
-rw-r--r--mkspecs/features/qt_plugin.prf103
-rw-r--r--mkspecs/features/qt_prefix_build_check.prf21
-rw-r--r--mkspecs/features/qt_targets.prf4
-rw-r--r--mkspecs/features/qt_test_helper.prf34
-rw-r--r--mkspecs/features/qt_tool.prf78
-rw-r--r--mkspecs/features/qt_tracepoints.prf54
-rw-r--r--mkspecs/features/resolve_target.prf19
-rw-r--r--mkspecs/features/resources.prf109
-rw-r--r--mkspecs/features/resources_functions.prf139
-rw-r--r--mkspecs/features/rtti.prf (renamed from mkspecs/features/win32/rtti.prf)0
-rw-r--r--mkspecs/features/rtti_off.prf (renamed from mkspecs/features/win32/rtti_off.prf)0
-rw-r--r--mkspecs/features/sanitizer.prf31
-rw-r--r--mkspecs/features/simd.prf6
-rw-r--r--mkspecs/features/testcase.prf57
-rw-r--r--mkspecs/features/toolchain.prf39
-rw-r--r--mkspecs/features/uic.prf4
-rw-r--r--mkspecs/features/uikit/default_post.prf35
-rw-r--r--mkspecs/features/uikit/default_pre.prf9
-rwxr-xr-xmkspecs/features/uikit/device_destinations.sh41
-rwxr-xr-xmkspecs/features/uikit/devices.py53
-rw-r--r--mkspecs/features/uikit/gc_binaries.prf6
-rw-r--r--mkspecs/features/uikit/qt.prf33
-rw-r--r--mkspecs/features/uikit/qt_parts.prf5
-rw-r--r--mkspecs/features/uikit/xcodebuild.mk16
-rw-r--r--mkspecs/features/uikit/xcodebuild.prf10
-rw-r--r--mkspecs/features/unix/no_direct_extern_access.prf7
-rw-r--r--mkspecs/features/unsupported/testserver.prf231
-rw-r--r--mkspecs/features/wasm/default_pre.prf2
-rw-r--r--mkspecs/features/wasm/emcc_ver.prf25
-rw-r--r--mkspecs/features/wasm/wasm.prf100
-rw-r--r--mkspecs/features/wayland-scanner.prf8
-rw-r--r--mkspecs/features/win32/default_pre.prf2
-rw-r--r--mkspecs/features/win32/dumpcpp.prf18
-rw-r--r--mkspecs/features/win32/idcidl.prf3
-rw-r--r--mkspecs/features/win32/opengl.prf39
-rw-r--r--mkspecs/features/win32/qt_dll.prf1
-rw-r--r--mkspecs/features/win32/separate_debug_info.prf6
-rw-r--r--mkspecs/features/win32/windows.prf11
-rw-r--r--mkspecs/features/win32/windows_vulkan_sdk.prf5
-rw-r--r--mkspecs/features/winrt/console.prf5
-rw-r--r--mkspecs/features/winrt/default_pre.prf14
-rw-r--r--mkspecs/features/winrt/package_manifest.prf196
-rw-r--r--mkspecs/features/yacc.prf59
-rw-r--r--mkspecs/freebsd-clang/qplatformdefs.h40
-rw-r--r--mkspecs/freebsd-g++/qplatformdefs.h40
-rw-r--r--mkspecs/haiku-g++/qplatformdefs.h40
-rw-r--r--mkspecs/hpuxi-g++-64/qplatformdefs.h40
-rw-r--r--mkspecs/hurd-g++/qplatformdefs.h41
-rw-r--r--mkspecs/integrity-armv7-imx6/qplatformdefs.h40
-rw-r--r--mkspecs/integrity-armv7/qplatformdefs.h40
-rw-r--r--mkspecs/integrity-armv8-rcar/qplatformdefs.h40
-rw-r--r--mkspecs/integrity-x86/qplatformdefs.h40
-rw-r--r--mkspecs/linux-aarch64-gnu-g++/qplatformdefs.h40
-rw-r--r--mkspecs/linux-arm-gnueabi-g++/qplatformdefs.h40
-rw-r--r--mkspecs/linux-clang-32/qmake.conf20
-rw-r--r--mkspecs/linux-clang-32/qplatformdefs.h4
-rw-r--r--mkspecs/linux-clang-libc++-32/qmake.conf10
-rw-r--r--mkspecs/linux-clang-libc++-32/qplatformdefs.h4
-rw-r--r--mkspecs/linux-clang-libc++/qplatformdefs.h40
-rw-r--r--mkspecs/linux-clang/qplatformdefs.h48
-rw-r--r--mkspecs/linux-g++-32/qplatformdefs.h40
-rw-r--r--mkspecs/linux-g++-64/qplatformdefs.h40
-rw-r--r--mkspecs/linux-g++/qplatformdefs.h48
-rw-r--r--mkspecs/linux-icc-32/qplatformdefs.h40
-rw-r--r--mkspecs/linux-icc-64/qplatformdefs.h40
-rw-r--r--mkspecs/linux-icc-k1om/qplatformdefs.h40
-rw-r--r--mkspecs/linux-icc/qmake.conf1
-rw-r--r--mkspecs/linux-icc/qplatformdefs.h40
-rw-r--r--mkspecs/linux-llvm/qplatformdefs.h48
-rw-r--r--mkspecs/linux-lsb-g++/qplatformdefs.h47
-rw-r--r--mkspecs/lynxos-g++/qplatformdefs.h48
-rw-r--r--mkspecs/macx-clang/Info.plist.app6
-rw-r--r--mkspecs/macx-clang/Info.plist.lib2
-rw-r--r--mkspecs/macx-clang/qmake.conf2
-rw-r--r--mkspecs/macx-clang/qplatformdefs.h40
-rw-r--r--mkspecs/macx-g++/Info.plist.app2
-rw-r--r--mkspecs/macx-g++/Info.plist.lib2
-rw-r--r--mkspecs/macx-g++/qplatformdefs.h40
-rw-r--r--mkspecs/macx-icc/Info.plist.app2
-rw-r--r--mkspecs/macx-icc/Info.plist.lib2
-rw-r--r--mkspecs/macx-icc/qplatformdefs.h40
-rw-r--r--mkspecs/macx-ios-clang/Default-568h@2x.pngbin18594 -> 0 bytes
-rw-r--r--mkspecs/macx-ios-clang/Info.plist.app80
-rw-r--r--mkspecs/macx-ios-clang/Info.plist.lib2
-rw-r--r--mkspecs/macx-ios-clang/LaunchScreen.storyboard48
-rw-r--r--mkspecs/macx-ios-clang/LaunchScreen.xib45
-rw-r--r--mkspecs/macx-ios-clang/features/default_post.prf9
-rw-r--r--mkspecs/macx-ios-clang/qmake.conf2
-rw-r--r--mkspecs/macx-ios-clang/qplatformdefs.h40
-rw-r--r--mkspecs/macx-tvos-clang/qplatformdefs.h40
-rw-r--r--mkspecs/macx-visionos-clang/Info.plist.app39
-rw-r--r--mkspecs/macx-visionos-clang/Info.plist.dSYM.in18
-rw-r--r--mkspecs/macx-visionos-clang/Info.plist.lib (renamed from mkspecs/macx-tvos-clang/Info.plist.lib)2
-rw-r--r--mkspecs/macx-visionos-clang/qmake.conf29
-rw-r--r--mkspecs/macx-visionos-clang/qplatformdefs.h4
-rw-r--r--mkspecs/macx-watchos-clang/qplatformdefs.h40
-rw-r--r--mkspecs/macx-xcode/QtTest.plist2
-rw-r--r--mkspecs/macx-xcode/WorkspaceSettings.xcsettings2
-rw-r--r--mkspecs/macx-xcode/default.xcscheme2
-rw-r--r--mkspecs/macx-xcode/qplatformdefs.h40
-rw-r--r--mkspecs/netbsd-g++/qplatformdefs.h40
-rw-r--r--mkspecs/openbsd-g++/qplatformdefs.h40
-rw-r--r--mkspecs/qnx-aarch64le-qcc/qplatformdefs.h40
-rw-r--r--mkspecs/qnx-armle-v7-qcc/qplatformdefs.h40
-rw-r--r--mkspecs/qnx-x86-64-qcc/qplatformdefs.h40
-rw-r--r--mkspecs/qnx-x86-qcc/qplatformdefs.h40
-rw-r--r--mkspecs/solaris-cc-64-stlport/qplatformdefs.h40
-rw-r--r--mkspecs/solaris-cc-64/qplatformdefs.h40
-rw-r--r--mkspecs/solaris-cc-stlport/qplatformdefs.h40
-rw-r--r--mkspecs/solaris-cc/qplatformdefs.h40
-rw-r--r--mkspecs/solaris-g++-64/qplatformdefs.h40
-rw-r--r--mkspecs/solaris-g++/qplatformdefs.h40
-rw-r--r--mkspecs/unsupported/linux-host-g++/qplatformdefs.h40
-rw-r--r--mkspecs/unsupported/linux-scratchbox2-g++/qplatformdefs.h40
-rw-r--r--mkspecs/unsupported/macx-tvos-clang/Info.plist.app (renamed from mkspecs/macx-tvos-clang/Info.plist.app)4
-rw-r--r--mkspecs/unsupported/macx-tvos-clang/Info.plist.lib (renamed from mkspecs/macx-watchos-clang/Info.plist.lib)2
-rw-r--r--mkspecs/unsupported/macx-tvos-clang/qmake.conf (renamed from mkspecs/macx-tvos-clang/qmake.conf)2
-rw-r--r--mkspecs/unsupported/macx-tvos-clang/qplatformdefs.h4
-rw-r--r--mkspecs/unsupported/macx-watchos-clang/Info.plist.app (renamed from mkspecs/macx-watchos-clang/Info.plist.app)4
-rw-r--r--mkspecs/unsupported/macx-watchos-clang/Info.plist.lib20
-rw-r--r--mkspecs/unsupported/macx-watchos-clang/qmake.conf (renamed from mkspecs/macx-watchos-clang/qmake.conf)2
-rw-r--r--mkspecs/unsupported/macx-watchos-clang/qplatformdefs.h4
-rw-r--r--mkspecs/unsupported/nacl-g++/qmake.conf13
-rw-r--r--mkspecs/unsupported/nacl-g++/qplatformdefs.h45
-rw-r--r--mkspecs/unsupported/nacl64-g++/qmake.conf13
-rw-r--r--mkspecs/unsupported/nacl64-g++/qplatformdefs.h45
-rw-r--r--mkspecs/unsupported/qnx-X11-g++/qplatformdefs.h42
-rw-r--r--mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h40
-rw-r--r--mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h40
-rw-r--r--mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h40
-rw-r--r--mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h40
-rw-r--r--mkspecs/vxworks-clang/qplatformdefs.h9
-rw-r--r--mkspecs/wasm-emscripten-64/qmake.conf7
-rw-r--r--mkspecs/wasm-emscripten-64/qplatformdefs.h9
-rw-r--r--mkspecs/wasm-emscripten/qmake.conf76
-rw-r--r--mkspecs/wasm-emscripten/qplatformdefs.h178
-rw-r--r--mkspecs/win32-arm64-msvc/qmake.conf (renamed from mkspecs/win32-arm64-msvc2017/qmake.conf)2
-rw-r--r--mkspecs/win32-arm64-msvc/qplatformdefs.h4
-rw-r--r--mkspecs/win32-arm64-msvc2017/qplatformdefs.h40
-rw-r--r--mkspecs/win32-clang-g++/qmake.conf8
-rw-r--r--mkspecs/win32-clang-g++/qplatformdefs.h40
-rw-r--r--mkspecs/win32-clang-msvc/qmake.conf14
-rw-r--r--mkspecs/win32-clang-msvc/qplatformdefs.h40
-rw-r--r--mkspecs/win32-g++/qmake.conf3
-rw-r--r--mkspecs/win32-g++/qplatformdefs.h42
-rw-r--r--mkspecs/win32-icc-k1om/qplatformdefs.h40
-rw-r--r--mkspecs/win32-icc/qmake.conf14
-rw-r--r--mkspecs/win32-icc/qplatformdefs.h40
-rw-r--r--mkspecs/win32-msvc/qplatformdefs.h40
-rw-r--r--mkspecs/winrt-arm-msvc2015/qmake.conf19
-rw-r--r--mkspecs/winrt-arm-msvc2015/qplatformdefs.h40
-rw-r--r--mkspecs/winrt-arm-msvc2017/qmake.conf19
-rw-r--r--mkspecs/winrt-arm-msvc2017/qplatformdefs.h40
-rw-r--r--mkspecs/winrt-arm-msvc2019/qmake.conf19
-rw-r--r--mkspecs/winrt-arm-msvc2019/qplatformdefs.h40
-rw-r--r--mkspecs/winrt-arm64-msvc2017/qmake.conf19
-rw-r--r--mkspecs/winrt-arm64-msvc2017/qplatformdefs.h40
-rw-r--r--mkspecs/winrt-arm64-msvc2019/qmake.conf19
-rw-r--r--mkspecs/winrt-arm64-msvc2019/qplatformdefs.h40
-rw-r--r--mkspecs/winrt-x64-msvc2015/qmake.conf19
-rw-r--r--mkspecs/winrt-x64-msvc2015/qplatformdefs.h40
-rw-r--r--mkspecs/winrt-x64-msvc2017/qmake.conf19
-rw-r--r--mkspecs/winrt-x64-msvc2017/qplatformdefs.h40
-rw-r--r--mkspecs/winrt-x64-msvc2019/qmake.conf19
-rw-r--r--mkspecs/winrt-x64-msvc2019/qplatformdefs.h40
-rw-r--r--mkspecs/winrt-x86-msvc2015/qmake.conf18
-rw-r--r--mkspecs/winrt-x86-msvc2015/qplatformdefs.h40
-rw-r--r--mkspecs/winrt-x86-msvc2017/qmake.conf18
-rw-r--r--mkspecs/winrt-x86-msvc2017/qplatformdefs.h40
-rw-r--r--mkspecs/winrt-x86-msvc2019/qmake.conf18
-rw-r--r--mkspecs/winrt-x86-msvc2019/qplatformdefs.h40
342 files changed, 3051 insertions, 12236 deletions
diff --git a/mkspecs/aix-g++-64/qplatformdefs.h b/mkspecs/aix-g++-64/qplatformdefs.h
index 8737517a79..aa79d8de6b 100644
--- a/mkspecs/aix-g++-64/qplatformdefs.h
+++ b/mkspecs/aix-g++-64/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/aix-g++/qplatformdefs.h b/mkspecs/aix-g++/qplatformdefs.h
index 8737517a79..aa79d8de6b 100644
--- a/mkspecs/aix-g++/qplatformdefs.h
+++ b/mkspecs/aix-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/android-clang/qmake.conf b/mkspecs/android-clang/qmake.conf
index 975d43779d..031e97a808 100644
--- a/mkspecs/android-clang/qmake.conf
+++ b/mkspecs/android-clang/qmake.conf
@@ -8,49 +8,108 @@ CONFIG += android_install unversioned_soname unversioned_libname
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/clang.conf)
-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++
-
-equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
- QMAKE_CFLAGS += -target armv7-none-linux-androideabi
-else: equals(ANDROID_TARGET_ARCH, armeabi): \
- QMAKE_CFLAGS += -target armv5te-none-linux-androideabi
-else: equals(ANDROID_TARGET_ARCH, arm64-v8a): \
- QMAKE_CFLAGS += -target aarch64-none-linux-android
-else: equals(ANDROID_TARGET_ARCH, x86): \
- QMAKE_CFLAGS += -target i686-none-linux-android -mstackrealign
-else: equals(ANDROID_TARGET_ARCH, x86_64): \
- QMAKE_CFLAGS += -target x86_64-none-linux-android
-else: equals(ANDROID_TARGET_ARCH, mips): \
- QMAKE_CFLAGS += -target mipsel-none-linux-android
-else: equals(ANDROID_TARGET_ARCH, mips64): \
- QMAKE_CFLAGS += -target mips64el-none-linux-android
-
-QMAKE_CFLAGS += -gcc-toolchain $$NDK_TOOLCHAIN_PATH -fno-limit-debug-info
-
-QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++
-equals(ANDROID_TARGET_ARCH, armeabi-v7a): QMAKE_LINK += -Wl,--exclude-libs,libunwind.a
-
-QMAKE_CFLAGS += -DANDROID_HAS_WSTRING --sysroot=$$NDK_ROOT/sysroot \
- -isystem $$NDK_ROOT/sysroot/usr/include/$$NDK_TOOLS_PREFIX \
- -isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++/include \
- -isystem $$NDK_ROOT/sources/android/support/include \
- -isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++abi/include
-
-ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$$ANDROID_TARGET_ARCH
-
-ANDROID_STDCPP_PATH = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++_shared.so
+
+load(device_config)
+
+# In early configure setup; nothing useful to be done here.
+isEmpty(DEFAULT_ANDROID_NDK_ROOT): return()
+
+NDK_ROOT = $$(ANDROID_NDK_ROOT)
+isEmpty(NDK_ROOT): NDK_ROOT = $$DEFAULT_ANDROID_NDK_ROOT
+
+!exists($$NDK_ROOT): error("You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.")
+
+NDK_HOST = $$(ANDROID_NDK_HOST)
+isEmpty(NDK_HOST): NDK_HOST = $$DEFAULT_ANDROID_NDK_HOST
+
+ANDROID_PLATFORM = $$(ANDROID_NDK_PLATFORM)
+isEmpty(ANDROID_PLATFORM): ANDROID_PLATFORM = $$DEFAULT_ANDROID_PLATFORM
+
+ANDROID_SDK_ROOT = $$(ANDROID_SDK_ROOT)
+isEmpty(ANDROID_SDK_ROOT): ANDROID_SDK_ROOT = $$DEFAULT_ANDROID_SDK_ROOT
+
+ANDROID_SDK_BUILD_TOOLS_REVISION = $$(ANDROID_BUILD_TOOLS_REVISION)
+isEmpty(ANDROID_SDK_BUILD_TOOLS_REVISION) {
+ SDK_BUILD_TOOLS_REVISIONS = $$files($$ANDROID_SDK_ROOT/build-tools/*)
+ for (REVISION, SDK_BUILD_TOOLS_REVISIONS) {
+ BASENAME = $$basename(REVISION)
+ greaterThan(BASENAME, $$ANDROID_SDK_BUILD_TOOLS_REVISION): ANDROID_SDK_BUILD_TOOLS_REVISION = $$BASENAME
+ }
+}
+
+ALL_ANDROID_ABIS = $$(ALL_ANDROID_ABIS)
+isEmpty(ALL_ANDROID_ABIS): ALL_ANDROID_ABIS = $$DEFAULT_ANDROID_ABIS
+isEmpty(ALL_ANDROID_ABIS): ALL_ANDROID_ABIS = arm64-v8a armeabi-v7a x86_64 x86
+
+CONFIG += $$ANDROID_PLATFORM
+
+ANDROID_MIN_SDK_VERSION = $$replace(ANDROID_PLATFORM, "android-", "")
+ANDROID_TARGET_SDK_VERSION = 34
+
+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_LINK = $$QMAKE_CXX
+QMAKE_OBJCOPY = $$NDK_LLVM_PATH/bin/llvm-objcopy
+QMAKE_AR = $$NDK_LLVM_PATH/bin/llvm-ar cqs
+QMAKE_OBJCOPY = $$NDK_LLVM_PATH/bin/llvm-objcopy
+QMAKE_NM = $$NDK_LLVM_PATH/bin/llvm-nm -P
+
+QMAKE_CFLAGS_OPTIMIZE = -Oz
+QMAKE_CFLAGS_OPTIMIZE_FULL = -Oz
+
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden
+QMAKE_CFLAGS_NEON = -mfpu=neon
+
+QMAKE_LFLAGS_APP = -Wl,--build-id=sha1 -Wl,--no-undefined -Wl,-z,noexecstack -shared
+QMAKE_LFLAGS_SHLIB = -Wl,--build-id=sha1 -Wl,--no-undefined -Wl,-z,noexecstack -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
+QMAKE_LFLAGS_RPATH = -Wl,-rpath=
+QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link=
+
+equals(QMAKE_HOST.os, Windows) {
+ QMAKE_LINK_OBJECT_MAX = 10
+}
+
+QMAKE_LIBS_X11 =
+QMAKE_LIBS_THREAD =
+QMAKE_LIBS_OPENGL =
+QMAKE_INCDIR_POST =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
ANDROID_USE_LLVM = true
-exists($$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++.so): \
- ANDROID_CXX_STL_LIBS = -lc++
-else: \
- ANDROID_CXX_STL_LIBS = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++.so.$$replace(ANDROID_PLATFORM, "android-", "")
+armeabi-v7a.sdk = armeabi-v7a
+armeabi-v7a.target = armeabi-v7a
+armeabi-v7a.dir_affix = armeabi-v7a
+armeabi-v7a.CONFIG = armeabi-v7a
+armeabi-v7a.deployment_identifier = armeabi-v7a
+
+arm64-v8a.sdk = arm64-v8a
+arm64-v8a.target = arm64-v8a
+arm64-v8a.dir_affix = arm64-v8a
+arm64-v8a.CONFIG = arm64-v8a
+arm64-v8a.deployment_identifier = arm64-v8a
+
+x86.sdk = x86
+x86.target = x86
+x86.dir_affix = x86
+x86.CONFIG = x86
+x86.deployment_identifier = x86
-QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz
+x86_64.sdk = x86_64
+x86_64.target = x86_64
+x86_64.dir_affix = x86_64
+x86_64.CONFIG = x86_64
+x86_64.deployment_identifier = x86_64
-include(../common/android-base-tail.conf)
+load(qt_config)
diff --git a/mkspecs/android-clang/qplatformdefs.h b/mkspecs/android-clang/qplatformdefs.h
index f405c91ecb..8e6905f6b1 100644
--- a/mkspecs/android-clang/qplatformdefs.h
+++ b/mkspecs/android-clang/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
@@ -152,11 +116,9 @@
&& !defined(QT_NO_READDIR64)
#define QT_DIRENT struct dirent64
#define QT_READDIR ::readdir64
-#define QT_READDIR_R ::readdir64_r
#else
#define QT_DIRENT struct dirent
#define QT_READDIR ::readdir
-#define QT_READDIR_R ::readdir_r
#endif
#define QT_SOCKET_CONNECT ::connect
diff --git a/mkspecs/android-g++/qmake.conf b/mkspecs/android-g++/qmake.conf
deleted file mode 100644
index 0cb3558f96..0000000000
--- a/mkspecs/android-g++/qmake.conf
+++ /dev/null
@@ -1,35 +0,0 @@
-# qmake configuration for building with android-g++
-MAKEFILE_GENERATOR = UNIX
-QMAKE_PLATFORM = android
-QMAKE_COMPILER = gcc
-
-CONFIG += android_install unversioned_soname unversioned_libname plugin_with_soname android_deployment_settings
-
-include(../common/linux.conf)
-include(../common/gcc-base-unix.conf)
-include(../common/android-base-head.conf)
-
-QMAKE_CC = $${CROSS_COMPILE}gcc
-QMAKE_CXX = $${CROSS_COMPILE}g++
-QMAKE_LINK = $$QMAKE_CXX
-
-ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$$NDK_TOOLCHAIN_VERSION/libs/$$ANDROID_TARGET_ARCH
-ANDROID_STDCPP_PATH = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libgnustl_shared.so
-ANDROID_CXX_STL_LIBS = -lgnustl_shared -lgcc
-ANDROID_USE_LLVM = false
-
-exists($$NDK_ROOT/sysroot/usr/include): \
- QMAKE_CFLAGS += --sysroot=$$NDK_ROOT/sysroot \
- -isystem $$NDK_ROOT/sysroot/usr/include/$$NDK_TOOLS_PREFIX
-else: QMAKE_CFLAGS += --sysroot=$$ANDROID_PLATFORM_ROOT_PATH
-
-QMAKE_CFLAGS += -isystem $$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$$NDK_TOOLCHAIN_VERSION/include \
- -isystem $$ANDROID_SOURCES_CXX_STL_LIBDIR/include
-
-equals(ANDROID_TARGET_ARCH, armeabi)|equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
- LIBGCC_PATH_FULL = $$system("$$QMAKE_CXX -mthumb-interwork -print-libgcc-file-name")
-else: \
- LIBGCC_PATH_FULL = $$system("$$QMAKE_CXX -print-libgcc-file-name")
-ANDROID_SOURCES_CXX_STL_LIBDIR += $$dirname(LIBGCC_PATH_FULL)
-
-include(../common/android-base-tail.conf)
diff --git a/mkspecs/common/aix/qplatformdefs.h b/mkspecs/common/aix/qplatformdefs.h
index 3606a2f1cb..e3b3ea3b93 100644
--- a/mkspecs/common/aix/qplatformdefs.h
+++ b/mkspecs/common/aix/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef Q_AIX_QPLATFORMDEFS_H
#define Q_AIX_QPLATFORMDEFS_H
diff --git a/mkspecs/common/android-base-head.conf b/mkspecs/common/android-base-head.conf
deleted file mode 100644
index a43fc7f23e..0000000000
--- a/mkspecs/common/android-base-head.conf
+++ /dev/null
@@ -1,78 +0,0 @@
-load(device_config)
-
-# In early configure setup; nothing useful to be done here.
-isEmpty(DEFAULT_ANDROID_NDK_ROOT): return()
-
-NDK_ROOT = $$(ANDROID_NDK_ROOT)
-isEmpty(NDK_ROOT): NDK_ROOT = $$DEFAULT_ANDROID_NDK_ROOT
-
-NDK_HOST = $$(ANDROID_NDK_HOST)
-isEmpty(NDK_HOST): NDK_HOST = $$DEFAULT_ANDROID_NDK_HOST
-
-ANDROID_PLATFORM = $$(ANDROID_NDK_PLATFORM)
-isEmpty(ANDROID_PLATFORM): ANDROID_PLATFORM = $$DEFAULT_ANDROID_PLATFORM
-
-ANDROID_TARGET_ARCH = $$(ANDROID_TARGET_ARCH)
-isEmpty(ANDROID_TARGET_ARCH): ANDROID_TARGET_ARCH = $$DEFAULT_ANDROID_TARGET_ARCH
-
-NDK_TOOLCHAIN_PREFIX = $$(ANDROID_NDK_TOOLCHAIN_PREFIX)
-isEmpty(NDK_TOOLCHAIN_PREFIX) {
- equals(ANDROID_TARGET_ARCH, x86): NDK_TOOLCHAIN_PREFIX = x86
- else: equals(ANDROID_TARGET_ARCH, x86_64): NDK_TOOLCHAIN_PREFIX = x86_64
- else: equals(ANDROID_TARGET_ARCH, mips): NDK_TOOLCHAIN_PREFIX = mipsel-linux-android
- else: equals(ANDROID_TARGET_ARCH, mips64): NDK_TOOLCHAIN_PREFIX = mips64el-linux-android
- else: equals(ANDROID_TARGET_ARCH, arm64-v8a): NDK_TOOLCHAIN_PREFIX = aarch64-linux-android
- else: NDK_TOOLCHAIN_PREFIX = arm-linux-androideabi
-}
-
-NDK_TOOLS_PREFIX = $$(ANDROID_NDK_TOOLS_PREFIX)
-isEmpty(NDK_TOOLS_PREFIX) {
- equals(ANDROID_TARGET_ARCH, x86): NDK_TOOLS_PREFIX = i686-linux-android
- else: equals(ANDROID_TARGET_ARCH, x86_64): NDK_TOOLS_PREFIX = x86_64-linux-android
- else: equals(ANDROID_TARGET_ARCH, mips): NDK_TOOLS_PREFIX = mipsel-linux-android
- else: equals(ANDROID_TARGET_ARCH, mips64): NDK_TOOLS_PREFIX = mips64el-linux-android
- else: equals(ANDROID_TARGET_ARCH, arm64-v8a): NDK_TOOLS_PREFIX = aarch64-linux-android
- else: NDK_TOOLS_PREFIX = arm-linux-androideabi
-}
-
-NDK_TOOLCHAIN_VERSION = $$(ANDROID_NDK_TOOLCHAIN_VERSION)
-isEmpty(NDK_TOOLCHAIN_VERSION): NDK_TOOLCHAIN_VERSION = $$DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION
-
-equals(ANDROID_TARGET_ARCH, x86): ANDROID_ARCHITECTURE = x86
-else: equals(ANDROID_TARGET_ARCH, x86_64): ANDROID_ARCHITECTURE = x86_64
-else: equals(ANDROID_TARGET_ARCH, mips): ANDROID_ARCHITECTURE = mips
-else: equals(ANDROID_TARGET_ARCH, mips64): ANDROID_ARCHITECTURE = mips64
-else: equals(ANDROID_TARGET_ARCH, arm64-v8a): ANDROID_ARCHITECTURE = arm64
-else: ANDROID_ARCHITECTURE = arm
-
-!equals(NDK_TOOLCHAIN_VERSION, 4.4.3): ANDROID_CXXSTL_SUFFIX = -$$NDK_TOOLCHAIN_VERSION
-
-NDK_TOOLCHAIN = $$NDK_TOOLCHAIN_PREFIX-$$NDK_TOOLCHAIN_VERSION
-NDK_TOOLCHAIN_PATH = $$NDK_ROOT/toolchains/$$NDK_TOOLCHAIN/prebuilt/$$NDK_HOST
-
-
-ANDROID_SDK_ROOT = $$(ANDROID_SDK_ROOT)
-isEmpty(ANDROID_SDK_ROOT): ANDROID_SDK_ROOT = $$DEFAULT_ANDROID_SDK_ROOT
-
-ANDROID_SDK_BUILD_TOOLS_REVISION = $$(ANDROID_BUILD_TOOLS_REVISION)
-isEmpty(ANDROID_SDK_BUILD_TOOLS_REVISION) {
- SDK_BUILD_TOOLS_REVISIONS = $$files($$ANDROID_SDK_ROOT/build-tools/*)
- for (REVISION, SDK_BUILD_TOOLS_REVISIONS) {
- BASENAME = $$basename(REVISION)
- greaterThan(BASENAME, $$ANDROID_SDK_BUILD_TOOLS_REVISION): ANDROID_SDK_BUILD_TOOLS_REVISION = $$BASENAME
- }
-}
-
-CONFIG += $$ANDROID_PLATFORM
-QMAKE_CFLAGS = -D__ANDROID_API__=$$replace(ANDROID_PLATFORM, "android-", "")
-
-ANDROID_PLATFORM_ROOT_PATH = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/
-
-CROSS_COMPILE = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-
-
-QMAKE_PCH_OUTPUT_EXT = .gch
-
-QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE}
-QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
diff --git a/mkspecs/common/android-base-tail.conf b/mkspecs/common/android-base-tail.conf
deleted file mode 100644
index edc255d08e..0000000000
--- a/mkspecs/common/android-base-tail.conf
+++ /dev/null
@@ -1,90 +0,0 @@
-# In early configure setup; nothing useful to be done here.
-isEmpty(DEFAULT_ANDROID_NDK_ROOT): return()
-
-# -fstack-protector-strong offers good protection against stack smashing attacks.
-# It is (currently) enabled only on Android because we know for sure that Andoroid compilers supports it
-QMAKE_CFLAGS += -fstack-protector-strong -DANDROID
-
-equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
- QMAKE_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove
-else: equals(ANDROID_TARGET_ARCH, armeabi): \
- QMAKE_CFLAGS += -march=armv5te -mtune=xscale -msoft-float -fno-builtin-memmove
-# -fno-builtin-memmove is used to workaround https://code.google.com/p/android/issues/detail?id=81692
-
-QMAKE_CFLAGS_WARN_ON = -Wall -W
-QMAKE_CFLAGS_WARN_OFF =
-equals(ANDROID_TARGET_ARCH, armeabi-v7a) | equals(ANDROID_TARGET_ARCH, armeabi) {
- CONFIG += optimize_size
- QMAKE_CFLAGS_DEBUG = -g -marm -O0
- equals(ANDROID_TARGET_ARCH, armeabi):if(equals(NDK_TOOLCHAIN_VERSION, 4.8)|equals(NDK_TOOLCHAIN_VERSION, 4.9)) {
- DEFINES += QT_OS_ANDROID_GCC_48_WORKAROUND
- } else {
- QMAKE_CFLAGS_RELEASE += -mthumb
- QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -mthumb
- }
-}
-
-QMAKE_CFLAGS_SHLIB = -fPIC
-QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
-QMAKE_CFLAGS_THREAD = -D_REENTRANT
-QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden
-QMAKE_CFLAGS_NEON = -mfpu=neon
-
-QMAKE_CFLAGS_GNUC99 = -std=gnu99
-QMAKE_CFLAGS_GNUC11 = -std=gnu11
-QMAKE_CXXFLAGS_CXX11 = -std=c++11
-QMAKE_CXXFLAGS_CXX14 = -std=c++14
-QMAKE_CXXFLAGS_CXX1Z = -std=c++1z
-QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
-QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++14
-QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z
-
-QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
-QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
-QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
-QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
-QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
-
-# modifications to linux.conf
-QMAKE_AR = $${CROSS_COMPILE}ar cqs
-QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
-QMAKE_NM = $${CROSS_COMPILE}nm -P
-
-QMAKE_STRIP =
-#$${CROSS_COMPILE}strip
-
-QMAKE_RANLIB = $${CROSS_COMPILE}ranlib
-
-QMAKE_INCDIR_POST =
-QMAKE_LIBDIR_POST = $$ANDROID_SOURCES_CXX_STL_LIBDIR
-QMAKE_INCDIR_X11 =
-QMAKE_LIBDIR_X11 =
-QMAKE_INCDIR_OPENGL =
-QMAKE_LIBDIR_OPENGL =
-
-QMAKE_LINK_SHLIB = $$QMAKE_LINK
-QMAKE_LFLAGS = --sysroot=$$ANDROID_PLATFORM_ROOT_PATH
-equals(ANDROID_TARGET_ARCH, x86_64) QMAKE_LFLAGS += -L$$ANDROID_PLATFORM_ROOT_PATH/usr/lib64
-QMAKE_LFLAGS_APP = -Wl,--no-undefined -Wl,-z,noexecstack -shared
-QMAKE_LFLAGS_SHLIB = -Wl,--no-undefined -Wl,-z,noexecstack -shared
-QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
-QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
-QMAKE_LFLAGS_RPATH = -Wl,-rpath=
-QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link=
-
-QMAKE_LIBS_PRIVATE = $$ANDROID_CXX_STL_LIBS -llog -lz -lm -ldl -lc
-QMAKE_LIBS_X11 =
-QMAKE_LIBS_THREAD =
-QMAKE_LIBS_EGL = -lEGL
-QMAKE_LIBS_OPENGL =
-QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
-
-
-!exists($$NDK_ROOT): error("You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.")
-
-load(qt_config)
diff --git a/mkspecs/common/android/qplatformdefs.h b/mkspecs/common/android/qplatformdefs.h
index f75bc4093b..41b7315cef 100644
--- a/mkspecs/common/android/qplatformdefs.h
+++ b/mkspecs/common/android/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Collabora Ltd, author <robin.burchell@collabora.co.uk>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2012 Collabora Ltd, author <robin.burchell@collabora.co.uk>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
@@ -129,11 +93,9 @@
&& !defined(QT_NO_READDIR64)
#define QT_DIRENT struct dirent64
#define QT_READDIR ::readdir64
-#define QT_READDIR_R ::readdir64_r
#else
#define QT_DIRENT struct dirent
#define QT_READDIR ::readdir
-#define QT_READDIR_R ::readdir_r
#endif
#define QT_SOCKET_CONNECT ::connect
@@ -144,11 +106,7 @@
#define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf
diff --git a/mkspecs/common/angle.conf b/mkspecs/common/angle.conf
deleted file mode 100644
index fad0e719d2..0000000000
--- a/mkspecs/common/angle.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-# Renaming these files requires that the LIBRARY entry of their corresponding
-# def files are also updated to reflect the name.
-# The .def files are found in the angle directories:
-#
-# qtbase\src\3rdparty\angle\src\libEGL\libEGL[d?].def
-# qtbase\src\3rdparty\angle\src\libEGL\libGLESv2[d?].def
-#
-# If a combined ANGLE library is used, the def files will automatically be
-# combined into QtANGLE[d?].def by QtAngle.pro.
-
-LIBEGL_NAME = libEGL
-LIBGLESV2_NAME = libGLESv2
-LIBQTANGLE_NAME = QtANGLE
diff --git a/mkspecs/common/bsd/qplatformdefs.h b/mkspecs/common/bsd/qplatformdefs.h
index 8e976d3290..04b801f9fc 100644
--- a/mkspecs/common/bsd/qplatformdefs.h
+++ b/mkspecs/common/bsd/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef Q_BSD_PLATFORMDEFS_H
#define Q_BSD_PLATFORMDEFS_H
diff --git a/mkspecs/common/c89/qplatformdefs.h b/mkspecs/common/c89/qplatformdefs.h
index b931c03847..4c75b3bf77 100644
--- a/mkspecs/common/c89/qplatformdefs.h
+++ b/mkspecs/common/c89/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef Q_C89_QPLATFORMDEFS_H
#define Q_C89_QPLATFORMDEFS_H
diff --git a/mkspecs/common/clang-mac.conf b/mkspecs/common/clang-mac.conf
index cbae2e6262..143406308c 100644
--- a/mkspecs/common/clang-mac.conf
+++ b/mkspecs/common/clang-mac.conf
@@ -5,6 +5,7 @@ QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT}
QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvm.clang.1_0
+QMAKE_LFLAGS_LTCG_SEPARATE_DEBUG_INFO = -Wl,-object_path_lto,${OBJECTS_DIR}/${TARGET}_lto.o
QMAKE_CXXFLAGS += -stdlib=libc++
QMAKE_LFLAGS += -stdlib=libc++
diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf
index 5800aaa5b4..6eb08a9d2f 100644
--- a/mkspecs/common/clang.conf
+++ b/mkspecs/common/clang.conf
@@ -16,10 +16,12 @@ QMAKE_LINK_SHLIB = $$QMAKE_CXX
CONFIG += clang_pch_style
QMAKE_PCH_OUTPUT_EXT = .pch
-QMAKE_CFLAGS_ISYSTEM = -isystem
+QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz
+
QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CFLAGS_USE_PRECOMPILE = -Xclang -include-pch -Xclang ${QMAKE_PCH_OUTPUT}
-QMAKE_CFLAGS_LTCG = -flto
+QMAKE_CFLAGS_LTCG = -flto=thin
+QMAKE_CFLAGS_LTCG_FATOBJECTS = -flto
QMAKE_CFLAGS_DISABLE_LTCG = -fno-lto
QMAKE_CFLAGS_GNUC99 = -std=gnu99
QMAKE_CFLAGS_GNUC11 = -std=gnu11
@@ -27,13 +29,18 @@ QMAKE_CFLAGS_GNUC11 = -std=gnu11
QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
+QMAKE_CXXFLAGS_LTCG_FATOBJECTS = $$QMAKE_CFLAGS_LTCG_FATOBJECTS
QMAKE_CXXFLAGS_DISABLE_LTCG = $$QMAKE_CFLAGS_DISABLE_LTCG
QMAKE_CXXFLAGS_CXX11 = -std=c++11
QMAKE_CXXFLAGS_CXX14 = -std=c++1y
QMAKE_CXXFLAGS_CXX1Z = -std=c++1z
+QMAKE_CXXFLAGS_CXX2A = -std=c++2a
+QMAKE_CXXFLAGS_CXX2B = -std=c++2b
QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y
QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z
+QMAKE_CXXFLAGS_GNUCXX2A = -std=gnu++2a
+QMAKE_CXXFLAGS_GNUCXX2B = -std=gnu++2b
QMAKE_LFLAGS_CXX11 =
QMAKE_LFLAGS_CXX14 =
@@ -44,3 +51,11 @@ QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_AR_LTCG = llvm-ar cqs
QMAKE_NM_LTCG = llvm-nm -P
QMAKE_RANLIB_LTCG = true # No need to run, since llvm-ar has "s"
+
+QMAKE_CFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
+QMAKE_CXXFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
+QMAKE_LFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
+
+QMAKE_CFLAGS_COVERAGE_SOURCE_BASED = -fprofile-instr-generate -fcoverage-mapping
+QMAKE_CXXFLAGS_COVERAGE_SOURCE_BASED = -fprofile-instr-generate -fcoverage-mapping
+QMAKE_LFLAGS_COVERAGE_SOURCE_BASED = -fprofile-instr-generate -fcoverage-mapping
diff --git a/mkspecs/common/g++-base.conf b/mkspecs/common/g++-base.conf
index fa0f0c391d..d392879f66 100644
--- a/mkspecs/common/g++-base.conf
+++ b/mkspecs/common/g++-base.conf
@@ -10,12 +10,12 @@
QMAKE_COMPILER = gcc
-QMAKE_CC = gcc
+QMAKE_CC = $${CROSS_COMPILE}gcc
QMAKE_LINK_C = $$QMAKE_CC
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
-QMAKE_CXX = g++
+QMAKE_CXX = $${CROSS_COMPILE}g++
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
@@ -32,9 +32,13 @@ QMAKE_CFLAGS_GNUC11 = -std=gnu11
QMAKE_CXXFLAGS_CXX11 = -std=c++11
QMAKE_CXXFLAGS_CXX14 = -std=c++1y
QMAKE_CXXFLAGS_CXX1Z = -std=c++1z
+QMAKE_CXXFLAGS_CXX2A = -std=c++2a
+QMAKE_CXXFLAGS_CXX2B = -std=c++2b
QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y
QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z
+QMAKE_CXXFLAGS_GNUCXX2A = -std=gnu++2a
+QMAKE_CXXFLAGS_GNUCXX2B = -std=gnu++2b
QMAKE_LFLAGS_CXX11 =
QMAKE_LFLAGS_CXX14 =
QMAKE_LFLAGS_CXX1Z =
diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
index f0df324b64..67ad1e3b8c 100644
--- a/mkspecs/common/g++-win32.conf
+++ b/mkspecs/common/g++-win32.conf
@@ -31,9 +31,7 @@ QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS_SSE2 += -mstackrealign
-QMAKE_CXXFLAGS_RTTI_ON = -frtti
-QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
+QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions
QMAKE_INCDIR =
@@ -42,7 +40,6 @@ QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
-QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
QMAKE_LFLAGS_RELEASE = -Wl,-s
QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
@@ -50,7 +47,6 @@ QMAKE_LFLAGS_DLL = -shared
QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
equals(QMAKE_HOST.os, Windows) {
QMAKE_LINK_OBJECT_MAX = 10
- QMAKE_LINK_OBJECT_SCRIPT = object_script
}
QMAKE_EXT_OBJ = .o
QMAKE_EXT_RES = _res.o
@@ -67,7 +63,6 @@ QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2 = -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2_DEBUG = -lgdi32 -luser32
QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
-QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
QMAKE_IDL = midl
QMAKE_LIB = $${CROSS_COMPILE}ar -rc
@@ -78,5 +73,4 @@ QMAKE_STRIPFLAGS_LIB += --strip-unneeded
QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
QMAKE_NM = $${CROSS_COMPILE}nm -P
-include(angle.conf)
include(windows-vulkan.conf)
diff --git a/mkspecs/common/gcc-base-unix.conf b/mkspecs/common/gcc-base-unix.conf
index 700f228c36..a456c8f3eb 100644
--- a/mkspecs/common/gcc-base-unix.conf
+++ b/mkspecs/common/gcc-base-unix.conf
@@ -20,7 +20,9 @@ QMAKE_LFLAGS_RPATH = -Wl,-rpath,
QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link,
QMAKE_LFLAGS_NEW_DTAGS = -Wl,--enable-new-dtags
QMAKE_LFLAGS_GDB_INDEX = -Wl,--gdb-index
+QMAKE_LFLAGS_USE_BFD = -fuse-ld=bfd
QMAKE_LFLAGS_USE_GOLD = -fuse-ld=gold
+QMAKE_LFLAGS_USE_LLD = -fuse-ld=lld
# -Bsymbolic-functions (ld) support
QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
index c2669e4833..ae58326289 100644
--- a/mkspecs/common/gcc-base.conf
+++ b/mkspecs/common/gcc-base.conf
@@ -38,15 +38,14 @@ QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os
!equals(QMAKE_HOST.os, Windows): QMAKE_CFLAGS += -pipe
QMAKE_CFLAGS_DEPS += -M
-QMAKE_CFLAGS_WARN_ON += -Wall -W
+QMAKE_CFLAGS_WARN_ON += -Wall -Wextra
QMAKE_CFLAGS_WARN_OFF += -w
QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g
QMAKE_CFLAGS_DEBUG += -g
QMAKE_CFLAGS_SHLIB += $$QMAKE_CFLAGS_PIC
QMAKE_CFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_PIC
-QMAKE_CFLAGS_APP += $$QMAKE_CFLAGS_PIC
-QMAKE_CFLAGS_ISYSTEM = -isystem
+QMAKE_CFLAGS_APP +=
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions
@@ -54,6 +53,7 @@ QMAKE_CFLAGS_SPLIT_SECTIONS += -ffunction-sections -fdata-sections
QMAKE_CFLAGS_LTCG = -flto -fno-fat-lto-objects
QMAKE_CFLAGS_LTCG_FATOBJECTS = -ffat-lto-objects
QMAKE_CFLAGS_DISABLE_LTCG = -fno-lto
+QMAKE_CFLAGS_SHSTK = -mshstk
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
@@ -68,10 +68,13 @@ QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP
QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_EXCEPTIONS_OFF += $$QMAKE_CFLAGS_EXCEPTIONS_OFF
+QMAKE_CXXFLAGS_RTTI_ON = -frtti
+QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
QMAKE_CXXFLAGS_SPLIT_SECTIONS += $$QMAKE_CFLAGS_SPLIT_SECTIONS
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_CXXFLAGS_LTCG_FATOBJECTS = $$QMAKE_CFLAGS_LTCG_FATOBJECTS
QMAKE_CXXFLAGS_DISABLE_LTCG = $$QMAKE_CFLAGS_DISABLE_LTCG
+QMAKE_CXXFLAGS_SHSTK = $$QMAKE_CFLAGS_SHSTK
QMAKE_LFLAGS +=
QMAKE_LFLAGS_DEBUG +=
@@ -83,6 +86,7 @@ QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG -fuse-linker-plugin
QMAKE_CFLAGS_C99 = -std=c99
QMAKE_CFLAGS_C11 = -std=c11
+QMAKE_CFLAGS_C17 = -std=c17
QMAKE_CFLAGS_SSE2 += -msse2
QMAKE_CFLAGS_SSE3 += -msse3
@@ -91,6 +95,7 @@ QMAKE_CFLAGS_SSE4_1 += -msse4.1
QMAKE_CFLAGS_SSE4_2 += -msse4.2
QMAKE_CFLAGS_F16C += -mf16c
QMAKE_CFLAGS_RDRND += -mrdrnd
+QMAKE_CFLAGS_RDSEED += -mrdseed
QMAKE_CFLAGS_AVX += -mavx
QMAKE_CFLAGS_AVX2 += -mavx2
QMAKE_CFLAGS_AVX512F += -mavx512f
@@ -102,8 +107,15 @@ QMAKE_CFLAGS_AVX512BW += -mavx512bw
QMAKE_CFLAGS_AVX512VL += -mavx512vl
QMAKE_CFLAGS_AVX512IFMA += -mavx512ifma
QMAKE_CFLAGS_AVX512VBMI += -mavx512vbmi
+QMAKE_CFLAGS_AVX512VNNI += -mavx512vnni
+QMAKE_CFLAGS_AVX512IFMA += -mavx512ifma
+QMAKE_CFLAGS_AVX512VBMI += -mavx512vbmi
+QMAKE_CFLAGS_AVX512VBMI2 += -mavx512vbmi2
+QMAKE_CFLAGS_AVX512BITALG += -mavx512bitalg
+QMAKE_CFLAGS_AVX512POPCNTDQ += -mavx512vpopcntd
QMAKE_CFLAGS_AESNI += -maes
QMAKE_CFLAGS_SHANI += -msha
+QMAKE_CFLAGS_VAES += -mvaes
QMAKE_CFLAGS_NEON += -mfpu=neon
QMAKE_CFLAGS_MIPS_DSP += -mdsp
QMAKE_CFLAGS_MIPS_DSPR2 += -mdspr2
@@ -116,4 +128,6 @@ QMAKE_AR_LTCG = gcc-ar cqs
QMAKE_NM_LTCG = gcc-nm -P
QMAKE_RANLIB_LTCG = true # No need to run since gcc-ar has "s"
+QMAKE_LINK_OBJECT_SCRIPT = object_script
+
include(sanitize.conf)
diff --git a/mkspecs/common/ghs-base.conf b/mkspecs/common/ghs-base.conf
index a66971578c..3fd4cf70a7 100644
--- a/mkspecs/common/ghs-base.conf
+++ b/mkspecs/common/ghs-base.conf
@@ -8,7 +8,7 @@ QMAKE_COMPILER = ghs
QMAKE_CFLAGS += --signed_fields --no_commons --diag_suppress=1,82,228,236,381,611,961,997,1795,1974
QMAKE_CFLAGS_DEPS += -MD
-QMAKE_CFLAGS_RELEASE += -Ospeed -Olink -Omax
+QMAKE_CFLAGS_RELEASE += -Ospeed -Olink -Omax -no_uvfd
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE -g
QMAKE_CFLAGS_DEBUG += -g -Omaxdebug
QMAKE_CFLAGS_SHLIB +=
@@ -29,12 +29,13 @@ QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP
QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS
+QMAKE_CFLAGS_C99 = -std=c99
QMAKE_CXXFLAGS_CXX11 += --c++11 --thread_local_storage
QMAKE_CXXFLAGS_EXCEPTIONS_ON += --exceptions
QMAKE_LFLAGS += --signed_fields --no_commons --no_implicit_include --link_once_templates -non_shared --new_outside_of_constructor
QMAKE_LFLAGS_DEBUG += -g -Omaxdebug
-QMAKE_LFLAGS_RELEASE += -Ospeed -Olink -Omax
+QMAKE_LFLAGS_RELEASE += -Ospeed -Olink -Omax -no_uvfd
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_LFLAGS_RELEASE -g
QMAKE_LFLAGS_CXX11 += --c++11 --thread_local_storage
QMAKE_LFLAGS_EXCEPTIONS_ON += --exceptions
diff --git a/mkspecs/common/ghs-integrity-armv8.conf b/mkspecs/common/ghs-integrity-armv8.conf
index e454cfd245..ac30b6c7af 100644
--- a/mkspecs/common/ghs-integrity-armv8.conf
+++ b/mkspecs/common/ghs-integrity-armv8.conf
@@ -17,8 +17,16 @@ os_directory = $$(INTEGRITY_DIR)
isEmpty(os_directory): \
error("This qmakespec requires $INTEGRITY_DIR to be set")
-QMAKE_CC = cxintarm64 -bsp $$bsp_name -os_dir $$os_directory -non_shared
-QMAKE_CXX = cxintarm64 -bsp $$bsp_name -os_dir $$os_directory -non_shared
+iy_build_target = $$(INTEGRITY_BUILD_TARGET)
+isEmpty(iy_build_target): \
+ message("This qmakespec requires $INTEGRITY_BUILD_TARGET to be set [dbg|rel|chk|cov] for Integrity versions 11.7.6 and higher")
+
+start_name = $$(INTEGRITY_DIR)/libs/$$(INTEGRITY_BSP)/$$(INTEGRITY_BUILD_TARGET)
+rtos_name= libs/$$(INTEGRITY_BSP)/$$(INTEGRITY_BUILD_TARGET)
+
+QMAKE_CC = cxintarm64 -bsp $$bsp_name -os_dir $$os_directory -non_shared -startfile_dir=$$start_name --rtos_library_directory=$$rtos_name --rtos_library_directory=libs/arm64/$$iy_build_target
+QMAKE_CXX = cxintarm64 -bsp $$bsp_name -os_dir $$os_directory -non_shared -startfile_dir=$$start_name --rtos_library_directory=$$rtos_name --rtos_library_directory=libs/arm64/$$iy_build_target
+
QMAKE_LINK = $$QMAKE_CXX
QMAKE_AR = $$QMAKE_CXX -archive -o
diff --git a/mkspecs/common/icc-base-unix.conf b/mkspecs/common/icc-base-unix.conf
index 54eda984b7..e6cf54eea3 100644
--- a/mkspecs/common/icc-base-unix.conf
+++ b/mkspecs/common/icc-base-unix.conf
@@ -48,10 +48,18 @@ QMAKE_CFLAGS_AVX512PF += -march=knl
QMAKE_CFLAGS_AVX512DQ += -march=skylake-avx512
QMAKE_CFLAGS_AVX512BW += -march=skylake-avx512
QMAKE_CFLAGS_AVX512VL += -march=skylake-avx512
+QMAKE_CFLAGS_AVX512VNNI += -march=cascadelake
+QMAKE_CFLAGS_AVX512IFMA += -march=icelake-client # technically, cannonlake
+QMAKE_CFLAGS_AVX512VBMI += -march=icelake-client # ditto
+QMAKE_CFLAGS_AVX512VBMI2 += -march=icelake-client
+QMAKE_CFLAGS_AVX512BITALG += -march=icelake-client
+QMAKE_CFLAGS_AVX512POPCNTDQ += -march=icelake-client
QMAKE_CFLAGS_AESNI += -maes
QMAKE_CFLAGS_F16C += $$QMAKE_CFLAGS_AVX2
QMAKE_CFLAGS_RDRND += -mrdrnd
+QMAKE_CFLAGS_RDSEED += -mrdseed
QMAKE_CFLAGS_SHANI += -msha
+QMAKE_CFLAGS_VAES += -mvaes
QMAKE_CXX = icpc
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -67,7 +75,7 @@ QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
QMAKE_CXXFLAGS_CXX11 = -std=c++11
QMAKE_CXXFLAGS_CXX14 = -std=c++1y
-QMAKE_CXXFLAGS_CXX1Z = -std=c++1z
+QMAKE_CXXFLAGS_CXX1Z = -std=c++17
QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y
QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z
diff --git a/mkspecs/common/integrity/qplatformdefs.h b/mkspecs/common/integrity/qplatformdefs.h
index f0b4dea8e1..5369899eb8 100644
--- a/mkspecs/common/integrity/qplatformdefs.h
+++ b/mkspecs/common/integrity/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Green Hills Software. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2015 Green Hills Software. All rights reserved.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef Q_INTEGRITY_PLATFORMDEFS_H
#define Q_INTEGRITY_PLATFORMDEFS_H
diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
index b77494ec9b..61bea952b2 100644
--- a/mkspecs/common/mac.conf
+++ b/mkspecs/common/mac.conf
@@ -14,7 +14,6 @@ include(unix.conf)
QMAKE_RESOURCE = /Developer/Tools/Rez
QMAKE_EXTENSION_SHLIB = dylib
-QMAKE_EXTENSIONS_AUX_SHLIB = tbd
QMAKE_LIBDIR =
# sdk.prf will prefix the proper SDK sysroot
diff --git a/mkspecs/common/mac/qplatformdefs.h b/mkspecs/common/mac/qplatformdefs.h
index 1927587097..f394941305 100644
--- a/mkspecs/common/mac/qplatformdefs.h
+++ b/mkspecs/common/mac/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf
index 889027ada5..71295a4055 100644
--- a/mkspecs/common/macx.conf
+++ b/mkspecs/common/macx.conf
@@ -5,17 +5,14 @@
QMAKE_PLATFORM += macos osx macx
QMAKE_MAC_SDK = macosx
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
-QMAKE_APPLE_DEVICE_ARCHS = x86_64
-QT_MAC_SDK_VERSION_MIN = 10.13
-QT_MAC_SDK_VERSION_MAX = 10.14
-
device.sdk = macosx
device.target = device
device.dir_affix = $${device.sdk}
device.CONFIG = $${device.sdk}
device.deployment_identifier = $${device.sdk}
+CONFIG += only_active_arch
+
QMAKE_LIBS_VULKAN =
include(mac.conf)
diff --git a/mkspecs/common/msvc-based-version.conf b/mkspecs/common/msvc-based-version.conf
index 38aecbaf59..adc893836a 100644
--- a/mkspecs/common/msvc-based-version.conf
+++ b/mkspecs/common/msvc-based-version.conf
@@ -21,6 +21,7 @@ greaterThan(QMAKE_MSC_FULL_VER, 190023918):!intel_icl {
greaterThan(QMAKE_MSC_VER, 1909) {
# Visual Studio 2017 (15.0) / Visual C++ 19.10 and up
MSVC_VER = 15.0
+ MSVC_TOOLSET_VER = 141
COMPAT_MKSPEC = win32-msvc2017
}
@@ -29,4 +30,16 @@ greaterThan(QMAKE_MSC_VER, 1910) {
COMPAT_MKSPEC =
}
+greaterThan(QMAKE_MSC_VER, 1919) {
+ # Visual Studio 2019 (16.0) / Visual C++ 19.20 and up
+ MSVC_VER = 16.0
+ MSVC_TOOLSET_VER = 142
+}
+
+greaterThan(QMAKE_MSC_VER, 1929) {
+ # Visual Studio 2022 (17.0) / Visual C++ 19.30 and up
+ MSVC_VER = 17.0
+ MSVC_TOOLSET_VER = 143
+}
+
!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf
index c0d4bd2acc..68980ff5cf 100644
--- a/mkspecs/common/msvc-desktop.conf
+++ b/mkspecs/common/msvc-desktop.conf
@@ -19,6 +19,7 @@ CONFIG += flat debug_and_release debug_and_release_target precom
# MSVC 2017 15.8+ fixed std::aligned_storage but compilation fails without
# _ENABLE_EXTENDED_ALIGNED_STORAGE flag since the fix breaks binary compatibility.
DEFINES += UNICODE _UNICODE WIN32 _ENABLE_EXTENDED_ALIGNED_STORAGE
+DEFINES_RELEASE += NDEBUG
QMAKE_COMPILER_DEFINES += _WIN32
contains(QMAKE_TARGET.arch, x86_64) {
DEFINES += WIN64
@@ -84,8 +85,8 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_LINK = link
QMAKE_LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF /INCREMENTAL:NO
+QMAKE_LFLAGS_RELEASE = /OPT:REF /OPT:ICF /INCREMENTAL:NO
+QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = $$QMAKE_LFLAGS_RELEASE /DEBUG
QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
@@ -104,7 +105,6 @@ QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib
QMAKE_LIBS_OPENGL_ES2 = gdi32.lib user32.lib
QMAKE_LIBS_OPENGL_ES2_DEBUG = gdi32.lib user32.lib
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
-QMAKE_LIBS_QT_ENTRY = -lqtmain
QMAKE_IDL = midl
QMAKE_LIB = lib /NOLOGO
@@ -114,5 +114,5 @@ VCPROJ_EXTENSION = .vcproj
VCSOLUTION_EXTENSION = .sln
VCPROJ_KEYWORD = Qt4VSv1.0
-include(angle.conf)
+include(windows-desktop.conf)
include(windows-vulkan.conf)
diff --git a/mkspecs/common/msvc-version.conf b/mkspecs/common/msvc-version.conf
index 06af6abf13..303b341e9d 100644
--- a/mkspecs/common/msvc-version.conf
+++ b/mkspecs/common/msvc-version.conf
@@ -1,6 +1,6 @@
#
# qmake configuration for Microsoft Visual Studio C/C++ Compiler
-# This file is used by win32-msvc and all winrt-XXX-msvcXXX specs
+# This file is used by win32-msvc
#
#
@@ -15,6 +15,7 @@ COMPAT_MKSPEC = win32-msvc2005
greaterThan(QMAKE_MSC_VER, 1499) {
# Visual Studio 2008 (9.0) / Visual C++ 15.0 and up
MSVC_VER = 9.0
+ MSVC_TOOLSET_VER = 90
COMPAT_MKSPEC = win32-msvc2008
QMAKE_CFLAGS_MP = -MP
QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
@@ -23,6 +24,7 @@ greaterThan(QMAKE_MSC_VER, 1499) {
greaterThan(QMAKE_MSC_VER, 1599) {
# Visual Studio 2010 (10.0) / Visual C++ 16.0 and up
MSVC_VER = 10.0
+ MSVC_TOOLSET_VER = 100
COMPAT_MKSPEC = win32-msvc2010
MAKEFILE_GENERATOR = MSBUILD
@@ -35,6 +37,7 @@ greaterThan(QMAKE_MSC_VER, 1599) {
greaterThan(QMAKE_MSC_VER, 1699) {
# Visual Studio 2012 (11.0) / Visual C++ 17.0 and up
MSVC_VER = 11.0
+ MSVC_TOOLSET_VER = 110
COMPAT_MKSPEC = win32-msvc2012
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = /wd4530 /wd4577
QT_CONFIG += c++11
@@ -44,12 +47,14 @@ greaterThan(QMAKE_MSC_VER, 1699) {
greaterThan(QMAKE_MSC_VER, 1799) {
# Visual Studio 2013 (12.0) / Visual C++ 18.0 and up
MSVC_VER = 12.0
+ MSVC_TOOLSET_VER = 120
COMPAT_MKSPEC = win32-msvc2013
QMAKE_CFLAGS += -FS
QMAKE_CXXFLAGS += -FS -Zc:rvalueCast -Zc:inline
QMAKE_CFLAGS_F16C = -arch:AVX
QMAKE_CFLAGS_RDRND =
+ QMAKE_CFLAGS_RDSEED =
equals(QMAKE_MSC_VER, 1800) {
QMAKE_CFLAGS_RELEASE += -Zc:strictStrings
@@ -62,6 +67,7 @@ greaterThan(QMAKE_MSC_VER, 1799) {
greaterThan(QMAKE_MSC_VER, 1899) {
# Visual Studio 2015 (14.0) / Visual C++ 19.0 and up
MSVC_VER = 14.0
+ MSVC_TOOLSET_VER = 140
COMPAT_MKSPEC = win32-msvc2015
QMAKE_CFLAGS += -Zc:strictStrings
QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458
@@ -76,8 +82,9 @@ greaterThan(QMAKE_MSC_VER, 1899) {
greaterThan(QMAKE_MSC_VER, 1909) {
# Visual Studio 2017 (15.0) / Visual C++ 19.10 and up
MSVC_VER = 15.0
+ MSVC_TOOLSET_VER = 141
COMPAT_MKSPEC = win32-msvc2017
- QMAKE_CXXFLAGS += -Zc:referenceBinding
+ QMAKE_CXXFLAGS += -permissive-
# Only Visual Studio 2017 version 15.3 / Visual C++ 19.11 & up have support
# for AVX-512. We enable the switches anyway and let configure check if they
@@ -92,11 +99,6 @@ greaterThan(QMAKE_MSC_VER, 1909) {
QMAKE_CFLAGS_AVX512IFMA = -arch:AVX512
QMAKE_CFLAGS_AVX512VBMI = -arch:AVX512
- # For now permissive fails as soon as UWP API comes into play. In qtbase this
- # API is used in direct2d, but also in multimedia, positioning and sensors.
- # We can try again with a later version of Visual Studio.
- # QMAKE_CXXFLAGS_STRICTCXX = -permissive-
-
# MSVC partially supports the following, but '__cplusplus' definition is set
# as for C++98 until MSVC fully conforms with C++14, see
# https://developercommunity.visualstudio.com/content/problem/139261/msvc-incorrectly-defines-cplusplus.html
@@ -116,6 +118,32 @@ greaterThan(QMAKE_MSC_VER, 1910) {
greaterThan(QMAKE_MSC_VER, 1919) {
# Visual Studio 2019 (16.0) / Visual C++ 19.20 and up
MSVC_VER = 16.0
+ MSVC_TOOLSET_VER = 142
+ QMAKE_CXXFLAGS_CXX2A = -std:c++latest
+ QMAKE_CXXFLAGS_CXX2B = -std:c++latest
+
+ QMAKE_CXXFLAGS += -Zc:externConstexpr
+}
+
+greaterThan(QMAKE_MSC_VER, 1927) {
+ # Visual Studio 2019 (16.8 or 16.9) / Visual C++ 19.28 and up
+ MSVC_VER = 16.8
+ QMAKE_CFLAGS_C11 = /std:c11
+ QMAKE_CFLAGS_C17 = /std:c17
+}
+
+greaterThan(QMAKE_MSC_VER, 1928) {
+ # Visual Studio 2019 (16.10 or 16.11) / Visual C++ 19.29 and up
+ MSVC_VER = 16.10
+
+ # -std:c++20 compiler option for Visual Studio 2019 16.11.0 and up
+ greaterThan(QMAKE_MSC_FULL_VER, 192930132): QMAKE_CXXFLAGS_CXX2A = -std:c++20
+}
+
+greaterThan(QMAKE_MSC_VER, 1929) {
+ # Visual Studio 2022 (17.0) / Visual C++ 19.30 and up
+ MSVC_VER = 17.0
+ MSVC_TOOLSET_VER = 143
}
!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC
diff --git a/mkspecs/common/nacl/g++-nacl32.conf b/mkspecs/common/nacl/g++-nacl32.conf
deleted file mode 100644
index 319d3ca475..0000000000
--- a/mkspecs/common/nacl/g++-nacl32.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-
-# 32-bit x86 nacl configuration.
-
-QMAKE_CC = i686-nacl-gcc
-QMAKE_CXX = i686-nacl-g++
-QMAKE_LINK = i686-nacl-g++
-QMAKE_LINK_SHLIB = i686-nacl-g++
-QMAKE_AR = i686-nacl-ar q
-QMAKE_OBJCOPY = i686-nacl-objcopy
-QMAKE_NM = i686-nacl-nm -P
-QMAKE_STRIP = i686-nacl-strip
-
diff --git a/mkspecs/common/nacl/g++-nacl64.conf b/mkspecs/common/nacl/g++-nacl64.conf
deleted file mode 100644
index 8a20535775..0000000000
--- a/mkspecs/common/nacl/g++-nacl64.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-
-# 32-bit x86 nacl configuration.
-
-QMAKE_CC = x86_64-nacl-gcc
-QMAKE_CXX = x86_64-nacl-g++
-QMAKE_LINK = x86_64-nacl-g++
-QMAKE_LINK_SHLIB = x86_64-nacl-g++
-QMAKE_AR = x86_64-nacl-ar q
-QMAKE_OBJCOPY = x86_64-nacl-objcopy
-QMAKE_NM = x86_64-nacl-nm -P
-QMAKE_STRIP = x86_64-nacl-strip
-
diff --git a/mkspecs/common/nacl/nacl-base.conf b/mkspecs/common/nacl/nacl-base.conf
deleted file mode 100644
index d94c5c96d7..0000000000
--- a/mkspecs/common/nacl/nacl-base.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-QMAKE_PLATFORM = nacl $$QMAKE_PLATFORM
-
-# Work around linker crash when using PIC. We are building
-# statically so this is safe.
-QMAKE_CFLAGS_STATIC_LIB -= -fPIC
-QMAKE_CFLAGS_SHLIB -= -fPIC
-QMAKE_CXXFLAGS_STATIC_LIB -= -fPIC
-QMAKE_CXXFLAGS_SHLIB -= -fPIC
-
-QMAKE_LIBS_DYNLOAD -= -ldl
-QMAKE_LIBS_OPENGL_ES2 = -lppapi_gles2
diff --git a/mkspecs/common/nacl/qplatformdefs.h b/mkspecs/common/nacl/qplatformdefs.h
deleted file mode 100644
index 2b9c7227ef..0000000000
--- a/mkspecs/common/nacl/qplatformdefs.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#define _POSIX_TIMERS
-
-#include "qglobal.h"
-
-// extra disabling.
-#ifdef __native_client__
-#define QT_NO_FSFILEENGINE
-#endif
-
-#define QT_NO_SOCKET_H
-
-#define DIR void *
-#define PATH_MAX 256
-
-#include "qfunctions_nacl.h"
-#include <pthread.h>
diff --git a/mkspecs/common/posix/qplatformdefs.h b/mkspecs/common/posix/qplatformdefs.h
index 3ebc523338..e7ce7a568d 100644
--- a/mkspecs/common/posix/qplatformdefs.h
+++ b/mkspecs/common/posix/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef Q_POSIX_QPLATFORMDEFS_H
#define Q_POSIX_QPLATFORMDEFS_H
@@ -144,11 +108,9 @@
&& !defined(QT_NO_READDIR64)
#define QT_DIRENT struct dirent64
#define QT_READDIR ::readdir64
-#define QT_READDIR_R ::readdir64_r
#else
#define QT_DIRENT struct dirent
#define QT_READDIR ::readdir
-#define QT_READDIR_R ::readdir_r
#endif
#define QT_SOCKLEN_T socklen_t
diff --git a/mkspecs/common/qcc-base-qnx-aarch64le.conf b/mkspecs/common/qcc-base-qnx-aarch64le.conf
index 914ef33f37..92eff22954 100644
--- a/mkspecs/common/qcc-base-qnx-aarch64le.conf
+++ b/mkspecs/common/qcc-base-qnx-aarch64le.conf
@@ -8,7 +8,7 @@ include(g++-unix.conf)
include(unix.conf)
QMAKE_CC = qcc -Vgcc_ntoaarch64le
-QMAKE_CXX = qcc -Vgcc_ntoaarch64le
+QMAKE_CXX = q++ -Vgcc_ntoaarch64le
QNX_CPUDIR = aarch64le
include(qcc-base-qnx.conf)
diff --git a/mkspecs/common/qcc-base-qnx-armle-v7.conf b/mkspecs/common/qcc-base-qnx-armle-v7.conf
index ad3bb33da4..25b8bbc808 100644
--- a/mkspecs/common/qcc-base-qnx-armle-v7.conf
+++ b/mkspecs/common/qcc-base-qnx-armle-v7.conf
@@ -9,7 +9,7 @@ include(unix.conf)
include(g++-unix.conf)
QMAKE_CC = qcc -Vgcc_ntoarmv7le
-QMAKE_CXX = qcc -Vgcc_ntoarmv7le
+QMAKE_CXX = q++ -Vgcc_ntoarmv7le
QNX_CPUDIR = armle-v7
QMAKE_CFLAGS += -mfpu=neon
diff --git a/mkspecs/common/qcc-base-qnx-x86-64.conf b/mkspecs/common/qcc-base-qnx-x86-64.conf
index fd04104f71..8e77b5b660 100644
--- a/mkspecs/common/qcc-base-qnx-x86-64.conf
+++ b/mkspecs/common/qcc-base-qnx-x86-64.conf
@@ -8,7 +8,7 @@ include(g++-unix.conf)
include(unix.conf)
QMAKE_CC = qcc -Vgcc_ntox86_64
-QMAKE_CXX = qcc -Vgcc_ntox86_64
+QMAKE_CXX = q++ -Vgcc_ntox86_64
QNX_CPUDIR = x86_64
include(qcc-base-qnx.conf)
diff --git a/mkspecs/common/qcc-base-qnx-x86.conf b/mkspecs/common/qcc-base-qnx-x86.conf
index 37a5d9ce70..23bc84c3c8 100644
--- a/mkspecs/common/qcc-base-qnx-x86.conf
+++ b/mkspecs/common/qcc-base-qnx-x86.conf
@@ -9,7 +9,7 @@ include(unix.conf)
include(g++-unix.conf)
QMAKE_CC = qcc -Vgcc_ntox86
-QMAKE_CXX = qcc -Vgcc_ntox86
+QMAKE_CXX = q++ -Vgcc_ntox86
QNX_CPUDIR = x86
include(qcc-base-qnx.conf)
diff --git a/mkspecs/common/qcc-base-qnx.conf b/mkspecs/common/qcc-base-qnx.conf
index 21ce269006..dce6d8ea2c 100644
--- a/mkspecs/common/qcc-base-qnx.conf
+++ b/mkspecs/common/qcc-base-qnx.conf
@@ -4,6 +4,8 @@
include(qcc-base.conf)
+isEmpty(QMAKE_WAYLAND_SCANNER): QMAKE_WAYLAND_SCANNER = $$(QNX_HOST)/usr/bin/wayland-scanner
+
QMAKE_PLATFORM = qnx $$QMAKE_PLATFORM
QMAKE_LFLAGS_SHLIB += -shared
@@ -44,7 +46,7 @@ QMAKE_RPATHLINKDIR_POST += $${QNX_DIR}/$${QNX_CPUDIR}/lib $${QNX_DIR}/$${QNX_CPU
QMAKE_CXXFLAGS_CXX11 =
QMAKE_CXXFLAGS_CXX14 =
-QMAKE_CXXFLAGS_CXX1Z =
+QMAKE_CXXFLAGS_CXX1Z = -Wc,-std=gnu++1z
QMAKE_CXXFLAGS_GNUCXX11 = -Wc,-std=gnu++11
QMAKE_CXXFLAGS_GNUCXX14 = -Wc,-std=gnu++1y
diff --git a/mkspecs/common/qcc-base.conf b/mkspecs/common/qcc-base.conf
index 24ee29b6b8..b13e3b55bd 100644
--- a/mkspecs/common/qcc-base.conf
+++ b/mkspecs/common/qcc-base.conf
@@ -38,7 +38,6 @@ QMAKE_CFLAGS_SHANI += -msha
QMAKE_CFLAGS_STACK_PROTECTOR_STRONG = -fstack-protector-strong
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -lang-c++
QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
@@ -56,4 +55,3 @@ QMAKE_CFLAGS_USE_PRECOMPILE = -Wc,-include -Wc,${QMAKE_PCH_OUTPUT_BASE}
QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
-QMAKE_LFLAGS += -lang-c++
diff --git a/mkspecs/common/qnx/qplatformdefs.h b/mkspecs/common/qnx/qplatformdefs.h
index b30cd96002..285301b157 100644
--- a/mkspecs/common/qnx/qplatformdefs.h
+++ b/mkspecs/common/qnx/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2014 BlackBerry Limited. All rights reserved.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef Q_QNX_PLATFORMDEFS_H
#define Q_QNX_PLATFORMDEFS_H
@@ -82,11 +46,6 @@
#define QT_NO_READDIR64
#endif
#include "../posix/qplatformdefs.h"
-#if defined(__EXT_QNX__READDIR64_R)
-#define QT_EXT_QNX_READDIR_R ::_readdir64_r
-#elif defined(__EXT_QNX__READDIR_R)
-#define QT_EXT_QNX_READDIR_R ::_readdir_r
-#endif
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
@@ -99,6 +58,4 @@ inline int getpagesize()
#include <stdlib.h>
-#define QT_QWS_TEMP_DIR QString::fromLatin1(qgetenv("TMP"))
-
#endif // Q_QNX_PLATFORMDEFS_H
diff --git a/mkspecs/common/rtems-base.conf b/mkspecs/common/rtems-base.conf
new file mode 100644
index 0000000000..0a015c3173
--- /dev/null
+++ b/mkspecs/common/rtems-base.conf
@@ -0,0 +1,73 @@
+#
+# Base qmake configuration for GCC on RTEMS
+#
+#
+#
+MAKEFILE_GENERATOR = UNIX
+
+QMAKE_PLATFORM = rtems
+
+include(unix.conf)
+include(gcc-base-unix.conf)
+include(g++-unix.conf)
+
+rtems_bsp = $$(RTEMS_BSP)
+isEmpty(rtems_bsp) {
+ error("This qmakespec requires $RTEMS_BSP to be set")
+}
+
+rtems_compiler = $$(RTEMS_COMPILER)
+isEmpty(rtems_compiler) {
+ error("This qmakespec requires $RTEMS_COMPILER to be set")
+}
+
+isEmpty(RTEMS_CPU_FLAGS) {
+ error("The qmakespec is expected to set \$\$RTEMS_CPU_FLAGS")
+}
+
+RTEMS_FLAGS = \
+ -B$$rtems_bsp \
+ -specs bsp_specs \
+ -qrtems \
+ $$RTEMS_CPU_FLAGS
+
+QMAKE_CFLAGS_OPTIMIZE_FULL = $$QMAKE_CFLAGS_OPTIMIZE
+QMAKE_CFLAGS_OPTIMIZE_DEBUG = -O0 -g
+
+QMAKE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_OPTIMIZE_DEBUG
+QMAKE_CFLAGS_WARN_ON = -Wall
+QMAKE_CFLAGS_PIC =
+QMAKE_CFLAGS_SHLIB =
+QMAKE_CFLAGS_STATIC_LIB =
+QMAKE_CFLAGS_APP =
+QMAKE_CFLAGS += $$RTEMS_FLAGS
+
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_SHLIB =
+QMAKE_CXXFLAGS_STATIC_LIB =
+QMAKE_CXXFLAGS_APP =
+QMAKE_CXXFLAGS += $$RTEMS_FLAGS
+
+QMAKE_CXXFLAGS_CXX11 =
+QMAKE_CXXFLAGS_CXX14 =
+QMAKE_CXXFLAGS_CXX1Z =
+
+QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
+QMAKE_LFLAGS += $$RTEMS_FLAGS $$QMAKE_LFLAGS_GCSECTIONS
+
+QMAKE_CC = $${rtems_compiler}-gcc
+QMAKE_CXX = $${rtems_compiler}-g++
+QMAKE_AR = $${rtems_compiler}-ar cqs
+QMAKE_OBJCOPY = $${rtems_compiler}-objcopy
+QMAKE_NM = $${rtems_compiler}-nm -P
+QMAKE_RANLIB = $${rtems_compiler}-ranlib
+QMAKE_STRIP = $${rtems_compiler}-strip
+
+QMAKE_LINK_C = $$QMAKE_CC
+QMAKE_LINK_C_SHLIB =
+
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB =
+
+load(qt_config)
diff --git a/mkspecs/common/rtems/qplatformdefs.h b/mkspecs/common/rtems/qplatformdefs.h
new file mode 100644
index 0000000000..83b52b3079
--- /dev/null
+++ b/mkspecs/common/rtems/qplatformdefs.h
@@ -0,0 +1,36 @@
+// Copyright (C) 2018 The Qt Company. All rights reserved.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef Q_RTEMS_PLATFORMDEFS_H
+#define Q_RTEMS_PLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/select.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+
+#include <pwd.h>
+#include <grp.h>
+
+#define __LINUX_ERRNO_EXTENSIONS__
+#include <errno.h>
+
+#include "../posix/qplatformdefs.h"
+
+#ifdef __STRICT_ANSI__
+#undef __STRICT_ANSI__
+#endif
+
+#undef QT_OPEN_LARGEFILE
+#define QT_OPEN_LARGEFILE 0
+
+#endif // Q_RTEMS_PLATFORMDEFS_H
diff --git a/mkspecs/common/sanitize.conf b/mkspecs/common/sanitize.conf
index 5e09406cfb..409bd99061 100644
--- a/mkspecs/common/sanitize.conf
+++ b/mkspecs/common/sanitize.conf
@@ -17,7 +17,11 @@ QMAKE_SANITIZE_MEMORY_CFLAGS = -fsanitize=memory
QMAKE_SANITIZE_MEMORY_CXXFLAGS = -fsanitize=memory
QMAKE_SANITIZE_MEMORY_LFLAGS = -fsanitize=memory
-QMAKE_SANITIZE_UNDEFINED_CFLAGS = -fsanitize=undefined
-QMAKE_SANITIZE_UNDEFINED_CXXFLAGS = -fsanitize=undefined
-QMAKE_SANITIZE_UNDEFINED_LFLAGS = -fsanitize=undefined
+QMAKE_SANITIZE_FUZZERNL_CFLAGS = -fsanitize=fuzzer-no-link
+QMAKE_SANITIZE_FUZZERNL_CXXFLAGS = -fsanitize=fuzzer-no-link
+QMAKE_SANITIZE_FUZZERNL_LFLAGS = -fsanitize=fuzzer-no-link
+
+QMAKE_SANITIZE_UNDEFINED_CFLAGS = -fsanitize=undefined -fsanitize=float-divide-by-zero
+QMAKE_SANITIZE_UNDEFINED_CXXFLAGS = -fsanitize=undefined -fsanitize=float-divide-by-zero
+QMAKE_SANITIZE_UNDEFINED_LFLAGS = -fsanitize=undefined -fsanitize=float-divide-by-zero
diff --git a/mkspecs/common/solaris.conf b/mkspecs/common/solaris.conf
index 024b75a9d9..d21766283b 100644
--- a/mkspecs/common/solaris.conf
+++ b/mkspecs/common/solaris.conf
@@ -6,6 +6,7 @@ QMAKE_PLATFORM += solaris
include(unix.conf)
+QMAKE_CFLAGS_PIC = -fPIC
QMAKE_CFLAGS_THREAD = -D_REENTRANT
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
QMAKE_LFLAGS_GCSECTIONS = -Wl,-z,ignore
diff --git a/mkspecs/common/uikit.conf b/mkspecs/common/uikit.conf
index 0388b8e616..8419506f09 100644
--- a/mkspecs/common/uikit.conf
+++ b/mkspecs/common/uikit.conf
@@ -3,7 +3,7 @@
#
QMAKE_PLATFORM += uikit
-CONFIG += bitcode reduce_exports shallow_bundle no_qt_rpath
+CONFIG += reduce_exports shallow_bundle no_qt_rpath
INCLUDEPATH += $$PWD/uikit
diff --git a/mkspecs/common/uikit/GLES2/gl2.h b/mkspecs/common/uikit/GLES2/gl2.h
index 0974509a35..1ca3921692 100644
--- a/mkspecs/common/uikit/GLES2/gl2.h
+++ b/mkspecs/common/uikit/GLES2/gl2.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
diff --git a/mkspecs/common/uikit/clang.conf b/mkspecs/common/uikit/clang.conf
index 6b9b7eea8e..f828f8b6f8 100644
--- a/mkspecs/common/uikit/clang.conf
+++ b/mkspecs/common/uikit/clang.conf
@@ -1,7 +1,3 @@
#
# compiler settings for iOS/tvOS/watchOS clang compilers
#
-
-# Based on the following information, http://clang.llvm.org/doxygen/ObjCRuntime_8h_source.html,
-# we can conclude that it's safe to always pass the following flags
-QMAKE_OBJECTIVE_CFLAGS += -fobjc-nonfragile-abi -fobjc-legacy-dispatch
diff --git a/mkspecs/common/vxworks/qplatformdefs.h b/mkspecs/common/vxworks/qplatformdefs.h
new file mode 100644
index 0000000000..28f4e8b436
--- /dev/null
+++ b/mkspecs/common/vxworks/qplatformdefs.h
@@ -0,0 +1,52 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef Q_VXWORKS_PLATFORMDEFS_H
+#define Q_VXWORKS_PLATFORMDEFS_H
+
+#include "qglobal.h"
+
+#include <unistd.h>
+#include <fcntl.h>
+
+#include <sys/time.h>
+#include <dirent.h>
+#include <pthread.h>
+
+// from VxWorks 7 <system.h>
+#ifndef S_ISSOCK
+# ifdef S_IFSOCK
+# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+# else
+# define S_ISSOCK(m) 0
+# endif
+#endif
+
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+
+#define O_LARGEFILE 0
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+
+#define QT_MMAP ::mmap
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+#define S_ISVTX 01000
+
+/*
+ * vxworks introduces some defines that replace READ with 0 and WRITE with 1
+ * this causes issues with moc and Q_PROPERTY
+ */
+#undef READ
+#undef WRITE
+
+/* vxworks exposes these definitions only when _POSIX_C_SOURCE >=200809L but we don't want to set this, as it hides other API */
+#ifndef UTIME_NOW
+# define UTIME_NOW ((1l << 30) - 1l)
+# define UTIME_OMIT ((1l << 30) - 2l)
+#endif
+
+#endif /* Q_VXWORKS_PLATFORMDEFS_H */
diff --git a/mkspecs/android-g++/qplatformdefs.h b/mkspecs/common/wasm/qplatformdefs.h
index 0b92709dd5..99087a2044 100644
--- a/mkspecs/android-g++/qplatformdefs.h
+++ b/mkspecs/common/wasm/qplatformdefs.h
@@ -1,44 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef Q_WASM_PLATFORMDEFS_H
+#define Q_WASM_PLATFORMDEFS_H
// Get Qt defines/settings
@@ -71,6 +35,10 @@
#include <sys/stat.h>
#include <sys/wait.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
@@ -152,11 +120,9 @@
&& !defined(QT_NO_READDIR64)
#define QT_DIRENT struct dirent64
#define QT_READDIR ::readdir64
-#define QT_READDIR_R ::readdir64_r
#else
#define QT_DIRENT struct dirent
#define QT_READDIR ::readdir
-#define QT_READDIR_R ::readdir_r
#endif
#define QT_SOCKET_CONNECT ::connect
@@ -174,4 +140,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-#endif // QPLATFORMDEFS_H
+#endif // Q_WASM_PLATFORMDEFS_H
diff --git a/mkspecs/common/wasm/wasm.conf b/mkspecs/common/wasm/wasm.conf
new file mode 100644
index 0000000000..2a5ea23145
--- /dev/null
+++ b/mkspecs/common/wasm/wasm.conf
@@ -0,0 +1,86 @@
+# qmake configuration for building with emscripten
+MAKEFILE_GENERATOR = UNIX
+QMAKE_PLATFORM = wasm unix
+
+include(../gcc-base.conf)
+include(../clang.conf)
+
+load(device_config)
+load(emcc_ver)
+
+# Support enabling asyncify by configuring with "-device-option QT_EMSCRIPTEN_ASYNCIFY=1"
+!isEmpty(QT_EMSCRIPTEN_ASYNCIFY): {
+ !equals(QT_EMSCRIPTEN_ASYNCIFY, 1):!equals(QT_EMSCRIPTEN_ASYNCIFY, 0): \
+ message(Error: The value for QT_EMSCRIPTEN_ASYNCIFY must be 0 or 1)
+ equals(QT_EMSCRIPTEN_ASYNCIFY, 1): {
+ QMAKE_CFLAGS += -DQT_HAVE_EMSCRIPTEN_ASYNCIFY
+ QMAKE_CXXFLAGS += -DQT_HAVE_EMSCRIPTEN_ASYNCIFY
+ QMAKE_LFLAGS += -s ASYNCIFY
+
+ # Emscripten recommends building with optimizations when using asyncify
+ # in order to reduce wasm file size, and may also generate broken wasm
+ # (with "wasm validation error: too many locals" type errors) if optimizations
+ # are omitted. Enable optimizations also for debug builds.
+ QMAKE_LFLAGS_DEBUG += -Os
+ }
+}
+
+# Declare async functions
+QMAKE_LFLAGS += -s ASYNCIFY_IMPORTS=qt_asyncify_suspend_js,qt_asyncify_resume_js
+
+EMCC_COMMON_LFLAGS += \
+ -s WASM=1 \
+ -s MAX_WEBGL_VERSION=2 \
+ -s ERROR_ON_UNDEFINED_SYMBOLS=1 \
+ --bind \
+ -s FETCH=1 \
+ -s MODULARIZE=1 \
+ -s WASM_BIGINT=1 \
+ -s STACK_SIZE=5MB
+
+# The -s arguments can also be used with release builds,
+# but are here in debug for clarity.
+EMCC_COMMON_LFLAGS_DEBUG = \
+ $$EMCC_COMMON_LFLAGS \
+ -s DEMANGLE_SUPPORT=1 \
+ # -s LIBRARY_DEBUG=1 \ #print out library calls, verbose
+ # -s SYSCALL_DEBUG=1 \ #print out sys calls, verbose
+ # -s FS_LOG=1 \ #print out filesystem ops, verbose
+ # -s SOCKET_DEBUG \ #print out socket,network data transfer
+ # -s GL_DEBUG=1 \
+ --profiling-funcs
+
+QMAKE_LFLAGS_DEBUG += -g2
+QMAKE_LFLAGS_RELEASE += -O2
+
+QMAKE_COMPILER += emscripten
+
+QMAKE_CC = emcc
+QMAKE_CXX = em++
+
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+QMAKE_LINK_C = $$QMAKE_CC
+QMAKE_LINK_C_SHLIB = $$QMAKE_CC
+
+QMAKE_LIBS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_LFLAGS += $$EMCC_COMMON_LFLAGS
+QMAKE_LFLAGS_DEBUG += $$EMCC_COMMON_LFLAGS_DEBUG
+
+QMAKE_PREFIX_SHLIB = lib
+QMAKE_EXTENSION_SHLIB = so # llvm bitcode, linked to js in post_link
+QMAKE_PREFIX_STATICLIB = lib
+QMAKE_EXTENSION_STATICLIB = a # llvm bitcode
+
+QMAKE_AR = emar cqs
+equals(QMAKE_HOST.os, Windows) {
+ QMAKE_RESPONSEFILE_THRESHOLD = 1
+ QMAKE_AR_CMD = \
+ "$(file >$(OBJECTS_DIR)/$(TARGET).rsp, $(subst \\,/,$(OBJECTS)))$$escape_expand(\\n\\t)" \
+ "$(AR) $(DESTDIR)$(TARGET) @$(OBJECTS_DIR)/$(TARGET).rsp"
+}
+
+QMAKE_DISTCLEAN += *.html *.js *.wasm
+
+load(qt_config)
diff --git a/mkspecs/common/windows-desktop.conf b/mkspecs/common/windows-desktop.conf
new file mode 100644
index 0000000000..c1f2955e1b
--- /dev/null
+++ b/mkspecs/common/windows-desktop.conf
@@ -0,0 +1,5 @@
+# This file contains initializations for Windows Desktop platforms (non-UWP)
+
+WINDOWS_TARGET_PLATFORM_VERSION = $$(WindowsSDKVersion)
+# The version number might have a trailing backslash due to a VS bug.
+WINDOWS_TARGET_PLATFORM_VERSION ~= s/\\\\$//
diff --git a/mkspecs/common/winrt_winphone/assets/logo_150x150.png b/mkspecs/common/winrt_winphone/assets/logo_150x150.png
deleted file mode 100644
index 069171ca4d..0000000000
--- a/mkspecs/common/winrt_winphone/assets/logo_150x150.png
+++ /dev/null
Binary files differ
diff --git a/mkspecs/common/winrt_winphone/assets/logo_30x30.png b/mkspecs/common/winrt_winphone/assets/logo_30x30.png
deleted file mode 100644
index 2acac59e73..0000000000
--- a/mkspecs/common/winrt_winphone/assets/logo_30x30.png
+++ /dev/null
Binary files differ
diff --git a/mkspecs/common/winrt_winphone/assets/logo_310x150.png b/mkspecs/common/winrt_winphone/assets/logo_310x150.png
deleted file mode 100644
index 1a79482947..0000000000
--- a/mkspecs/common/winrt_winphone/assets/logo_310x150.png
+++ /dev/null
Binary files differ
diff --git a/mkspecs/common/winrt_winphone/assets/logo_310x310.png b/mkspecs/common/winrt_winphone/assets/logo_310x310.png
deleted file mode 100644
index 02144a9f39..0000000000
--- a/mkspecs/common/winrt_winphone/assets/logo_310x310.png
+++ /dev/null
Binary files differ
diff --git a/mkspecs/common/winrt_winphone/assets/logo_44x44.png b/mkspecs/common/winrt_winphone/assets/logo_44x44.png
deleted file mode 100644
index 3cc5bec19f..0000000000
--- a/mkspecs/common/winrt_winphone/assets/logo_44x44.png
+++ /dev/null
Binary files differ
diff --git a/mkspecs/common/winrt_winphone/assets/logo_480x800.png b/mkspecs/common/winrt_winphone/assets/logo_480x800.png
deleted file mode 100644
index 39a37dac5b..0000000000
--- a/mkspecs/common/winrt_winphone/assets/logo_480x800.png
+++ /dev/null
Binary files differ
diff --git a/mkspecs/common/winrt_winphone/assets/logo_620x300.png b/mkspecs/common/winrt_winphone/assets/logo_620x300.png
deleted file mode 100644
index a2be79f5d7..0000000000
--- a/mkspecs/common/winrt_winphone/assets/logo_620x300.png
+++ /dev/null
Binary files differ
diff --git a/mkspecs/common/winrt_winphone/assets/logo_70x70.png b/mkspecs/common/winrt_winphone/assets/logo_70x70.png
deleted file mode 100644
index 334b2722b5..0000000000
--- a/mkspecs/common/winrt_winphone/assets/logo_70x70.png
+++ /dev/null
Binary files differ
diff --git a/mkspecs/common/winrt_winphone/assets/logo_71x71.png b/mkspecs/common/winrt_winphone/assets/logo_71x71.png
deleted file mode 100644
index 16d0808759..0000000000
--- a/mkspecs/common/winrt_winphone/assets/logo_71x71.png
+++ /dev/null
Binary files differ
diff --git a/mkspecs/common/winrt_winphone/assets/logo_store.png b/mkspecs/common/winrt_winphone/assets/logo_store.png
deleted file mode 100644
index 417ccdcb5f..0000000000
--- a/mkspecs/common/winrt_winphone/assets/logo_store.png
+++ /dev/null
Binary files differ
diff --git a/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
deleted file mode 100644
index 18683e01e3..0000000000
--- a/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version=\"1.0\" encoding=\"utf-8\"?>
-
-<Package
- xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\"
- xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\"
- xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\"
- xmlns:uap3=\"http://schemas.microsoft.com/appx/manifest/uap/windows10/3\"
- xmlns:mobile=\"http://schemas.microsoft.com/appx/manifest/mobile/windows10\"
- IgnorableNamespaces=\"uap uap3 mp mobile\">
-
- <Identity
- Name=\"$${WINRT_MANIFEST.identity}\"
- Publisher=\"$${WINRT_MANIFEST.publisherid}\"
- Version=\"$${WINRT_MANIFEST.version}\"
- ProcessorArchitecture=\"$${WINRT_MANIFEST.architecture}\" />
-
- <mp:PhoneIdentity PhoneProductId=\"$${WINRT_MANIFEST.identity}\" PhonePublisherId=\"$${WINRT_MANIFEST.phone_publisher_id}\"/>
-
- <Properties>
- <DisplayName>$${WINRT_MANIFEST.name}</DisplayName>
- <PublisherDisplayName>$${WINRT_MANIFEST.publisher}</PublisherDisplayName>
- <Logo>$${WINRT_MANIFEST.logo_store}</Logo>
- </Properties>
-
- <Dependencies>
- <TargetDeviceFamily Name=\"Windows.Universal\"
- MinVersion=\"$${WINRT_MANIFEST.minVersion}\"
- MaxVersionTested=\"$${WINRT_MANIFEST.maxVersionTested}\" />$${WINRT_MANIFEST.dependencies}
- </Dependencies>
-
- <Resources>
- <Resource Language=\"en\"/>
- </Resources>
-
- <Applications>
- <Application Id=\"App\"
- Executable=\"$${WINRT_MANIFEST.target}.exe\"
- EntryPoint=\"$${WINRT_MANIFEST.target}.App\">
- <uap:VisualElements
- DisplayName=\"$${WINRT_MANIFEST.name}\"
- Description=\"$${WINRT_MANIFEST.description}\"
- BackgroundColor=\"$${WINRT_MANIFEST.background}\"
- Square150x150Logo=\"$${WINRT_MANIFEST.logo_150x150}\"
- Square44x44Logo=\"$${WINRT_MANIFEST.logo_44x44}\">
-
- <uap:SplashScreen Image=\"$${WINRT_MANIFEST.logo_620x300}\" />
- </uap:VisualElements>
- </Application>
- </Applications>
- $${WINRT_MANIFEST.capabilities}
-</Package>
diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf
deleted file mode 100644
index 375e084127..0000000000
--- a/mkspecs/common/winrt_winphone/qmake.conf
+++ /dev/null
@@ -1,102 +0,0 @@
-#
-# qmake configuration for winrt and windows phone 8.1
-#
-# Written for Microsoft Visual C++
-#
-
-MAKEFILE_GENERATOR = MSBUILD
-QMAKE_COMPILER = msvc
-QMAKE_PLATFORM = winrt win32
-CONFIG = package_manifest $$CONFIG incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target rtti
-# MSVC 2017 15.8+ fixed std::aligned_storage but compilation fails without
-# _ENABLE_EXTENDED_ALIGNED_STORAGE flag since the fix breaks binary compatibility.
-DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN _ENABLE_EXTENDED_ALIGNED_STORAGE
-QMAKE_COMPILER_DEFINES += _WIN32
-
-DEPLOYMENT_PLUGIN += qwinrt
-
-QMAKE_CC = cl
-QMAKE_LEX = flex
-QMAKE_LEXFLAGS =
-QMAKE_YACC = bison -y
-QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -nologo
-QMAKE_CFLAGS_WARN_ON = -W3
-QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
-QMAKE_CFLAGS_DEBUG = -Zi -MDd
-QMAKE_CFLAGS_YACC =
-QMAKE_CFLAGS_LTCG = -GL
-QMAKE_CFLAGS_MP = -MP
-QMAKE_CFLAGS_SSE2 = -arch:SSE2
-QMAKE_CFLAGS_SSE3 = -arch:SSE2
-QMAKE_CFLAGS_SSSE3 = -arch:SSE2
-QMAKE_CFLAGS_SSE4_1 = -arch:SSE2
-QMAKE_CFLAGS_SSE4_2 = -arch:SSE2
-QMAKE_CFLAGS_AVX = -arch:AVX
-QMAKE_CFLAGS_AVX2 = -arch:AVX
-QMAKE_CFLAGS_AESNI = -arch:SSE2
-QMAKE_CFLAGS_SHANI = -arch:SSE2
-
-QMAKE_CXX = $$QMAKE_CC
-QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 -w44996
-QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
-QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
-QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
-QMAKE_CXXFLAGS_STL_ON = -EHsc
-QMAKE_CXXFLAGS_STL_OFF =
-QMAKE_CXXFLAGS_RTTI_ON = -GR
-QMAKE_CXXFLAGS_RTTI_OFF =
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
-QMAKE_CXXFLAGS_EXCEPTIONS_OFF = /wd4530 /wd4577
-
-QMAKE_INCDIR =
-
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
-
-QMAKE_LINK = link
-QMAKE_LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF /INCREMENTAL:NO
-QMAKE_LFLAGS_DEBUG = /DEBUG
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
-QMAKE_LFLAGS_EXE = /MANIFEST:NO
-QMAKE_LFLAGS_DLL = /MANIFEST:NO /DLL
-QMAKE_LFLAGS_LTCG = /LTCG
-QMAKE_PREFIX_SHLIB =
-QMAKE_EXTENSION_SHLIB = dll
-QMAKE_PREFIX_STATICLIB =
-QMAKE_EXTENSION_STATICLIB = lib
-
-QMAKE_LIBS += runtimeobject.lib
-QMAKE_LIBS_GUI =
-QMAKE_LIBS_NETWORK += ws2_32.lib
-
-QMAKE_LIBS_QT_ENTRY = -lqtmain
-
-QMAKE_IDL = midl
-QMAKE_LIB = lib /NOLOGO
-QMAKE_RC = rc
-
-VCPROJ_EXTENSION = .vcxproj
-VCSOLUTION_EXTENSION = .sln
-VCPROJ_KEYWORD = Qt4VSv1.0
-WINRT_ASSETS_PATH = $$PWD/assets
-
-WINRT_MANIFEST.capabilities = defaults
-WINRT_MANIFEST.capabilities_device = defaults
-
-include(../angle.conf)
-
-load(qt_config)
diff --git a/mkspecs/common/winrt_winphone/qplatformdefs.h b/mkspecs/common/winrt_winphone/qplatformdefs.h
deleted file mode 100644
index c561e41668..0000000000
--- a/mkspecs/common/winrt_winphone/qplatformdefs.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
-
-#ifdef UNICODE
-#ifndef _UNICODE
-#define _UNICODE
-#endif
-#endif
-
-// Get Qt defines/settings
-
-#include "qglobal.h"
-#include "qfunctions_winrt.h"
-
-#define _POSIX_
-#include <limits.h>
-#undef _POSIX_
-
-#include <tchar.h>
-#include <io.h>
-#include <direct.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct _stati64 // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-#define QT_STAT ::_stati64
-#define QT_FSTAT ::_fstati64
-#else
-#define QT_STATBUF struct _stat // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
-#define QT_STAT ::_stat
-#define QT_FSTAT ::_fstat
-#endif
-#define QT_STAT_REG _S_IFREG
-#define QT_STAT_DIR _S_IFDIR
-#define QT_STAT_MASK _S_IFMT
-#if defined(_S_IFLNK)
-# define QT_STAT_LNK _S_IFLNK
-#endif
-#define QT_FILENO _fileno
-#define QT_OPEN ::_open
-#define QT_CLOSE ::_close
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK ::_lseeki64
-#define QT_TSTAT ::_tstati64
-#else
-#define QT_LSEEK ::_lseek
-#define QT_TSTAT ::_tstat
-#endif
-#define QT_READ ::_read
-#define QT_WRITE ::_write
-#define QT_ACCESS ::_access
-#define QT_GETCWD ::_getcwd
-#define QT_CHDIR ::_chdir
-#define QT_MKDIR ::_mkdir
-#define QT_RMDIR ::_rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY _O_RDONLY
-#define QT_OPEN_WRONLY _O_WRONLY
-#define QT_OPEN_RDWR _O_RDWR
-#define QT_OPEN_CREAT _O_CREAT
-#define QT_OPEN_TRUNC _O_TRUNC
-#define QT_OPEN_APPEND _O_APPEND
-#if defined(O_TEXT)
-# define QT_OPEN_TEXT _O_TEXT
-# define QT_OPEN_BINARY _O_BINARY
-#endif
-
-#include "../common/c89/qplatformdefs.h"
-
-#ifdef QT_LARGEFILE_SUPPORT
-#undef QT_FSEEK
-#undef QT_FTELL
-#undef QT_OFF_T
-
-#define QT_FSEEK ::_fseeki64
-#define QT_FTELL ::_ftelli64
-#define QT_OFF_T __int64
-#endif
-
-#define QT_SIGNAL_ARGS int
-
-#define QT_VSNPRINTF(buffer, count, format, arg) \
- vsnprintf_s(buffer, count, count-1, format, arg)
-
-#define QT_SNPRINTF ::_snprintf
-
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
-
-typedef int mode_t;
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/cygwin-g++/qplatformdefs.h b/mkspecs/cygwin-g++/qplatformdefs.h
index 6042f3809b..0f2a54b47f 100644
--- a/mkspecs/cygwin-g++/qplatformdefs.h
+++ b/mkspecs/cygwin-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
@@ -76,7 +40,7 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/wait.h>
-//#include <windows.h>
+//#include <qt_windows.h>
#include <netinet/in.h>
#define QT_NO_USE_FSEEKO
diff --git a/mkspecs/darwin-g++/qplatformdefs.h b/mkspecs/darwin-g++/qplatformdefs.h
index faed56310d..fdba023e17 100644
--- a/mkspecs/darwin-g++/qplatformdefs.h
+++ b/mkspecs/darwin-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/devices/freebsd-generic-clang/qplatformdefs.h b/mkspecs/devices/freebsd-generic-clang/qplatformdefs.h
index de53ea5e16..7f91f66e9a 100644
--- a/mkspecs/devices/freebsd-generic-clang/qplatformdefs.h
+++ b/mkspecs/devices/freebsd-generic-clang/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../common/bsd/qplatformdefs.h"
diff --git a/mkspecs/devices/freebsd-rasp-pi-clang/qplatformdefs.h b/mkspecs/devices/freebsd-rasp-pi-clang/qplatformdefs.h
index 3fd73d421a..6e435a1bb9 100644
--- a/mkspecs/devices/freebsd-rasp-pi-clang/qplatformdefs.h
+++ b/mkspecs/devices/freebsd-rasp-pi-clang/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../freebsd-generic-clang/qplatformdefs.h"
diff --git a/mkspecs/devices/integrity-armv8-SA8155P/qmake.conf b/mkspecs/devices/integrity-armv8-SA8155P/qmake.conf
new file mode 100644
index 0000000000..f1696e3635
--- /dev/null
+++ b/mkspecs/devices/integrity-armv8-SA8155P/qmake.conf
@@ -0,0 +1,47 @@
+#
+# qmake configuration for INTEGRITY Qualcomm SA8155P ADP
+#
+
+load(device_config)
+
+include(../../common/ghs-integrity-armv8.conf)
+
+QMAKE_CFLAGS = --signed_fields --no_commons --diag_suppress=1,82,228,236,381,611,961,997,1795,1931,1974,3148,1721,1424,193,940,620,111,128,185,826,186,68,830,177,554,550,175,1441,546 --defer_parse_function_templates --exceptions
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS --no_implicit_include --link_once_templates -non_shared --new_outside_of_constructor --c++17
+QMAKE_LFLAGS += --thread_local_storage --exceptions
+
+QT_QPA_DEFAULT_PLATFORM = eglfs
+EGLFS_DEVICE_INTEGRATION = eglfs_openwfd
+
+qc_multimedia_inc_directory = $$(QC_MULTIMEDIA_INC_DIR)
+isEmpty(qc_multimedia_inc_directory): \
+ error("This makespec requires the environment variable QC_MULTIMEDIA_INC_DIR to be set.")
+
+QMAKE_INCDIR += $$(QC_MULTIMEDIA_INC_DIR)
+
+QMAKE_LIBS_EGL += -lESXEGL_Adreno -lESXGLESv2_Adreno -ladreno_utils -lGSLUser -lOSUser -lpanel -livfs -lposix -lpmem -ltzbsp -lpaged_alloc -lglnext-llvm -lopenwfd -lplanedef -llogger -lnet -lsocket -lrfs_client -lshm_client -lmmosalrfs -lmmosalfile -lOSAbstraction
+
+QMAKE_LIBS_OPENGL_ES2 += $${QMAKE_LIBS_EGL}
+
+QMAKE_CFLAGS += -DINTEGRITY
+QMAKE_CXXFLAGS += -DINTEGRITY
+
+QMAKE_CFLAGS += -bigswitch
+QMAKE_CXXFLAGS += -bigswitch
+QMAKE_LFLAGS += -bigswitch
+
+dirs = $$(GL_INC_DIR)
+isEmpty(dirs): \
+ error("This makespec requires the environment variable GL_INC_DIR to be set.")
+
+QMAKE_INCDIR_EGL = $$split(dirs, $$QMAKE_DIRLIST_SEP)
+QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_EGL
+
+dirs = $$(GL_LIB_DIR)
+isEmpty(dirs): \
+ error("This makespec requires the environment variable GL_LIB_DIR to be set.")
+
+QMAKE_LIBDIR_EGL = $$split(dirs, $$QMAKE_DIRLIST_SEP)
+QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_EGL
+
+load(qt_config)
diff --git a/mkspecs/devices/integrity-armv8-SA8155P/qplatformdefs.h b/mkspecs/devices/integrity-armv8-SA8155P/qplatformdefs.h
new file mode 100644
index 0000000000..be7d5f2122
--- /dev/null
+++ b/mkspecs/devices/integrity-armv8-SA8155P/qplatformdefs.h
@@ -0,0 +1,9 @@
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+#include "../../common/integrity/qplatformdefs.h"
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/devices/integrity-armv8-drive-cx/qplatformdefs.h b/mkspecs/devices/integrity-armv8-drive-cx/qplatformdefs.h
index c8361113a0..15ea38f1e0 100644
--- a/mkspecs/devices/integrity-armv8-drive-cx/qplatformdefs.h
+++ b/mkspecs/devices/integrity-armv8-drive-cx/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/devices/integrity-armv8-msm8996au/qplatformdefs.h b/mkspecs/devices/integrity-armv8-msm8996au/qplatformdefs.h
index c8361113a0..15ea38f1e0 100644
--- a/mkspecs/devices/integrity-armv8-msm8996au/qplatformdefs.h
+++ b/mkspecs/devices/integrity-armv8-msm8996au/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/devices/linux-archos-gen8-g++/qplatformdefs.h b/mkspecs/devices/linux-archos-gen8-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-archos-gen8-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-archos-gen8-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp
index 184a47b683..07ceca1d12 100644
--- a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp
+++ b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "private/qeglfshooks_p.h"
#include <EGL/fbdev_window.h>
@@ -75,8 +39,8 @@ QSize QEglFS8726MHooks::screenSize() const
EGLNativeWindowType QEglFS8726MHooks::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format)
{
- Q_UNUSED(window)
- Q_UNUSED(format)
+ Q_UNUSED(window);
+ Q_UNUSED(format);
fbdev_window *window = new fbdev_window;
window->width = size.width();
diff --git a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qplatformdefs.h b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qplatformdefs.h
index b2d14f7cd5..aed14dce70 100644
--- a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-arm-generic-g++/qplatformdefs.h b/mkspecs/devices/linux-arm-generic-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-arm-generic-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-arm-generic-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qplatformdefs.h b/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-arm-trident-pnx8473-g++/qplatformdefs.h b/mkspecs/devices/linux-arm-trident-pnx8473-g++/qplatformdefs.h
index b2d14f7cd5..aed14dce70 100644
--- a/mkspecs/devices/linux-arm-trident-pnx8473-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-arm-trident-pnx8473-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-beagleboard-g++/qplatformdefs.h b/mkspecs/devices/linux-beagleboard-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-beagleboard-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-beagleboard-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-colibri-vf-g++/qplatformdefs.h b/mkspecs/devices/linux-colibri-vf-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-colibri-vf-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-colibri-vf-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-drive-cx-g++/qplatformdefs.h b/mkspecs/devices/linux-drive-cx-g++/qplatformdefs.h
index e927f75015..0ae4146e6c 100644
--- a/mkspecs/devices/linux-drive-cx-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-drive-cx-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-emu-g++/qplatformdefs.h b/mkspecs/devices/linux-emu-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-emu-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-emu-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-generic-g++/qplatformdefs.h b/mkspecs/devices/linux-generic-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-generic-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-generic-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-imx53qsb-g++/qplatformdefs.h b/mkspecs/devices/linux-imx53qsb-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-imx53qsb-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-imx53qsb-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-imx6-g++/qplatformdefs.h b/mkspecs/devices/linux-imx6-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-imx6-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-imx6-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-imx7-g++/qplatformdefs.h b/mkspecs/devices/linux-imx7-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-imx7-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-imx7-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-imx8-g++/qmake.conf b/mkspecs/devices/linux-imx8-g++/qmake.conf
new file mode 100644
index 0000000000..17e6c884e9
--- /dev/null
+++ b/mkspecs/devices/linux-imx8-g++/qmake.conf
@@ -0,0 +1,41 @@
+#
+# qmake configuration for the NXP i.MX8 based boards (64-bit)
+#
+# The configuration below is set up for running with the fbdev-style
+# Vivante graphics stack. (so eglfs with the eglfs_viv backend, no
+# direct drm use via eglfs_kms)
+
+# Wayland should also be functional. However, when writing Wayland
+# *compositors* with Qt, the eglfs backend will have to be switched to
+# eglfs_viv_wl by setting the QT_QPA_EGLFS_INTEGRATION environment
+# variable.
+#
+# Below is an example configure line that assumes there is an AArch64
+# toolchain and sysroot available in $HOME/imx8. On device Qt is
+# expected to be placed under /usr/local/qt514 whereas on the host
+# 'make install' will copy the host tools and the target libraries to
+# $HOME/imx8/qt5.
+#
+# ./configure -release -opengl es2 -device linux-imx8-g++ \
+# -device-option CROSS_COMPILE=~/imx8/toolchain/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux- \
+# -sysroot ~/imx8/sysroot \
+# -opensource -confirm-license -make libs -prefix /usr/local/qt514 -extprefix ~/imx8/qt5 -v
+
+include(../common/linux_device_pre.conf)
+
+QMAKE_LIBS_EGL += -lEGL
+QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL
+QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL
+
+IMX8_CFLAGS = -march=armv8-a -mtune=cortex-a72.cortex-a53 -DLINUX=1 -DEGL_API_FB=1
+QMAKE_CFLAGS += $$IMX8_CFLAGS
+QMAKE_CXXFLAGS += $$IMX8_CFLAGS
+
+DISTRO_OPTS += aarch64
+
+# Preferred eglfs backend
+EGLFS_DEVICE_INTEGRATION = eglfs_viv
+
+include(../common/linux_arm_device_post.conf)
+
+load(qt_config)
diff --git a/mkspecs/devices/linux-imx8-g++/qplatformdefs.h b/mkspecs/devices/linux-imx8-g++/qplatformdefs.h
new file mode 100644
index 0000000000..0ae4146e6c
--- /dev/null
+++ b/mkspecs/devices/linux-imx8-g++/qplatformdefs.h
@@ -0,0 +1,4 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-jetson-tk1-g++/qplatformdefs.h b/mkspecs/devices/linux-jetson-tk1-g++/qplatformdefs.h
index e927f75015..0ae4146e6c 100644
--- a/mkspecs/devices/linux-jetson-tk1-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-jetson-tk1-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-jetson-tk1-pro-g++/qplatformdefs.h b/mkspecs/devices/linux-jetson-tk1-pro-g++/qplatformdefs.h
index e927f75015..0ae4146e6c 100644
--- a/mkspecs/devices/linux-jetson-tk1-pro-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-jetson-tk1-pro-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-jetson-tx1-g++/qplatformdefs.h b/mkspecs/devices/linux-jetson-tx1-g++/qplatformdefs.h
index e927f75015..0ae4146e6c 100644
--- a/mkspecs/devices/linux-jetson-tx1-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-jetson-tx1-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp
index 396f0bbea6..564501aa80 100644
--- a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp
+++ b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qdirectfbeglhooks.h"
#include "qdirectfbconvenience.h"
diff --git a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qplatformdefs.h b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-mipsel-ci20-g++/qplatformdefs.h b/mkspecs/devices/linux-mipsel-ci20-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-mipsel-ci20-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-mipsel-ci20-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-nuc-g++/qplatformdefs.h b/mkspecs/devices/linux-nuc-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-nuc-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-nuc-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-odroid-xu3-g++/qplatformdefs.h b/mkspecs/devices/linux-odroid-xu3-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-odroid-xu3-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-odroid-xu3-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-rasp-pi-g++/qplatformdefs.h b/mkspecs/devices/linux-rasp-pi-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-rasp-pi-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-rasp-pi-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-rasp-pi2-g++/qplatformdefs.h b/mkspecs/devices/linux-rasp-pi2-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-rasp-pi2-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-rasp-pi2-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-rasp-pi3-g++/qplatformdefs.h b/mkspecs/devices/linux-rasp-pi3-g++/qplatformdefs.h
index 4435fb2557..5c69998d7a 100644
--- a/mkspecs/devices/linux-rasp-pi3-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-rasp-pi3-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-rasp-pi3-vc4-g++/qplatformdefs.h b/mkspecs/devices/linux-rasp-pi3-vc4-g++/qplatformdefs.h
index 4435fb2557..5c69998d7a 100644
--- a/mkspecs/devices/linux-rasp-pi3-vc4-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-rasp-pi3-vc4-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf b/mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf
new file mode 100644
index 0000000000..9903775883
--- /dev/null
+++ b/mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf
@@ -0,0 +1,25 @@
+#
+# Generic qmake configuration for building with g++ on Raspberry Pi 4 (64-bit).
+#
+# Tested with Raspberry Pi OS 64-bit and aarch64 gcc compiler from Debian package repository
+#
+# A minimal configure line could look something like this:
+# ./configure -release -opengl es2 -device linux-rasp-pi4-aarch64 -device-option CROSS_COMPILE=aarch64-linux-gnu- -sysroot ~/rpi-sysroot -prefix /usr/local/qt6 -extprefix $HOME/qt-raspi
+
+DISTRO_OPTS += deb-multi-arch
+
+include(../common/linux_device_pre.conf)
+
+QMAKE_LIBS_EGL += -lEGL
+QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL
+
+QMAKE_CFLAGS += -march=armv8-a
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+
+EGLFS_DEVICE_INTEGRATION = eglfs_kms
+
+LINKER_FLAGS += -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
+
+include(../common/linux_device_post.conf)
+
+load(qt_config)
diff --git a/mkspecs/devices/linux-rasp-pi4-aarch64/qplatformdefs.h b/mkspecs/devices/linux-rasp-pi4-aarch64/qplatformdefs.h
new file mode 100644
index 0000000000..3fe85b661c
--- /dev/null
+++ b/mkspecs/devices/linux-rasp-pi4-aarch64/qplatformdefs.h
@@ -0,0 +1,8 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-rasp-pi4-v3d-g++/qmake.conf b/mkspecs/devices/linux-rasp-pi4-v3d-g++/qmake.conf
new file mode 100644
index 0000000000..69b0c761a8
--- /dev/null
+++ b/mkspecs/devices/linux-rasp-pi4-v3d-g++/qmake.conf
@@ -0,0 +1,40 @@
+# qmake configuration for the Raspberry Pi 4 (32-bit) using the Mesa V3D
+# graphics stack. (not the Broadcom stack)
+#
+# This supports accelerated OpenGL both for X11 and DRM/KMS. Perhaps
+# Wayland too.
+#
+# Tested with a sysroot created from Raspbian Buster and a gcc 7.4
+# toolchain from Linaro.
+#
+# Example configure command line, assuming installation to
+# /usr/local/qt5pi on device and ~/rpi/qt5 on the host:
+#
+# ./configure -release -opengl es2 -device linux-rasp-pi4-v3d-g++ -device-option CROSS_COMPILE=~/rpi/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- \
+# -sysroot ~/rpi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/rpi/qt5 -v
+#
+# Check the configure output carefully. EGLFS, EGLFS GBM, and EGL on X11
+# should all be 'yes'. Otherwise something is wrong.
+#
+# If getting linker errors like "undefined reference to `_dl_stack_flags'" check the
+# symlinks in the sysroot, they were probably not adjusted
+# correctly. F.ex. sysroot/usr/lib/arm-linux-gnueabihf/libpthread.so must point to
+# sysroot/lib/arm-linux-gnueabihf/libpthread.so.0. If it is a broken link instead, bad
+# things will happen.
+
+include(../common/linux_device_pre.conf)
+
+QMAKE_LIBS_EGL += -lEGL
+QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL
+
+QMAKE_CFLAGS = -march=armv8-a -mtune=cortex-a72 -mfpu=crypto-neon-fp-armv8
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+
+DISTRO_OPTS += hard-float
+DISTRO_OPTS += deb-multi-arch
+
+EGLFS_DEVICE_INTEGRATION = eglfs_kms
+
+include(../common/linux_arm_device_post.conf)
+
+load(qt_config)
diff --git a/mkspecs/devices/linux-rasp-pi4-v3d-g++/qplatformdefs.h b/mkspecs/devices/linux-rasp-pi4-v3d-g++/qplatformdefs.h
new file mode 100644
index 0000000000..5c69998d7a
--- /dev/null
+++ b/mkspecs/devices/linux-rasp-pi4-v3d-g++/qplatformdefs.h
@@ -0,0 +1,4 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-rcar-h2-g++/qplatformdefs.h b/mkspecs/devices/linux-rcar-h2-g++/qplatformdefs.h
index e927f75015..0ae4146e6c 100644
--- a/mkspecs/devices/linux-rcar-h2-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-rcar-h2-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-rcar-m3-g++/qplatformdefs.h b/mkspecs/devices/linux-rcar-m3-g++/qplatformdefs.h
index dff192d7b2..5c69998d7a 100644
--- a/mkspecs/devices/linux-rcar-m3-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-rcar-m3-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qplatformdefs.h b/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qplatformdefs.h
index b2d14f7cd5..aed14dce70 100644
--- a/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qplatformdefs.h b/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qplatformdefs.h
index b2d14f7cd5..aed14dce70 100644
--- a/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-snowball-g++/qplatformdefs.h b/mkspecs/devices/linux-snowball-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-snowball-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-snowball-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-tegra2-g++/qplatformdefs.h b/mkspecs/devices/linux-tegra2-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/devices/linux-tegra2-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-tegra2-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-tinkerboard-g++/qplatformdefs.h b/mkspecs/devices/linux-tinkerboard-g++/qplatformdefs.h
index e927f75015..0ae4146e6c 100644
--- a/mkspecs/devices/linux-tinkerboard-g++/qplatformdefs.h
+++ b/mkspecs/devices/linux-tinkerboard-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/features/android/android.prf b/mkspecs/features/android/android.prf
index 1dc8f87313..87fdd763e4 100644
--- a/mkspecs/features/android/android.prf
+++ b/mkspecs/features/android/android.prf
@@ -1,14 +1,59 @@
-contains(TEMPLATE, ".*app") {
- !android_app {
- !contains(TARGET, ".so"): TARGET = lib$${TARGET}.so
- QMAKE_LFLAGS += -Wl,-soname,$$shell_quote($$TARGET)
+APK_PATH = $$shell_path($$OUT_PWD/android-build/$${TARGET}.apk)
+TARGET_FOR_ANDROID_DEPLOYMENT_SETTINGS = $$TARGET
- android_install {
- target.path=/libs/$$ANDROID_TARGET_ARCH/
+!contains(TEMPLATE, subdirs): {
+ apk_install_target.target = apk_install_target
+ apk_install_target.depends = first
+ apk_install_target.commands = $(MAKE) -f $(MAKEFILE) INSTALL_ROOT=$$shell_path($$OUT_PWD/android-build) install
+
+ qtPrepareTool(ANDROIDDEPLOYQT, androiddeployqt)
+ isEmpty(ANDROID_DEPLOYMENT_SETTINGS_FILE): ANDROID_DEPLOYMENT_SETTINGS_FILE = $$OUT_PWD/android-$$TARGET-deployment-settings.json
+ contains(QMAKE_HOST.os, Windows): extension = .exe
+
+ apk.target = apk
+ apk.depends = apk_install_target
+ apk.commands = $$ANDROIDDEPLOYQT --input $$ANDROID_DEPLOYMENT_SETTINGS_FILE --output $$OUT_PWD/android-build --apk $$APK_PATH
+
+ aab.target = aab
+ aab.depends = apk_install_target
+ aab.commands = $$ANDROIDDEPLOYQT --input $$ANDROID_DEPLOYMENT_SETTINGS_FILE --output $$OUT_PWD/android-build --aab --apk $$APK_PATH
+} else {
+ prepareRecursiveTarget(aab)
+ prepareRecursiveTarget(apk)
+ prepareRecursiveTarget(apk_install_target)
+}
+
+# Apply Android arch specific settings in the following cases:
+# - build_pass == true aka Qt was configured with multi-ABI (2+ arches)
+# - single_android_abi == true aka Qt was configuring with a single ABI / arch
+# modifications are omitted when building config.tests
+# during Qt configuration, by checkking for the presence of single_arch
+build_pass|if(single_android_abi:!single_arch) {
+ contains(TEMPLATE, ".*app") {
+ !android_app {
+ !contains(TARGET, ".so") {
+ single_arch:TARGET = lib$${TARGET}.so
+ else:TARGET = lib$${TARGET}_$${QT_ARCH}.so
+ }
+ QMAKE_LFLAGS += -Wl,-soname,$$shell_quote($$TARGET)
+
+ android_install {
+ target.path=/libs/$$ANDROID_TARGET_ARCH/
+ INSTALLS *= target
+ }
+ }
+ } else: contains(TEMPLATE, "lib"):!QTDIR_build:android_install {
+ tmpvar = $$str_member($$TARGET, -$$str_size($${QT_ARCH}), -1)
+ !equals(tmpvar, $${QT_ARCH}): TARGET = $${TARGET}_$${QT_ARCH}
+ !static {
+ target.path = /libs/$$ANDROID_TARGET_ARCH/
INSTALLS *= target
}
}
-} else: contains(TEMPLATE, "lib"):!static:!QTDIR_build:android_install {
- target.path = /libs/$$ANDROID_TARGET_ARCH/
- INSTALLS *= target
+} else {
+ android-build-distclean.commands = \
+ $$QMAKE_DEL_TREE $$shell_quote($$shell_path($$OUT_PWD/android-build))
+ QMAKE_EXTRA_TARGETS *= android-build-distclean
+ CLEAN_DEPS += android-build-distclean
}
+QMAKE_EXTRA_TARGETS *= aab apk apk_install_target
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf
index ad826bdad3..8d68defa97 100644
--- a/mkspecs/features/android/android_deployment_settings.prf
+++ b/mkspecs/features/android/android_deployment_settings.prf
@@ -1,13 +1,18 @@
-contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
+contains(TEMPLATE, ".*app"):!build_pass {
defineReplace(emitString) {
- return("\"$$replace(1, \\\\, \\\\)\"")
+ return("\"$$clean_path($$1)\"")
}
FILE_CONTENT = "{"
FILE_CONTENT += " \"description\": \"This file is generated by qmake to be read by androiddeployqt and should not be modified by hand.\","
FILE_CONTENT += " \"qt\": $$emitString($$[QT_INSTALL_PREFIX]),"
+ FILE_CONTENT += " \"qtDataDirectory\": $$emitString($$relative_path($$[QT_INSTALL_DATA], $$[QT_INSTALL_PREFIX])),"
+ FILE_CONTENT += " \"qtLibExecsDirectory\": $$emitString($$relative_path($$[QT_INSTALL_LIBEXECS], $$[QT_INSTALL_PREFIX])),"
+ FILE_CONTENT += " \"qtLibsDirectory\": $$emitString($$relative_path($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])),"
+ FILE_CONTENT += " \"qtPluginsDirectory\": $$emitString($$relative_path($$[QT_INSTALL_PLUGINS], $$[QT_INSTALL_PREFIX])),"
+ FILE_CONTENT += " \"qtQmlDirectory\": $$emitString($$relative_path($$[QT_INSTALL_QML], $$[QT_INSTALL_PREFIX])),"
# Settings from mkspecs/environment
FILE_CONTENT += " \"sdk\": $$emitString($$ANDROID_SDK_ROOT),"
@@ -17,34 +22,21 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
isEmpty(NDK_ROOT): NDK_ROOT = $$DEFAULT_ANDROID_NDK_ROOT
FILE_CONTENT += " \"ndk\": $$emitString($$NDK_ROOT),"
- equals(ANDROID_USE_LLVM, true) {
- FILE_CONTENT += " \"toolchain-prefix\": \"llvm\","
- FILE_CONTENT += " \"tool-prefix\": \"llvm\","
- } else {
- NDK_TOOLCHAIN_PREFIX = $$(ANDROID_NDK_TOOLCHAIN_PREFIX)
- isEmpty(NDK_TOOLCHAIN_PREFIX) {
- equals(ANDROID_TARGET_ARCH, x86): NDK_TOOLCHAIN_PREFIX = x86
- else: equals(ANDROID_TARGET_ARCH, x86_64): NDK_TOOLCHAIN_PREFIX = x86_64
- else: equals(ANDROID_TARGET_ARCH, mips): NDK_TOOLCHAIN_PREFIX = mipsel-linux-android
- else: equals(ANDROID_TARGET_ARCH, mips64): NDK_TOOLCHAIN_PREFIX = mips64el-linux-android
- else: equals(ANDROID_TARGET_ARCH, arm64-v8a): NDK_TOOLCHAIN_PREFIX = aarch64-linux-android
- else: NDK_TOOLCHAIN_PREFIX = arm-linux-androideabi
- }
- FILE_CONTENT += " \"toolchain-prefix\": $$emitString($$NDK_TOOLCHAIN_PREFIX),"
- FILE_CONTENT += " \"tool-prefix\": $$emitString($$NDK_TOOLS_PREFIX),"
- }
-
- NDK_TOOLCHAIN_VERSION = $$(ANDROID_NDK_TOOLCHAIN_VERSION)
- isEmpty(NDK_TOOLCHAIN_VERSION): NDK_TOOLCHAIN_VERSION = $$DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION
- FILE_CONTENT += " \"toolchain-version\": $$emitString($$NDK_TOOLCHAIN_VERSION),"
+ FILE_CONTENT += " \"toolchain-prefix\": \"llvm\","
+ FILE_CONTENT += " \"tool-prefix\": \"llvm\","
NDK_HOST = $$(ANDROID_NDK_HOST)
isEmpty(NDK_HOST): NDK_HOST = $$DEFAULT_ANDROID_NDK_HOST
FILE_CONTENT += " \"ndk-host\": $$emitString($$NDK_HOST),"
- ANDROID_TARGET_ARCH = $$(ANDROID_TARGET_ARCH)
- isEmpty(ANDROID_TARGET_ARCH): ANDROID_TARGET_ARCH = $$DEFAULT_ANDROID_TARGET_ARCH
- FILE_CONTENT += " \"target-architecture\": $$emitString($$ANDROID_TARGET_ARCH),"
+ for (arch, ANDROID_ABIS) {
+ equals(arch, x86): libs_arch = i686-linux-android
+ else: equals(arch, x86_64): libs_arch = x86_64-linux-android
+ else: equals(arch, arm64-v8a): libs_arch = aarch64-linux-android
+ else: libs_arch = arm-linux-androideabi
+ ARCHS += "$$emitString($$arch):$$emitString($$libs_arch)"
+ }
+ FILE_CONTENT += " \"architectures\": {$$join(ARCHS,", ")},"
# Explicitly set qt dependencies of application for deployment
!isEmpty(ANDROID_DEPLOYMENT_DEPENDENCIES): \
@@ -66,23 +58,70 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
!isEmpty(ANDROID_VERSION_CODE): \
FILE_CONTENT += " \"android-version-code\": $$emitString($$ANDROID_VERSION_CODE),"
+ !isEmpty(ANDROID_MIN_SDK_VERSION): \
+ FILE_CONTENT += " \"android-min-sdk-version\": $$emitString($$ANDROID_MIN_SDK_VERSION),"
+
+ !isEmpty(ANDROID_TARGET_SDK_VERSION): \
+ FILE_CONTENT += " \"android-target-sdk-version\": $$emitString($$ANDROID_TARGET_SDK_VERSION),"
+
!isEmpty(ANDROID_EXTRA_LIBS): \
FILE_CONTENT += " \"android-extra-libs\": $$emitString($$join(ANDROID_EXTRA_LIBS, ",")),"
- !isEmpty(QML_IMPORT_PATH): \
- FILE_CONTENT += " \"qml-import-paths\": $$emitString($$join(QML_IMPORT_PATH, ",")),"
+ tool_extension = ""
+ contains(QMAKE_HOST.os, Windows): tool_extension = ".exe"
+ FILE_CONTENT += " \"rcc-binary\": $$emitString($$[QT_HOST_LIBEXECS]/rcc$${tool_extension}),"
- isEmpty(QML_ROOT_PATH): \
- QML_ROOT_PATH = $$_PRO_FILE_PWD_
- FILE_CONTENT += " \"qml-root-path\": $$emitString($$QML_ROOT_PATH),"
- FILE_CONTENT += " \"stdcpp-path\": $$emitString($$ANDROID_STDCPP_PATH),"
- FILE_CONTENT += " \"useLLVM\": $$ANDROID_USE_LLVM,"
+ contains(QT_MODULES, qml) {
+ FILE_CONTENT += " \"qml-importscanner-binary\": $$emitString($$[QT_HOST_LIBEXECS]/qmlimportscanner$${tool_extension}),"
+
+ qml_import_paths = $$(QML2_IMPORT_PATH)
+ qml_import_paths = $$split(qml_import_paths, $$DIRLIST_SEPARATOR)
+ qml_import_paths += $$QML_IMPORT_PATH
+ !isEmpty(qml_import_paths) {
+ FILE_CONTENT += " \"qml-import-paths\": $$emitString($$join(qml_import_paths, ",")),"
+ }
+ unset(qml_import_paths)
- FILE_CONTENT += " \"application-binary\": $$emitString($$absolute_path($$DESTDIR, $$OUT_PWD)/$$TARGET)"
+
+ isEmpty(QML_ROOT_PATH): \
+ QML_ROOT_PATH = $$_PRO_FILE_PWD_
+ FILE_CONTENT += " \"qml-root-path\": $$emitString($$QML_ROOT_PATH),"
+ } else {
+ FILE_CONTENT += " \"qml-skip-import-scanning\": true,"
+ }
+
+ !isEmpty(ANDROID_APPLICATION_ARGUMENTS): \
+ FILE_CONTENT += " \"android-application-arguments\": $$emitString($$ANDROID_APPLICATION_ARGUMENTS),"
+
+ FILE_CONTENT += " \"stdcpp-path\": $$emitString($$ANDROID_STDCPP_PATH),"
+ !isEmpty(RESOURCES)|!isEmpty(QMLCACHE_RESOURCE_FILES) {
+ # Make sure that qmake generated qrc files are accounted for
+ load(resources_functions)
+ qtFlattenResources()
+ NEWRESOURCES = $$RESOURCES $$QMLCACHE_RESOURCE_FILES
+ for(resource, NEWRESOURCES) {
+ contains(resource, ".*qmake_qmake_immediate\\.qrc$") {
+ # They will be created for each architecture, since they could be different
+ # we need to account for all of them
+ qmake_qrc_path = "qmake_qmake_immediate.qrc"
+ base_out_path = $$OUT_PWD/$$RCC_DIR
+ multi_android_abi {
+ for (arch, ANDROID_ABIS): \
+ rescopy += $$absolute_path($$qmake_qrc_path, $$base_out_path/$$arch)
+ } else {
+ rescopy += $$absolute_path($$qmake_qrc_path, $$base_out_path)
+ }
+ } else {
+ contains(resource, ".*\\.qrc$"): rescopy += $$absolute_path($$resource, $$_PRO_FILE_PWD_)
+ }
+ }
+ FILE_CONTENT += " \"qrcFiles\": $$emitString($$join(rescopy, ",")),"
+ }
+ FILE_CONTENT += ""
+ FILE_CONTENT += " \"application-binary\": $$emitString($$TARGET_FOR_ANDROID_DEPLOYMENT_SETTINGS)"
FILE_CONTENT += "}"
- isEmpty(ANDROID_DEPLOYMENT_SETTINGS_FILE): ANDROID_DEPLOYMENT_SETTINGS_FILE = $$OUT_PWD/android-$$TARGET-deployment-settings.json
+ isEmpty(ANDROID_DEPLOYMENT_SETTINGS_FILE): ANDROID_DEPLOYMENT_SETTINGS_FILE = $$OUT_PWD/android-$$TARGET_FOR_ANDROID_DEPLOYMENT_SETTINGS-deployment-settings.json
write_file($$ANDROID_DEPLOYMENT_SETTINGS_FILE, FILE_CONTENT)|error()
}
-
diff --git a/mkspecs/features/android/default_pre.prf b/mkspecs/features/android/default_pre.prf
new file mode 100644
index 0000000000..2328b728ac
--- /dev/null
+++ b/mkspecs/features/android/default_pre.prf
@@ -0,0 +1,81 @@
+load(default_pre)
+
+build_pass:armeabi-v7a {
+ QT_ARCH = armeabi-v7a
+} else:build_pass:arm64-v8a {
+ QT_ARCH = arm64-v8a
+} else:build_pass:x86 {
+ QT_ARCH = x86
+} else:build_pass:x86_64 {
+ QT_ARCH = x86_64
+} else:count(ALL_ANDROID_ABIS, 1) {
+ QT_ARCH = $$ALL_ANDROID_ABIS
+ CONFIG += single_android_abi $$QT_ARCH
+} else {
+ # default architecture
+ QT_ARCH = arm64-v8a
+}
+
+DEFAULT_ANDROID_TARGET_ARCH=$${QT_ARCH}
+
+ANDROID_TARGET_ARCH = $$(ANDROID_TARGET_ARCH)
+isEmpty(ANDROID_TARGET_ARCH): ANDROID_TARGET_ARCH = $$DEFAULT_ANDROID_TARGET_ARCH
+
+# Follow https://android.googlesource.com/platform/ndk/+/ndk-release-r20/docs/BuildSystemMaintainers.md
+
+equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
+ QMAKE_CFLAGS = -target armv7a-linux-androideabi$$replace(ANDROID_PLATFORM, "android-", "")
+else: equals(ANDROID_TARGET_ARCH, arm64-v8a): \
+ QMAKE_CFLAGS = -target aarch64-linux-android$$replace(ANDROID_PLATFORM, "android-", "")
+else: equals(ANDROID_TARGET_ARCH, x86): \
+ QMAKE_CFLAGS = -target i686-linux-android$$replace(ANDROID_PLATFORM, "android-", "") -mstackrealign
+else: equals(ANDROID_TARGET_ARCH, x86_64): \
+ QMAKE_CFLAGS = -target x86_64-linux-android$$replace(ANDROID_PLATFORM, "android-", "")
+
+QMAKE_CFLAGS += -fno-limit-debug-info
+
+QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS
+
+equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
+ QMAKE_LINK += -Wl,--exclude-libs,libunwind.a
+
+ANDROID_STDCPP_PATH = $$NDK_LLVM_PATH/sysroot/usr/lib/
+
+# -fstack-protector-strong offers good protection against stack smashing attacks.
+# It is (currently) enabled only on Android because we know for sure that Android compilers supports it
+QMAKE_CFLAGS += -fPIC -fstack-protector-strong -DANDROID
+
+
+equals(ANDROID_TARGET_ARCH, armeabi-v7a) | equals(ANDROID_TARGET_ARCH, armeabi) {
+ CONFIG += optimize_size
+ QMAKE_CFLAGS_DEBUG = -g -marm -O0
+ QMAKE_CFLAGS_RELEASE += -mthumb
+ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -mthumb
+}
+
+QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
+
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_LIBS_EGL = -lEGL
+QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
+
+QMAKE_STRIP =
+#$${CROSS_COMPILE}strip
+
+
+equals(QT_ARCH, x86): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/i686-linux-android-
+else: equals(QT_ARCH, x86_64): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/x86_64-linux-android-
+else: equals(QT_ARCH, arm64-v8a): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/aarch64-linux-android-
+else: CROSS_COMPILE = $$NDK_LLVM_PATH/bin/arm-linux-androideabi-
+
+QMAKE_LFLAGS =
+
+QMAKE_LIBS_PRIVATE = -llog -lz -lm -ldl -lc
diff --git a/mkspecs/features/android/resolve_config.prf b/mkspecs/features/android/resolve_config.prf
new file mode 100644
index 0000000000..5f0c166f84
--- /dev/null
+++ b/mkspecs/features/android/resolve_config.prf
@@ -0,0 +1,29 @@
+load(resolve_config)
+
+!equals(TEMPLATE, aux):!host_build:!single_arch:!java:!single_android_abi:android {
+ isEmpty(ANDROID_ABIS): ANDROID_ABIS = $$ALL_ANDROID_ABIS
+
+ ALL_ABIS = $$join(ANDROID_ABIS, _and_)
+ CONFIG += $$ALL_ABIS build_all
+ addExclusiveBuildsProper($$ALL_ABIS, $$ANDROID_ABIS)
+ unset(ALL_ABIS)
+ CONFIG += multi_android_abi
+}
+
+# single_arch is set qtConfTest_compile and is a marker that a config test is being built, and
+# thus all Android ABI file name modifications should be avoided (prefix / suffix of
+# the built binary).
+# single_android_abi means ANDROID_ABI only has one value
+# multi_android_abi means ANDROID_ABI has more than one value (Qt configured with 2+ arches)
+#
+# Assign $$ALL_ANDROID_ABIS to ANDROID_ABIS only if ANDROID_ABIS was not provided by the user
+# on the qmake command line and Qt was not configured with 2+ arches.
+#
+# Note that in config.tests, ANDROID_ABIS ends up being empty (due to !single_arch check) regardless
+# of how many ABIs Qt is configured with, which in turns causes the 'architectures' field in
+# in android-arch-deployment-settings.json be empty.
+!equals(TEMPLATE, aux):!host_build:!single_arch:!java:!multi_android_abi:android:isEmpty(ANDROID_ABIS) {
+ # Needed for the generated deployment-settings.json not to have an empty list
+ # of architectures.
+ ANDROID_ABIS = $$ALL_ANDROID_ABIS
+}
diff --git a/mkspecs/features/android/sdk.prf b/mkspecs/features/android/sdk.prf
index eee7ac2d5d..252c234e33 100644
--- a/mkspecs/features/android/sdk.prf
+++ b/mkspecs/features/android/sdk.prf
@@ -1,6 +1,6 @@
API_VERSION_TO_USE = $$(ANDROID_API_VERSION)
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = $$API_VERSION
-isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-16
+isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-33
ANDROID_JAR_FILE = $$ANDROID_SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar
!exists($$ANDROID_JAR_FILE) {
diff --git a/mkspecs/features/cmake_functions.prf b/mkspecs/features/cmake_functions.prf
index 1e6b05c78e..0c62b46af3 100644
--- a/mkspecs/features/cmake_functions.prf
+++ b/mkspecs/features/cmake_functions.prf
@@ -42,10 +42,17 @@ defineReplace(cmakeTargetPaths) {
}
defineReplace(cmakePortablePaths) {
+ SYSR = $$[QT_SYSROOT]
+ !isEmpty(SYSR): SYSR = ${CMAKE_SYSROOT}
variable = $$1
out =
for(v, variable) {
- out += $$[QT_SYSROOT]$$cmakeTargetPath($$v)
+ path = $$cmakeTargetPath($$v)
+ contains(path, /.*): \
+ sysroot_prefix = $$SYSR
+ else: \
+ sysroot_prefix = $$SYSR/
+ out += $${sysroot_prefix}$${path}
}
return ($$join(out, ";"))
}
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
index 934a18a924..af5ebeddd5 100644
--- a/mkspecs/features/configure.prf
+++ b/mkspecs/features/configure.prf
@@ -39,12 +39,6 @@ defineTest(qtCompileTest) {
# Disable qmake features which are typically counterproductive for tests
qmake_configs = "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\""
- # On WinRT we need to change the entry point as we cannot create windows
- # applications
- winrt {
- qmake_configs += " \"QMAKE_LFLAGS+=/ENTRY:main\""
- }
-
# Clean up after previous run
exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean")
diff --git a/mkspecs/features/coverage.prf b/mkspecs/features/coverage.prf
new file mode 100644
index 0000000000..5ae746f0b7
--- /dev/null
+++ b/mkspecs/features/coverage.prf
@@ -0,0 +1,13 @@
+# Coverage flags
+
+coverage_trace_pc_guard {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_COVERAGE_TRACE_PC_GUARD
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_COVERAGE_TRACE_PC_GUARD
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_COVERAGE_TRACE_PC_GUARD
+}
+
+coverage_source_based {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_COVERAGE_SOURCE_BASED
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_COVERAGE_SOURCE_BASED
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_COVERAGE_SOURCE_BASED
+}
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index c9910dda53..24ed125f12 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -26,6 +26,10 @@ contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND
CMAKE_OUT_DIR = $$MODULE_BASE_OUTDIR/lib/cmake
+internal_module {
+ MODULE = "$${MODULE}_private"
+}
+
# Core, Network, an external module named Foo
CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE})
@@ -34,10 +38,23 @@ CMAKE_INCLUDE_NAME = $$eval(QT.$${MODULE}.name)
# TARGET here is the one changed at the end of qt_module.prf,
# which already contains the Qt5 prefix and QT_LIBINFIX suffix :
-# Qt5Core_suffix, Qt5Network_suffix, Foo_suffix
-# (or QtCore_suffix, Foo_suffix on macos with -framework)
+# Qt5Core_{libinfix_suffix}, Qt5Network_{libinfix_suffix}, Foo_{libinfix_suffix}
+# (or QtCore_{libinfix_suffix}, Foo_{libinfix_suffix} on macos with -framework).
CMAKE_QT_STEM = $${TARGET}
+# ANDROID_ABI is set by the android toolchain file, see https://developer.android.com/ndk/guides/cmake
+android: CMAKE_QT_STEM = $$replace(CMAKE_QT_STEM, "_$${QT_ARCH}", '_\$\{ANDROID_ABI\}')
+
+# On macOS when building just a debug configuration which is not part of debug_and_release,
+# $${TARGET} already contains a _debug suffix, as per the following call chain:
+# qt_module.prf -> qt5LibraryTarget -> qtLibraryTarget -> qtPlatformTargetSuffix.
+# Remove the _debug suffix in the stem, to keep all further uses of CMAKE_QT_STEM consistent.
+# The _debug suffix is then re-added where needed regardless if it's a debug_and_release build
+# or just debug.
+darwin:!qt_framework:!debug_and_release:CONFIG(debug, debug|release) {
+ CMAKE_QT_STEM = $$replace(CMAKE_QT_STEM, _debug$, )
+}
+
!generated_privates {
isEmpty(SYNCQT.INJECTED_PRIVATE_HEADER_FILES):isEmpty(SYNCQT.PRIVATE_HEADER_FILES): \
CMAKE_NO_PRIVATE_INCLUDES = true
@@ -102,6 +119,10 @@ win32:!static:!staticlib {
static|staticlib:CMAKE_STATIC_TYPE = true
+internal_module {
+ CMAKE_INTERNAL_MODULE = true
+}
+
CMAKE_DEBUG_TYPE =
CMAKE_RELEASE_TYPE =
@@ -120,64 +141,123 @@ CMAKE_RELEASE_TYPE =
# the debug libraries at build time.
equals(QMAKE_HOST.os, Windows): CMAKE_BIN_SUFFIX = ".exe"
-if(build_all|CONFIG(debug, debug|release)): CMAKE_DEBUG_TYPE = debug
-if(build_all|CONFIG(release, debug|release)): CMAKE_RELEASE_TYPE = release
+if(debug_and_release:build_all)|CONFIG(debug, debug|release): CMAKE_DEBUG_TYPE = debug
+if(debug_and_release:build_all)|CONFIG(release, debug|release): CMAKE_RELEASE_TYPE = release
+
+# CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties
+# functions whether a Configuration specific generator expression needs to be added to the values
+# of INTERFACE_LINK_LIBRARIES and INTERFACE_LINK_OPTIONS. For debug_and_release builds, we do need
+# configuration specific values. For singular builds (only release or only debug), we want the
+# values to be applied regardless of the configuration.
+# This would allow on Linux and macOS (and with a recent enough version of CMake on Windows) to
+# build a Debug configuration of an application, even if Qt was built in a Release configuration.
+#
+# All IMPORTED_LOCATION_<CONFIG> paths are automatically considered by CMake if there is no
+# <CONFIG> equivalent to the value specified by CMAKE_BUILD_TYPE.
+# This means that when Qt was built in a Release configuration, and the application in a Debug
+# configuration, IMPORTED_LOCATION_RELEASE will be used for the Qt libraries.
+#
+# Note that we need to check for the "debug_and_release" feature, and not the CONFIG value, because
+# the CONFIG value is always set to true on Windows in msvc-desktop.conf disregarding whether the
+# configure line specified just -debug or just -release.
+# This also means that if a user configures and builds Qt with -release, and then calls nmake debug
+# to build debug libraries of Qt, the generated CMake file won't know about debug libraries,
+# and will always link against the release libraries.
+qtConfig(debug_and_release) {
+ CMAKE_DEBUG_AND_RELEASE = TRUE
+} else {
+ CMAKE_DEBUG_AND_RELEASE = FALSE
+}
contains(CONFIG, plugin) {
- !isEmpty(PLUGIN_EXTENDS):!equals(PLUGIN_EXTENDS, -) {
- count(PLUGIN_EXTENDS, 1, greaterThan): \
- error("Plugin declares to extend multiple modules. We don't handle that ...")
- PLUGIN_MODULE_NAME = $$PLUGIN_EXTENDS
+ equals(PLUGIN_EXTENDS, -) {
+ CMAKE_PLUGIN_EXTENDS = -
} else {
- PLUGIN_MODULE_NAME =
- for (mod, QT_MODULES) {
- contains(QT.$${mod}.plugin_types, $$PLUGIN_TYPE) {
- !isEmpty(PLUGIN_MODULE_NAME): \
- error("Multiple modules claim plugin type '$$PLUGIN_TYPE' ($$mod, in addition to $$PLUGIN_MODULE_NAME)")
- PLUGIN_MODULE_NAME = $$mod
- break()
- }
+ list_plugin_extends =
+ for (p, PLUGIN_EXTENDS) {
+ m = $$cmakeModuleName($$p)
+ list_plugin_extends += Qt::$$m
+ }
+ CMAKE_PLUGIN_EXTENDS = $$join(list_plugin_extends, ";")
+ }
+
+ PLUGIN_MODULE_NAME =
+ unique_qt_modules = $$unique(QT_MODULES) # In case modules appear in multiple places
+ for (mod, unique_qt_modules) {
+ contains(QT.$${mod}.plugin_types, $$PLUGIN_TYPE) {
+ !isEmpty(PLUGIN_MODULE_NAME): \
+ error("Multiple modules claim plugin type '$$PLUGIN_TYPE' ($$mod, in addition to $$PLUGIN_MODULE_NAME)")
+ PLUGIN_MODULE_NAME = $$mod
}
- isEmpty(PLUGIN_MODULE_NAME): error("No module claims plugin type '$$PLUGIN_TYPE'")
}
+ isEmpty(PLUGIN_MODULE_NAME): error("No module claims plugin type '$$PLUGIN_TYPE'")
+
+ sorted_deps = $$sort_depends(QT_PLUGIN.$${CMAKE_QT_STEM}.DEPENDS, QT.)
+ mod_deps =
+ lib_deps =
+ aux_mod_deps =
+ aux_lib_deps =
+ for (dep, sorted_deps) {
+ cdep = $$cmakeModuleName($$dep)
+ mod_deps += $$cdep
+ lib_deps += Qt5::$$cdep
+ }
+ CMAKE_PLUGIN_MODULE_DEPS = $$join(mod_deps, ";")
+ CMAKE_PLUGIN_QT5_MODULE_DEPS = $$join(lib_deps, ";")
CMAKE_MODULE_NAME = $$cmakeModuleName($$PLUGIN_MODULE_NAME)
CMAKE_PLUGIN_NAME = $$PLUGIN_CLASS_NAME
+ CMAKE_PLUGIN_TYPE = $$PLUGIN_TYPE
+ CMAKE_PLUGIN_TYPE_ESCAPED = $$replace(PLUGIN_TYPE, [-/], _)
win32 {
+ !mingw|qtConfig(debug_and_release): debug_suffix="d"
+
+ CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl
+ CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl
+
isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.dll
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.dll
+ CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll
+ CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.dll
} else:mingw {
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}.a
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}d.a
+ CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a
+ CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}$${debug_suffix}.a
} else { # MSVC static
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.lib
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.lib
+ CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib
+ CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.lib
}
} else {
mac {
- isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .dylib
- else: CMAKE_PlUGIN_EXT = .a
+ isEmpty(CMAKE_STATIC_TYPE): CMAKE_PLUGIN_EXT = .dylib
+ else: CMAKE_PLUGIN_EXT = .a
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}$${CMAKE_PLUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}_debug$${CMAKE_PLUGIN_EXT}
+ CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.prl
+ CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}_debug.prl
} else {
- isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .so
- else: CMAKE_PlUGIN_EXT = .a
+ isEmpty(CMAKE_STATIC_TYPE): CMAKE_PLUGIN_EXT = .so
+ else: CMAKE_PLUGIN_EXT = .a
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}$${CMAKE_PLUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}$${CMAKE_PLUGIN_EXT}
+ CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.prl
+ CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.prl
}
}
cmake_target_file.input = $$PWD/data/cmake/Qt5PluginTarget.cmake.in
cmake_target_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}.cmake
+ cmake_qt5_plugin_import_file.input = $$PWD/data/cmake/Qt5ImportPlugin.cpp.in
+ cmake_qt5_plugin_import_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}_Import.cpp
- !build_pass:QMAKE_SUBSTITUTES += \
- cmake_target_file
+ !build_pass {
+ QMAKE_SUBSTITUTES += cmake_target_file
+ static|staticlib: QMAKE_SUBSTITUTES += cmake_qt5_plugin_import_file
+ }
cmake_qt5_plugin_file.files = $$cmake_target_file.output
+ static|staticlib: cmake_qt5_plugin_file.files += $$cmake_qt5_plugin_import_file.output
cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
INSTALLS += cmake_qt5_plugin_file
@@ -208,21 +288,27 @@ CMAKE_MODULE_DEPS = $$join(mod_deps, ";")
CMAKE_QT5_MODULE_DEPS = $$join(lib_deps, ";")
CMAKE_INTERFACE_MODULE_DEPS = $$join(aux_mod_deps, ";")
CMAKE_INTERFACE_QT5_MODULE_DEPS = $$join(aux_lib_deps, ";")
+CMAKE_MODULE_PLUGIN_TYPES = $$join(QT.$${MODULE}.plugin_types, ";")
+
+# Interface libraries have to have all properties starting with "INTERFACE_".
+CMAKE_FEATURE_PROPERTY_PREFIX = ""
+equals(TEMPLATE, aux): CMAKE_FEATURE_PROPERTY_PREFIX = "INTERFACE_"
mac {
!isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.a
+ CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
- CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.prl
+ CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.prl
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
} else {
qt_framework {
+ # Intentionally there is no '_debug' infix for framework builds.
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
CMAKE_BUILD_IS_FRAMEWORK = "true"
} else {
- CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.$$eval(QT.$${MODULE}.VERSION).dylib
+ CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.$$eval(QT.$${MODULE}.VERSION).dylib
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$$eval(QT.$${MODULE}.VERSION).dylib
}
}
@@ -230,39 +316,30 @@ mac {
CMAKE_WINDOWS_BUILD = "true"
CMAKE_FIND_OTHER_LIBRARY_BUILD = "true"
- CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.dll
+ !mingw|qtConfig(debug_and_release): debug_suffix="d"
+
+ CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.dll
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
+ !isEmpty(CMAKE_STATIC_TYPE) {
+ CMAKE_STATIC_WINDOWS_BUILD = "true"
+
+ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.prl
+ CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
+ }
+
mingw {
- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}$${debug_suffix}.a
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
- !isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_STATIC_WINDOWS_BUILD = "true"
- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a
- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
-
- CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl
- CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
- } else {
- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a
- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
- }
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.a
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
} else {
- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}$${debug_suffix}.lib
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib
- !isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_STATIC_WINDOWS_BUILD = "true"
- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib
- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
-
- CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl
- CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
- } else {
- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib
- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
- }
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.lib
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
}
} else {
!isEmpty(CMAKE_STATIC_TYPE) {
@@ -331,7 +408,7 @@ cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
# Other modules should either create proper tests in tests/auto/cmake or, as
# a temporary measure, disable the generation of cmake files
# with 'CONFIG -= create_cmake'
-!equals(CMAKE_MODULE_TESTS, -) {
+!internal_module:!equals(CMAKE_MODULE_TESTS, -) {
isEmpty(CMAKE_MODULE_TESTS): CMAKE_MODULE_TESTS = $$MODULE_BASE_INDIR/tests/auto/cmake
!exists($$CMAKE_MODULE_TESTS): \
error("Missing CMake tests. Either create tests in tests/auto/cmake," \
diff --git a/mkspecs/features/ctest_testcase_common.prf b/mkspecs/features/ctest_testcase_common.prf
index ea90bf89cd..7215b2d465 100644
--- a/mkspecs/features/ctest_testcase_common.prf
+++ b/mkspecs/features/ctest_testcase_common.prf
@@ -48,7 +48,6 @@ for (dep, dependentmodules): \
dependentmodules = $$join(mod_deps, ";")
QT_FOR_CONFIG += gui-private
-qtHaveModule(gui):qtConfig(angle): CMAKE_GL_DEFINES = -DQT_WITH_ANGLE=True
qtHaveModule(gui):!qtConfig(egl): CMAKE_GL_DEFINES += -DNO_EGL=True
CMAKE_MODULE_VERSIONS =
diff --git a/mkspecs/features/data/cmake/ExtraSourceIncludes.cmake.in b/mkspecs/features/data/cmake/ExtraSourceIncludes.cmake.in
deleted file mode 100644
index ec8075f3f7..0000000000
--- a/mkspecs/features/data/cmake/ExtraSourceIncludes.cmake.in
+++ /dev/null
@@ -1,7 +0,0 @@
-
-list(APPEND _Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
- $$CMAKE_SOURCE_INCLUDES
-)
-set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
- $$CMAKE_SOURCE_PRIVATE_INCLUDES
-)
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
deleted file mode 100644
index c729892889..0000000000
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ /dev/null
@@ -1,377 +0,0 @@
-
-if (CMAKE_VERSION VERSION_LESS 3.1.0)
- message(FATAL_ERROR \"Qt 5 $${CMAKE_MODULE_NAME} module requires at least CMake version 3.1.0\")
-endif()
-
-!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
-!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
-!!ELSE
-get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
-# Use original install prefix when loaded through a
-# cross-prefix symbolic link such as /lib -> /usr/lib.
-get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)
-get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH)
-if(_realCurr STREQUAL _realOrig)
- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE)
-else()
- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
-endif()
-unset(_realOrig)
-unset(_realCurr)
-unset(_IMPORT_PREFIX)
-!!ENDIF
-!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
-get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
-!!ELSE
-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
-!!ENDIF
-
-!!IF !equals(TEMPLATE, aux)
-# For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead.
-set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.VERSION)")
-
-set(Qt5$${CMAKE_MODULE_NAME}_LIBRARIES Qt5::$${CMAKE_MODULE_NAME})
-!!ENDIF // TEMPLATE != aux
-
-macro(_qt5_$${CMAKE_MODULE_NAME}_check_file_exists file)
- if(NOT EXISTS \"${file}\" )
- message(FATAL_ERROR \"The imported target \\\"Qt5::$${CMAKE_MODULE_NAME}\\\" references the file
- \\\"${file}\\\"
-but this file does not exist. Possible reasons include:
-* The file was deleted, renamed, or moved to another location.
-* An install or uninstall procedure did not complete successfully.
-* The installation package was faulty and contained
- \\\"${CMAKE_CURRENT_LIST_FILE}\\\"
-but not all the files it references.
-\")
- endif()
-endmacro()
-
-!!IF !equals(TEMPLATE, aux)
-macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
-
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
-!!ELSE
- set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
-!!ENDIF
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
-!!IF !isEmpty(CMAKE_LIB_SONAME)
- \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
-!!ENDIF
- # For backward compatibility with CMake < 2.8.12
- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
- )
-
-!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
-!!ELSE
- set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
-!!ENDIF
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib})
- if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib}
- )
- endif()
-!!ENDIF
-endmacro()
-!!ENDIF
-
-if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
-
-!!IF !no_module_headers
-!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework\"
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\"
- )
-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
- )
-!!ELSE
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
-!!ENDIF
-!!ELSE
-!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\")
-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
- )
-!!ELSE
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
-!!ENDIF
-!!ELSE
- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_INCLUDE_DIR}$${CMAKE_INCLUDE_NAME}\")
-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
- \"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
- \"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
- )
-!!ELSE
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
-!!ENDIF
-!!ENDIF
-!!ENDIF
-!!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS)
- include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL)
-!!ENDIF
-!!ELSE
- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"\")
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
-!!ENDIF
-
- foreach(_dir ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${_dir})
- endforeach()
-
-!!IF isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
- # Only check existence of private includes if the Private component is
- # specified.
- list(FIND Qt5$${CMAKE_MODULE_NAME}_FIND_COMPONENTS Private _check_private)
- if (NOT _check_private STREQUAL -1)
- foreach(_dir ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS})
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${_dir})
- endforeach()
- endif()
-!!ENDIF
-
-!!IF !equals(TEMPLATE, aux)
- set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
-
- set(Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS -D$${MODULE_DEFINE})
- set(Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS $${MODULE_DEFINES})
-!!ENDIF // TEMPLATE != aux
- set(_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_MODULE_DEPS}\")
-
-!!IF !isEmpty(CMAKE_INTERFACE_MODULE_DEPS)
- list(APPEND _Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_INTERFACE_MODULE_DEPS}\")
-!!ENDIF
-
- set(Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS})
-
- set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED)
- if (Qt5$${CMAKE_MODULE_NAME}_FIND_REQUIRED)
- set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED REQUIRED)
- endif()
- set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_QUIET)
- if (Qt5$${CMAKE_MODULE_NAME}_FIND_QUIETLY)
- set(_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET QUIET)
- endif()
- set(_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT)
- if (Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT)
- set(_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT EXACT)
- endif()
-
-!!IF !equals(TEMPLATE, aux)
- set(Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS \"\")
-!!ENDIF // TEMPLATE != aux
-
- foreach(_module_dep ${_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES})
- if (NOT Qt5${_module_dep}_FOUND)
- find_package(Qt5${_module_dep}
- $$VERSION ${_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT}
- ${_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET}
- ${_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED}
- PATHS \"${CMAKE_CURRENT_LIST_DIR}/..\" NO_DEFAULT_PATH
- )
- endif()
-
- if (NOT Qt5${_module_dep}_FOUND)
- set(Qt5$${CMAKE_MODULE_NAME}_FOUND False)
- return()
- endif()
-
-!!IF !equals(TEMPLATE, aux)
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"${Qt5${_module_dep}_INCLUDE_DIRS}\")
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"${Qt5${_module_dep}_PRIVATE_INCLUDE_DIRS}\")
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS ${Qt5${_module_dep}_DEFINITIONS})
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS ${Qt5${_module_dep}_COMPILE_DEFINITIONS})
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS ${Qt5${_module_dep}_EXECUTABLE_COMPILE_FLAGS})
-!!ENDIF // TEMPLATE != aux
- endforeach()
-!!IF !equals(TEMPLATE, aux)
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS)
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS)
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS)
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
-!!ENDIF // TEMPLATE != aux
-
- set(_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_QT5_MODULE_DEPS}\")
-
-!!IF !isEmpty(CMAKE_INTERFACE_QT5_MODULE_DEPS)
- list(APPEND _Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_INTERFACE_QT5_MODULE_DEPS}\")
-!!ENDIF
-
-!!IF !isEmpty(CMAKE_STATIC_TYPE)
- add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
-!!ELSE
-!!IF equals(TEMPLATE, aux)
- add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
-!!ELSE
- add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED)
-!!ENDIF
-!!ENDIF
-!!IF !equals(TEMPLATE, aux)
-!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
-!!ENDIF
-!!ENDIF // TEMPLATE != aux
-
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
- INTERFACE_INCLUDE_DIRECTORIES ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
- INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINES})
-
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_ENABLED_FEATURES $$join(QT.$${MODULE}.enabled_features, ";"))
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_DISABLED_FEATURES $$join(QT.$${MODULE}.disabled_features, ";"))
-
- set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE)
- foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS})
- if (NOT EXISTS ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR})
- set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST FALSE)
- endif()
- endforeach()
-
- if (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST)
- add_library(Qt5::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
- INTERFACE_INCLUDE_DIRECTORIES ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
- )
- set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS)
- foreach(dep ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES})
- if (TARGET ${dep}Private)
- list(APPEND _Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS ${dep}Private)
- endif()
- endforeach()
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
- INTERFACE_LINK_LIBRARIES Qt5::$${CMAKE_MODULE_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}
- )
- endif()
-
-!!IF !equals(TEMPLATE, aux)
-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
-!!ELSE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
-
-!!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
-!!IF isEmpty(CMAKE_DEBUG_TYPE)
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
- if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
-!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
- if (EXISTS
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
-!!ELSE
- \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
-!!ENDIF
- AND EXISTS
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ELSE
- \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ENDIF
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
- endif()
-!!ENDIF // CMAKE_DEBUG_TYPE
-!!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
-
-!!ENDIF // CMAKE_RELEASE_TYPE
-
-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
-!!ELSE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
-
-!!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
-!!IF isEmpty(CMAKE_RELEASE_TYPE)
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
- if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
-!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
- if (EXISTS
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
-!!ELSE
- \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
-!!ENDIF
- AND EXISTS
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ELSE
- \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ENDIF
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
- endif()
-!!ENDIF // CMAKE_RELEASE_TYPE
-!!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
-
-!!ENDIF // CMAKE_DEBUG_TYPE
-!!ELSE // TEMPLATE != aux
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- INTERFACE_LINK_LIBRARIES \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
- )
-!!ENDIF // TEMPLATE != aux
-
- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
-
- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
-
-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
-!!ELSE
- set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
-!!ENDIF
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
- set_target_properties(Qt5::${Plugin} PROPERTIES
- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
- )
- endmacro()
-
- if (pluginTargets)
- foreach(pluginTarget ${pluginTargets})
- include(${pluginTarget})
- endforeach()
- endif()
-
-
-!!IF !isEmpty(CMAKE_MODULE_EXTRAS)
- include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\")
-!!ENDIF
-
-!!IF !isEmpty(CMAKE_MODULE_MACROS)
- include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}Macros.cmake\")
-!!ENDIF
-
-_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake\")
-
-endif()
diff --git a/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in b/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in
deleted file mode 100644
index 7c42430e97..0000000000
--- a/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in
+++ /dev/null
@@ -1,11 +0,0 @@
-
-set(PACKAGE_VERSION $$CMAKE_PACKAGE_VERSION)
-
-if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
- set(PACKAGE_VERSION_COMPATIBLE FALSE)
-else()
- set(PACKAGE_VERSION_COMPATIBLE TRUE)
- if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
- set(PACKAGE_VERSION_EXACT TRUE)
- endif()
-endif()
diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
deleted file mode 100644
index 5baf0fdb10..0000000000
--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+++ /dev/null
@@ -1,11 +0,0 @@
-
-add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
-
-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
-!!ENDIF
-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
-!!ENDIF
-
-list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
diff --git a/mkspecs/features/data/dumpvcvars.bat b/mkspecs/features/data/dumpvcvars.bat
index 4721da2e39..fe9dfad585 100644
--- a/mkspecs/features/data/dumpvcvars.bat
+++ b/mkspecs/features/data/dumpvcvars.bat
@@ -1,30 +1,5 @@
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-::
:: Copyright (C) 2018 The Qt Company Ltd.
-:: Contact: https://www.qt.io/licensing/
-::
-:: This file is part of the tools applications of the Qt Toolkit.
-::
-:: $QT_BEGIN_LICENSE:GPL-EXCEPT$
-:: 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 https://www.qt.io/terms-conditions. For further
-:: information use the contact form at https://www.qt.io/contact-us.
-::
-:: GNU General Public License Usage
-:: Alternatively, this file may be used under the terms of the GNU
-:: General Public License version 3 as published by the Free Software
-:: Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-:: included in the packaging of this file. Please review the following
-:: information to ensure the GNU General Public License requirements will
-:: be met: https://www.gnu.org/licenses/gpl-3.0.html.
-::
-:: $QT_END_LICENSE$
-::
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
@echo off
diff --git a/mkspecs/features/data/mac/objc_namespace.sh b/mkspecs/features/data/mac/objc_namespace.sh
index ceff2df324..10ace4ff55 100755
--- a/mkspecs/features/data/mac/objc_namespace.sh
+++ b/mkspecs/features/data/mac/objc_namespace.sh
@@ -1,48 +1,11 @@
#!/bin/bash
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is the build configuration utility of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2017 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
script_argument_prefix="-Wobjc_namespace,--"
required_arguments="target suffix original_ld"
-optional_arguments="exclude_list exclude_regex slient"
+optional_arguments="exclude_list exclude_regex silent"
for argument in $required_arguments $optional_arguments; do
declare "$argument="
@@ -100,11 +63,13 @@ sanitize_address() {
echo "0x$address"
}
+arch_offset=0
read_binary() {
local address=$1
local length=$2
- dd if="$target" bs=1 iseek=$address count=$length 2>|/dev/null
+ seek=$(($address + $arch_offset))
+ dd if="$target" bs=1 iseek=$seek count=$length 2>|/dev/null
}
read_32bit_value() {
@@ -112,23 +77,23 @@ read_32bit_value() {
read_binary $address 4 | xxd -p | dd conv=swab 2>/dev/null | rev
}
-inspect_binary() {
- inspect_mode="$1"
+otool_args=
+otool() {
+ command otool $otool_args "$@"
+}
- echo -n "🔎 Inspecting binary '$target', "
- if [ ! -f "$target" ]; then
- echo "target does not exist!"
- exit 1
- fi
+declare -a extra_classnames_files
- read -a mach_header <<< "$(otool -h "$target" -v | tail -n 1)"
- if [ "${mach_header[1]}" != "X86_64" ]; then
- echo "binary is not 64-bit, only 64-bit binaries are supported!"
- exit 1
- fi
+inspect_binary() {
+ inspect_mode="$1"
classnames_section="__objc_classname"
classnames=$(otool -v -s __TEXT $classnames_section "$target" | tail -n +3)
+ if [ -z "$classnames" ]; then
+ echo " ℹ️ No Objective-C classes found in binary"
+ return 1
+ fi
+
while read -a classname; do
address=$(sanitize_address ${classname[0]})
name=${classname[1]}
@@ -138,21 +103,26 @@ inspect_binary() {
done <<< "$classnames"
extra_classnames_file="$(mktemp -t ${classnames_section}_additions).S"
+ extra_classnames_files+=("$extra_classnames_file")
if [ "$inspect_mode" == "inject_classnames" ]; then
- echo "class names have not been namespaced, adding suffix '$suffix'..."
+ echo " ℹ️ Class names have not been namespaced, adding suffix '$suffix'..."
printf ".section __TEXT,$classnames_section,cstring_literals,no_dead_strip\n" > $extra_classnames_file
elif [ "$inspect_mode" == "patch_classes" ]; then
- echo "found namespaced class names, updating class entries..."
+ echo " ℹ️ Found namespaced class names, updating class entries..."
+ fi
+
+ classes=$(otool -o -v "$target" | grep "OBJC_CLASS_RO\|OBJC_METACLASS_RO")
+ if [ -z "$classes" ]; then
+ echo " 💥 Failed to read class entries from binary"
+ exit 1
fi
- classes=$(otool -o -v "$target" | grep class_ro_t)
while read -a class; do
address="$(sanitize_address ${class[1]})"
-
class_flags="0x$(read_32bit_value $address)"
if [ -z "$class_flags" ]; then
- echo " 💥 failed to read class flags for class at $address"
+ echo " 💥 Failed to read class flags for class at $address"
continue
fi
@@ -161,13 +131,13 @@ inspect_binary() {
name_offset=$(($address + 24))
classname_address="0x$(read_32bit_value $name_offset)"
if [ -z "$classname_address" ]; then
- echo " 💥 failed to read class name address for class at $address"
+ echo " 💥 Failed to read class name address for class at $address"
continue
fi
classname=$(get_entry address_to_classname $classname_address)
if [ -z "$classname" ]; then
- echo " 💥 failed to resolve class name for address '$classname_address'"
+ echo " 💥 Failed to resolve class name for address '$classname_address'"
continue
fi
@@ -177,7 +147,7 @@ inspect_binary() {
else
class_type="class"
fi
- echo " 🚽 skipping excluded $class_type '$classname'"
+ echo " 🚽 Skipping excluded $class_type '$classname'"
continue
fi
@@ -188,13 +158,13 @@ inspect_binary() {
continue
fi
- echo " 💉 injecting $classnames_section entry '$newclassname' for '$classname'"
+ echo " 💉 Injecting $classnames_section entry '$newclassname' for '$classname'"
printf ".asciz \"$newclassname\"\n" >> $extra_classnames_file
elif [ "$inspect_mode" == "patch_classes" ]; then
newclassname_address=$(get_entry classname_to_address ${newclassname})
if [ -z "$newclassname_address" ]; then
- echo " 💥 failed to resolve class name address for class '$newclassname'"
+ echo " 💥 Failed to resolve class name address for class '$newclassname'"
continue
fi
@@ -204,7 +174,9 @@ inspect_binary() {
class_type="class"
fi
- echo " 🔨 patching class_ro_t at $address ($class_type) from $classname_address ($classname) to $newclassname_address ($newclassname)"
+ name_offset=$(($name_offset + $arch_offset))
+
+ echo " 🔨 Patching class_ro_t at $address ($class_type) from $classname_address ($classname) to $newclassname_address ($newclassname)"
echo ${newclassname_address: -8} | rev | dd conv=swab 2>/dev/null | xxd -p -r -seek $name_offset -l 4 - "$target"
fi
done <<< "$classes"
@@ -213,10 +185,43 @@ inspect_binary() {
echo "🔩 Linking binary using '$original_ld'..."
link_binary
-inspect_binary inject_classnames
+echo "🔎 Inspecting binary '$target'..."
+if [ ! -f "$target" ]; then
+ echo " 💥 Target does not exist!"
+ exit 1
+fi
-echo "🔩 Re-linking binary with extra __objc_classname section..."
-link_binary $extra_classnames_file
+read -a mach_header <<< "$(otool -h "$target" -v | tail -n 1)"
+if [ "${mach_header[0]}" != "MH_MAGIC_64" ]; then
+ echo " 💥 Binary is not 64-bit, only 64-bit binaries are supported!"
+ exit 1
+fi
+
+architectures=$(otool -f -v "$target" | grep architecture)
+
+setup_arch() {
+ arch="$1"
+ if [ ! -z "$arch" ]; then
+ otool_args="-arch $arch"
+ offset=$(otool -f -v "$target" | grep -A 6 "architecture $arch" | grep offset)
+ offset="${offset##*( )}"
+ arch_offset="$(echo $offset | cut -d ' ' -f 2)"
+ echo "🤖 Processing architecture '$arch' at offset $arch_offset..."
+ fi
+}
+
+while read -a arch; do
+ setup_arch "${arch[1]}"
+ inspect_binary inject_classnames
+ if [ $? -ne 0 ]; then
+ exit
+ fi
+done <<< "$architectures"
-inspect_binary patch_classes
+echo "🔩 Re-linking binary with extra __objc_classname section(s)..."
+link_binary "${extra_classnames_files[@]}"
+while read -a arch; do
+ setup_arch "${arch[1]}"
+ inspect_binary patch_classes
+done <<< "$architectures"
diff --git a/mkspecs/features/data/testserver/Dockerfile b/mkspecs/features/data/testserver/Dockerfile
new file mode 100644
index 0000000000..a20d289d3f
--- /dev/null
+++ b/mkspecs/features/data/testserver/Dockerfile
@@ -0,0 +1,29 @@
+# This Dockerfile is used to provision the shared scripts (e.g. startup.sh) and configurations. It
+# relies on the arguments passed by docker-compose file to build additional images for each service.
+# To lean more how it works, please check the topic "Use multi-stage builds".
+# https://docs.docker.com/develop/develop-images/multistage-build/
+
+ARG provisioningImage
+FROM $provisioningImage as testserver_tier2
+
+# Add and merge the testdata into service folder
+ARG serviceDir
+ARG shareDir=$serviceDir
+COPY $serviceDir $shareDir service/
+
+# create the shared script of testserver
+RUN echo "#!/usr/bin/env bash\n" \
+ "set -ex\n" \
+ "for RUN_CMD; do \$RUN_CMD; done\n" \
+ "service dbus restart\n" \
+ "service avahi-daemon restart\n" \
+ "sleep infinity\n" > startup.sh
+RUN chmod +x startup.sh
+
+# rewrite the default configurations of avahi-daemon
+# Disable IPv6 of avahi-daemon to resolve the unstable connections on Windows
+ARG test_domain
+RUN sed -i -e "s,#domain-name=local,domain-name=${test_domain:-test-net.qt.local}," \
+ -e "s,#publish-aaaa-on-ipv4=yes,publish-aaaa-on-ipv4=no," \
+ -e "s,use-ipv6=yes,use-ipv6=no," \
+ /etc/avahi/avahi-daemon.conf
diff --git a/mkspecs/features/data/testserver/docker-compose-common.yml b/mkspecs/features/data/testserver/docker-compose-common.yml
new file mode 100644
index 0000000000..58282c1273
--- /dev/null
+++ b/mkspecs/features/data/testserver/docker-compose-common.yml
@@ -0,0 +1,38 @@
+version: '2.1'
+
+# This is a template docker-compose file shared with all modules. It is based
+# on 'extending services' feature of compose file version 2.1.
+# See https://docs.docker.com/compose/extends/#extending-services for details.
+#
+# Example: testserver/docker-compose.yml
+# services:
+# foo:
+# extends:
+# file: ${SHARED_DATA}/docker-compose-common.yml
+# service: ${SHARED_SERVICE}
+# container_name: qt-test-server-foo
+# hostname: ${HOST_NAME:-foo}
+# build:
+# context: .
+# args:
+# provisioningImage: qt-test-server-foo:537fe302f61851d1663...
+# serviceDir: ./foo
+# command: service/foo.sh
+
+x-services:
+ &default-service
+ domainname: ${TEST_DOMAIN}
+ build:
+ context: .
+ dockerfile: ${SHARED_DATA}/Dockerfile
+ args:
+ test_domain: ${TEST_DOMAIN}
+ entrypoint: ./startup.sh
+
+services:
+ bridge-network: *default-service
+ host-network:
+ << : *default-service
+ network_mode: "host"
+ extra_hosts:
+ - "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
diff --git a/mkspecs/features/data/unix/findclasslist.pl b/mkspecs/features/data/unix/findclasslist.pl
deleted file mode 100644
index b74b8b6a58..0000000000
--- a/mkspecs/features/data/unix/findclasslist.pl
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env perl
-#############################################################################
-##
-## Copyright (C) 2016 Intel Corporation.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the build configuration tools of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-use strict;
-my $syntax = "findclasslist.pl\n" .
- "Replaces each \@FILE:filename\@ in stdin with the classes found in that file\n";
-
-$\ = $/;
-while (<STDIN>) {
- chomp;
- unless (/\@FILE:(.*)\@/) {
- print;
- next;
- }
-
- # Replace this line with the class list
- open HDR, "<$1" or die("Could not open header $1: $!");
- my $comment = " /* $1 */";
- while (my $line = <HDR>) {
- # Match a struct or class declaration, but not a forward declaration
- $line =~ /^(?:struct|class|namespace) (?:Q_.*_EXPORT)? (\w+)(?!;)/ or next;
- print $comment if $comment;
- printf " *%d%s*;\n", length $1, $1;
- $comment = 0;
- }
- close HDR;
-}
diff --git a/mkspecs/features/dbuscommon.pri b/mkspecs/features/dbuscommon.pri
index cadcd46d61..e567889f25 100644
--- a/mkspecs/features/dbuscommon.pri
+++ b/mkspecs/features/dbuscommon.pri
@@ -34,7 +34,7 @@ for(entry, DBUS_$${dbus_TYPE}S) {
for(subent, $$list($$unique(files))) {
!contains(subent, .*\\w\\.xml$) {
- warning("Invalid D-BUS $${dbus_type}: '$$subent', please use 'com.mydomain.myinterface.xml' instead.")
+ warning("Invalid D-Bus $${dbus_type}: '$$subent', please use 'com.mydomain.myinterface.xml' instead.")
next()
}
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index fbf1f3b8df..2be446e41e 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -64,11 +64,13 @@ debug {
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG
QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG
QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG
+ DEFINES += $$DEFINES_DEBUG
} else {
QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE
QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE
QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE
+ DEFINES += $$DEFINES_RELEASE
}
stack_protector_strong {
@@ -78,7 +80,9 @@ stack_protector_strong {
# disable special linker flags for host builds (no proper test for host support yet)
!host_build|!cross_compile {
+ use_bfd_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_BFD
use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
+ use_lld_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_LLD
enable_new_dtags: QMAKE_LFLAGS += $$QMAKE_LFLAGS_NEW_DTAGS
enable_gdb_index: QMAKE_LFLAGS += $$QMAKE_LFLAGS_GDB_INDEX
}
@@ -90,6 +94,10 @@ staticlib:unix {
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_STATIC_LIB
}
+defined(WINDOWS_TARGET_PLATFORM_VERSION, var):isEmpty(WINDOWS_TARGET_PLATFORM_MIN_VERSION) {
+ WINDOWS_TARGET_PLATFORM_MIN_VERSION = $$WINDOWS_TARGET_PLATFORM_VERSION
+}
+
incredibuild_xge {
CONFIG -= incredibuild_xge
CONFIG = incredibuild_xge $$CONFIG
@@ -114,22 +122,24 @@ breakpad {
}
c++17: CONFIG += c++1z
+c++20: CONFIG += c++2a
+c++latest: CONFIG *= c++2b c++2a c++1z c++14 c++11
-!c++11:!c++14:!c++1z {
- # Qt requires C++11 since 5.7, check if we need to force a compiler option
+!c++1z:!c++2a:!c++2b {
+ # Qt requires C++17
QT_COMPILER_STDCXX_no_L = $$replace(QT_COMPILER_STDCXX, "L$", "")
- !greaterThan(QT_COMPILER_STDCXX_no_L, 199711): CONFIG += c++11
+ !greaterThan(QT_COMPILER_STDCXX_no_L, 201402): CONFIG += c++1z
}
-c++11|c++14|c++1z {
+c++1z|c++2a|c++2b {
# Disable special compiler flags for host builds
!host_build|!cross_compile {
- c++1z: cxxstd = CXX1Z
- else: c++14: cxxstd = CXX14
- else: cxxstd = CXX11
+ c++2b: cxxstd = CXX2B
+ else:c++2a: cxxstd = CXX2A
+ else: cxxstd = CXX1Z
} else {
- # Fall back to c++11, because since 5.7 c++11 is required everywhere,
+ # Fall back to c++17, because C++17 is required everywhere,
# including host builds
- cxxstd = CXX11
+ cxxstd = CXX1Z
}
# Check if we should disable compiler extensions or not
@@ -145,7 +155,8 @@ c++11|c++14|c++1z {
unset(cxxstd)
}
-c99|c11 {
+c99|c11|c17|c18 {
+ c17|c18: cstd = C17
c11: cstd = C11
else: cstd = C99
@@ -158,7 +169,7 @@ c99|c11 {
unset(cstd)
}
-utf8_source {
+!no_utf8_source {
QMAKE_CFLAGS += $$QMAKE_CFLAGS_UTF8_SOURCE
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_UTF8_SOURCE
}
diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf
index 1c24bf071a..bad84b24f1 100644
--- a/mkspecs/features/default_pre.prf
+++ b/mkspecs/features/default_pre.prf
@@ -11,19 +11,4 @@ CONFIG = \
testcase_targets import_plugins import_qpa_plugin \
$$CONFIG
-!build_pass:!isEmpty(QT_LICHECK):!QTDIR_build {
- #
- # call license checker (but cache result for one day)
- #
- today = $$section(_DATE_, " ", 0, 2)
- !isEqual(QMAKE_LICHECK_TIMESTAMP, $$today) {
- !system("$$system_quote($$system_path($$[QT_HOST_BINS/src]/$$QT_LICHECK)) check" \
- "$$QT_RELEASE_DATE $$[QMAKE_SPEC] $$[QMAKE_XSPEC]"): \
- error("License check failed! Giving up ...")
-
- cache(QMAKE_LICHECK_TIMESTAMP, set stash, today)
- }
- unset(today)
-}
-
load(toolchain)
diff --git a/mkspecs/features/exclusive_builds.prf b/mkspecs/features/exclusive_builds.prf
index 1ff9a04d42..a41c5ab415 100644
--- a/mkspecs/features/exclusive_builds.prf
+++ b/mkspecs/features/exclusive_builds.prf
@@ -37,6 +37,9 @@ defineTest(addExclusiveBuilds) {
addExclusiveBuildsProper($$join(ARGS, _and_), $$ARGS)
}
-# Default directories to process
-QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR QGLTF_DIR DESTDIR TRACEGEN_DIR QMLCACHE_DIR LRELEASE_DIR
-QMAKE_DIR_REPLACE_SANE += QGLTF_DIR TRACEGEN_DIR QMLCACHE_DIR LRELEASE_DIR
+QMAKE_DEFAULT_DIRS_TO_PROCESS = QGLTF_DIR TRACEGEN_DIR QMLCACHE_DIR LRELEASE_DIR LEX_DIR YACC_DIR
+QMAKE_DIR_REPLACE_SANE += $$QMAKE_DEFAULT_DIRS_TO_PROCESS
+QMAKE_DIR_REPLACE = \
+ OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR DESTDIR \
+ $$QMAKE_DEFAULT_DIRS_TO_PROCESS
+unset(QMAKE_DEFAULT_DIRS_TO_PROCESS)
diff --git a/mkspecs/features/exclusive_builds_post.prf b/mkspecs/features/exclusive_builds_post.prf
index 936085af0b..a9c341a2d7 100644
--- a/mkspecs/features/exclusive_builds_post.prf
+++ b/mkspecs/features/exclusive_builds_post.prf
@@ -1,4 +1,6 @@
+load(qt_functions)
+
contains(TEMPLATE, subdirs) {
for(build, QMAKE_EXCLUSIVE_BUILDS) {
prepareRecursiveTarget($$build)
diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf
index f1f5e4c10c..ed003e7ac7 100644
--- a/mkspecs/features/java.prf
+++ b/mkspecs/features/java.prf
@@ -20,7 +20,16 @@ CONFIG += plugin no_plugin_name_prefix
javac.input = JAVASOURCES
javac.output = $$CLASS_DIR
javac.CONFIG += combine
-javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$system_path($$join(JAVACLASSPATH, $$DIRLIST_SEPARATOR))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN}
+
+# Check for user defined javac build version
+javac_target_version = $$ANDROID_JAVAC_TARGET_VERSION
+isEmpty(javac_target_version): javac_target_version = 8
+
+javac_source_version = $$ANDROID_JAVAC_SOURCE_VERSION
+isEmpty(javac_source_version): javac_source_version = 8
+
+javac.commands = javac -source $$javac_source_version -target $$javac_target_version -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$system_path($$join(JAVACLASSPATH, $$DIRLIST_SEPARATOR))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN}
+
# Force rebuild every time, because we don't know the paths of the destination files
# as they depend on the code.
javac.depends = FORCE
diff --git a/mkspecs/features/lex.prf b/mkspecs/features/lex.prf
index 7d8325bedb..ee06215103 100644
--- a/mkspecs/features/lex.prf
+++ b/mkspecs/features/lex.prf
@@ -2,37 +2,49 @@
# Lex extra-compiler for handling files specified in the LEXSOURCES variable
#
-{
- lex.name = Lex ${QMAKE_FILE_IN}
- lex.input = LEXSOURCES
- lex.dependency_type = TYPE_C
- lex_included {
- lex.CONFIG += no_link
- } else {
- lex.variable_out = GENERATED_SOURCES
- }
+isEmpty(LEX_DIR): LEX_DIR = .
- isEmpty(QMAKE_LEXFLAGS_MANGLE):QMAKE_LEXFLAGS_MANGLE = -P${QMAKE_FILE_BASE}
+defineReplace(lexCommands) {
+ input = $$relative_path($$absolute_path($$1, $$OUT_PWD), $$OUT_PWD/$$LEX_DIR)
+ output = $$basename(2)
+ input_base = $$basename(1)
+ input_base ~= s/\.[^.]*$//
+
+ isEmpty(QMAKE_LEXFLAGS_MANGLE): QMAKE_LEXFLAGS_MANGLE = -P$${input_base}
QMAKE_LEXEXTRAFLAGS = $$QMAKE_LEXFLAGS
- !yacc_no_name_mangle:QMAKE_LEXEXTRAFLAGS += $$QMAKE_LEXFLAGS_MANGLE
+ !yacc_no_name_mangle: QMAKE_LEXEXTRAFLAGS += $$QMAKE_LEXFLAGS_MANGLE
contains(QMAKE_LEX, .*flex) {
# GNU flex, we can use -o outfile
- lex.commands = $$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS --nounistd -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+ commands = $$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS --nounistd -o $$output $$input
} else {
# stupid POSIX lex, it only generates a file called lex.yy.c
# or lex.prefix.c if the -P<prefix> option is active
intermediate_file = lex.yy.c
QMAKE_LEXEXTRAFLAGS = $$QMAKE_LEXFLAGS $$QMAKE_LEXFLAGS_MANGLE
- lex.commands = \
- -$(DEL_FILE) ${QMAKE_FILE_OUT}$$escape_expand(\\n\\t) \
- $$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS ${QMAKE_FILE_IN}$$escape_expand(\\n\\t) \
- $(MOVE) $$intermediate_file ${QMAKE_FILE_OUT} $$escape_expand(\\n\\t)
- unset(intermediate_file)
+ commands = \
+ -$(DEL_FILE) $${output}$$escape_expand(\\n\\t) \
+ $$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS $${input}$$escape_expand(\\n\\t) \
+ $(MOVE) $$intermediate_file $$output $$escape_expand(\\n\\t)
+ }
+ !equals(LEX_DIR, .): \
+ commands = cd $$LEX_DIR && $$commands
+ silent: commands = @echo Lex $$1 && $$commands
+ return($$commands)
+}
+
+{
+ lex.name = Lex ${QMAKE_FILE_IN}
+ lex.input = LEXSOURCES
+ lex.dependency_type = TYPE_C
+ lex_included {
+ lex.CONFIG += no_link
+ } else {
+ lex.variable_out = GENERATED_SOURCES
}
- lex.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_LEX}$${first(QMAKE_EXT_CPP)}
- silent:lex.commands = @echo Lex ${QMAKE_FILE_IN} && $$lex.commands
+ lex.commands = ${QMAKE_FUNC_lexCommands}
+ lex.output = $$LEX_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_LEX}$${first(QMAKE_EXT_CPP)}
QMAKE_EXTRA_COMPILERS += lex
}
diff --git a/mkspecs/features/lrelease.prf b/mkspecs/features/lrelease.prf
index 1e828b64df..15d336d8e5 100644
--- a/mkspecs/features/lrelease.prf
+++ b/mkspecs/features/lrelease.prf
@@ -24,7 +24,7 @@ all_translations = $$TRANSLATIONS $$EXTRA_TRANSLATIONS
for (translation, all_translations) {
# mirrors $$LRELEASE_DIR/${QMAKE_FILE_IN_BASE}.qm above
translation = $$basename(translation)
- QM_FILES += $$OUT_PWD/$$LRELEASE_DIR/$$replace(translation, \\..*$, .qm)
+ QM_FILES += $$OUT_PWD/$$LRELEASE_DIR/$$replace(translation, \\.[^.]+$, .qm)
}
embed_translations {
qmake_qm_files.files = $$QM_FILES
@@ -35,6 +35,7 @@ embed_translations {
!isEmpty(QM_FILES_INSTALL_PATH) {
qm_files.files = $$QM_FILES
qm_files.path = $$QM_FILES_INSTALL_PATH
+ qm_files.CONFIG = no_check_exist
INSTALLS += qm_files
}
lrelease.CONFIG += target_predeps no_clean
diff --git a/mkspecs/features/ltcg.prf b/mkspecs/features/ltcg.prf
index f2dbc6fa9e..d81f340edd 100644
--- a/mkspecs/features/ltcg.prf
+++ b/mkspecs/features/ltcg.prf
@@ -1,8 +1,16 @@
-CONFIG(release, debug|release) {
+static:no-static-ltcg {
+ # Static library but no-static-ltcg enabled: skip LTCG
+} else: CONFIG(release, debug|release) {
+ separate_debug_info {
+ # Evaluate single-$ variable references that have no valid value at mkspec loading time
+ QMAKE_LFLAGS_LTCG_SEPARATE_DEBUG_INFO ~= s/\\$\\{/\$\$\{/
+ eval(QMAKE_LFLAGS_LTCG += $$QMAKE_LFLAGS_LTCG_SEPARATE_DEBUG_INFO)
+ }
+
# We need fat object files when creating static libraries on some platforms
# so the linker will know to load a particular object from the library
# in the first place. On others, we have special ar and nm to create the symbol
- # tables so the linker will know better. For other compilers, we disable LTCG
+ # tables so the linker will know better. For other compilers, we disable LTCG
# for static libraries.
msvc {
# Nothing to do
@@ -22,7 +30,7 @@ CONFIG(release, debug|release) {
}
}
- fat-lto {
+ fat-lto|if(static:fat-static-lto) {
QMAKE_CFLAGS_LTCG += $$QMAKE_CFLAGS_LTCG_FATOBJECTS
QMAKE_CXXFLAGS_LTCG += $$QMAKE_CXXFLAGS_LTCG_FATOBJECTS
}
diff --git a/mkspecs/features/mac/asset_catalogs.prf b/mkspecs/features/mac/asset_catalogs.prf
index 58211c13a2..1b9745a132 100644
--- a/mkspecs/features/mac/asset_catalogs.prf
+++ b/mkspecs/features/mac/asset_catalogs.prf
@@ -68,7 +68,7 @@
$$asset_catalog_app_icon_arg \
$$asset_catalog_launch_image_arg \
--output-partial-info-plist $$shell_quote($$asset_catalog_compiler.target) \
- --platform $${version_identifier} \
+ --platform $${platform_identifier} \
--minimum-deployment-target $${deployment_target} \
--compile $$shell_quote($$QMAKE_ASSET_CATALOGS_BUILD_PATH)
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index c46222debd..22c84d6473 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -1,31 +1,41 @@
load(default_post)
+# Recompute SDK version in case the user set it explicitly
+sdk_version = $$QMAKE_MAC_SDK_VERSION
+QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion)
+
contains(TEMPLATE, .*app) {
!macx-xcode:if(isEmpty(BUILDS)|build_pass) {
# Detect changes to the platform SDK
- QMAKE_EXTRA_VARIABLES += QMAKE_MAC_SDK QMAKE_MAC_SDK_VERSION QMAKE_XCODE_DEVELOPER_PATH
+ QMAKE_EXTRA_VARIABLES += \
+ QMAKE_MAC_SDK \
+ QMAKE_MAC_SDK_VERSION \
+ QMAKE_XCODE_DEVELOPER_PATH \
+ _QMAKE_STASH_ \
+
QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/sdk.mk)
}
# Detect incompatible SDK versions
+ # The CMake equivalent is in cmake/QtPublicAppleHelpers.cmake.
isEmpty(QT_MAC_SDK_VERSION_MIN): \
QT_MAC_SDK_VERSION_MIN = $$QT_MAC_SDK_VERSION
!versionAtLeast(QMAKE_MAC_SDK_VERSION, $$QT_MAC_SDK_VERSION_MIN): \
warning("Qt requires at least version $$QT_MAC_SDK_VERSION_MIN of the platform SDK," \
- "you're using $${QMAKE_MAC_SDK_VERSION}. Please upgrade.")
+ "you're building against version $${QMAKE_MAC_SDK_VERSION}. Please upgrade.")
!isEmpty(QT_MAC_SDK_VERSION_MAX) {
# For Qt developers only
!isEmpty($$list($$(QT_MAC_SDK_NO_VERSION_CHECK))): \
CONFIG += sdk_no_version_check
- QMAKE_MAC_SDK_MAJOR_MINOR_VERSION = $$replace(QMAKE_MAC_SDK_VERSION, "(\\d+)(\\.\\d+)(\\.\\d+)?", \\1\\2)
+ QMAKE_MAC_SDK_MAJOR_VERSION = $$replace(QMAKE_MAC_SDK_VERSION, "(\\d+)(\\.\\d+)(\\.\\d+)?", \\1)
- !sdk_no_version_check:!versionAtMost(QMAKE_MAC_SDK_MAJOR_MINOR_VERSION, $$QT_MAC_SDK_VERSION_MAX) {
+ !sdk_no_version_check:!versionAtMost(QMAKE_MAC_SDK_MAJOR_VERSION, $$QT_MAC_SDK_VERSION_MAX) {
warning("Qt has only been tested with version $$QT_MAC_SDK_VERSION_MAX"\
- "of the platform SDK, you're using $${QMAKE_MAC_SDK_MAJOR_MINOR_VERSION}.")
+ "of the platform SDK, you're using $${QMAKE_MAC_SDK_MAJOR_VERSION}.")
warning("This is an unsupported configuration. You may experience build issues," \
"and by using")
warning("the $$QMAKE_MAC_SDK_VERSION SDK you are opting in to new features" \
@@ -41,33 +51,11 @@ contains(TEMPLATE, .*app) {
!no_objective_c:CONFIG += objective_c
-qt {
- qtConfig(static) {
- # C++11 support means using libc++ instead of libstd++. As the
- # two libraries are incompatible we need to ensure the end user
- # project is built using the same C++11 support/no support as Qt.
- qtConfig(c++11) {
- CONFIG += c++11
- } else: c++11 {
- warning("Qt was not built with C++11 enabled, disabling feature")
- CONFIG -= c++11
- }
-
- !c++11 {
- # Explicitly use libstdc++ if C++11 support is not enabled,
- # as otherwise the compiler will choose the standard library
- # based on the deployment target, which for iOS 7 and OS X 10.9
- # is libc++, and we can't mix and match the two.
- QMAKE_CXXFLAGS += -stdlib=libstdc++
- QMAKE_LFLAGS += -stdlib=libstdc++
- }
- }
-}
-
# Add the same default rpaths as Xcode does for new projects.
# This is especially important for iOS/tvOS/watchOS where no other option is possible.
!no_default_rpath {
- QMAKE_RPATHDIR += @executable_path/../Frameworks
+ uikit: QMAKE_RPATHDIR += @executable_path/Frameworks
+ else: QMAKE_RPATHDIR += @executable_path/../Frameworks
equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks
}
@@ -85,6 +73,19 @@ app_extension_api_only {
QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
}
+macos {
+ !isEmpty(QMAKE_APPLE_DEVICE_ARCHS) {
+ # If the user has requested a specific set of architectures,
+ # build all of those by default, but limited to only those.
+ CONFIG -= only_active_arch
+ } else {
+ # Otherwise allow building all of the architectures available
+ # in Qt, but only build the active arch (unless the user has
+ # manually overridden this via CONFIG -= only_active_arch).
+ QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCHS
+ }
+}
+
macx-xcode {
qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO
!isEmpty(QMAKE_PKGINFO_TYPEINFO): \
@@ -93,21 +94,22 @@ macx-xcode {
qmake_pkginfo_typeinfo.value = "????"
QMAKE_MAC_XCODE_SETTINGS += qmake_pkginfo_typeinfo
- !isEmpty(VERSION) {
- l = $$split(VERSION, '.') 0 0 # make sure there are at least three
- VER_MAJ = $$member(l, 0, 0)
- VER_MIN = $$member(l, 1, 1)
- VER_PAT = $$member(l, 2, 2)
- unset(l)
+ bundle_version = $$VERSION
+ isEmpty(bundle_version): bundle_version = 1.0.0
- qmake_full_version.name = QMAKE_FULL_VERSION
- qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
- QMAKE_MAC_XCODE_SETTINGS += qmake_full_version
+ l = $$split(bundle_version, '.') 0 0 # make sure there are at least three
+ VER_MAJ = $$member(l, 0, 0)
+ VER_MIN = $$member(l, 1, 1)
+ VER_PAT = $$member(l, 2, 2)
+ unset(l)
- qmake_short_version.name = QMAKE_SHORT_VERSION
- qmake_short_version.value = $${VER_MAJ}.$${VER_MIN}
- QMAKE_MAC_XCODE_SETTINGS += qmake_short_version
- }
+ qmake_full_version.name = QMAKE_FULL_VERSION
+ qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
+ QMAKE_MAC_XCODE_SETTINGS += qmake_full_version
+
+ qmake_short_version.name = QMAKE_SHORT_VERSION
+ qmake_short_version.value = $${VER_MAJ}.$${VER_MIN}
+ QMAKE_MAC_XCODE_SETTINGS += qmake_short_version
!isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) {
debug_information_format.name = DEBUG_INFORMATION_FORMAT
@@ -118,12 +120,14 @@ macx-xcode {
QMAKE_XCODE_ARCHS =
- arch_device.name = "ARCHS[sdk=$${device.sdk}*]"
- arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS
- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS
- QMAKE_MAC_XCODE_SETTINGS += arch_device
+ !isEmpty(QMAKE_APPLE_DEVICE_ARCHS) {
+ arch_device.name = "ARCHS[sdk=$${device.sdk}*]"
+ arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS
+ QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS
+ QMAKE_MAC_XCODE_SETTINGS += arch_device
+ }
- simulator {
+ ios:simulator {
arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]"
arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS
QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS
@@ -136,18 +140,23 @@ macx-xcode {
QMAKE_MAC_XCODE_SETTINGS += only_active_arch
} else {
device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS
- simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS
+ ios:simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS
VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS
- isEmpty(VALID_ARCHS): \
- error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture")
-
single_arch: VALID_ARCHS = $$first(VALID_ARCHS)
- ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS))
- ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
+ macos {
+ only_active_arch: DEFAULT_ARCHS = $$system("uname -m")
+ else: DEFAULT_ARCHS = $$VALID_ARCHS
+ }
+
+ ARCHS = $(filter $(EXPORT_VALID_ARCHS), \
+ $(if $(ARCHS), $(ARCHS), \
+ $(if $(EXPORT_DEFAULT_ARCHS), $(EXPORT_DEFAULT_ARCHS), \
+ $(EXPORT_VALID_ARCHS))))
+ ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ARCHS), $(EXPORT_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
- QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS
+ QMAKE_EXTRA_VARIABLES += VALID_ARCHS DEFAULT_ARCHS ARCHS ARCH_ARGS
arch_flags = $(EXPORT_ARCH_ARGS)
@@ -170,7 +179,7 @@ macx-xcode {
# and makes it easier for people to override EXPORT_VALID_ARCHS to limit
# individual rules to a different set of architecture(s) from the overall
# build (such as machtest in QtCore).
- simulator:device {
+ ios:simulator:device {
QMAKE_XARCH_CFLAGS =
QMAKE_XARCH_LFLAGS =
QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS
@@ -179,9 +188,11 @@ macx-xcode {
contains(VALID_SIMULATOR_ARCHS, $$arch) {
sdk = $$simulator.sdk
version_identifier = $$simulator.deployment_identifier
+ platform_identifier = $$simulator.sdk
} else {
sdk = $$device.sdk
version_identifier = $$device.deployment_identifier
+ platform_identifier = $$device.sdk
}
version_min_flags = \
@@ -192,7 +203,7 @@ macx-xcode {
-isysroot$$xcodeSDKInfo(Path, $$sdk)
QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \
-Xarch_$${arch} \
- -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk)
+ -isysroot$$xcodeSDKInfo(Path, $$sdk)
QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch})
QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch})
@@ -206,14 +217,25 @@ macx-xcode {
QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS)
} else {
- simulator: \
+ ios:simulator {
version_identifier = $$simulator.deployment_identifier
- else: \
+ platform_identifier = $$simulator.sdk
+ sysroot_path = $$xcodeSDKInfo(Path, $$simulator.sdk)
+ } else {
version_identifier = $$device.deployment_identifier
- version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
- QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
- QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
- QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH $$version_min_flag
+ platform_identifier = $$device.sdk
+ sysroot_path = $$xcodeSDKInfo(Path, $$device.sdk)
+ }
+ QMAKE_CFLAGS += -isysroot $$sysroot_path
+ QMAKE_CXXFLAGS += -isysroot $$sysroot_path
+ QMAKE_LFLAGS += -isysroot $$sysroot_path
+
+ !isEmpty(version_identifier):!isEmpty(deployment_target) {
+ version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
+ QMAKE_CFLAGS += $$version_min_flag
+ QMAKE_CXXFLAGS += $$version_min_flag
+ QMAKE_LFLAGS += $$version_min_flag
+ }
}
# Enable precompiled headers for multiple architectures
@@ -244,6 +266,11 @@ macx-xcode {
QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT}
}
+!equals(sdk_version, $$QMAKE_MAC_SDK_VERSION) {
+ # Explicit SDK version has been set, respect that
+ QMAKE_LFLAGS += -Wl,-sdk_version -Wl,$$sdk_version
+}
+
cache(QMAKE_XCODE_DEVELOPER_PATH, stash)
!isEmpty(QMAKE_XCODE_VERSION): \
cache(QMAKE_XCODE_VERSION, stash)
@@ -261,7 +288,7 @@ xcode_product_bundle_identifier_setting.value = "$${xcode_product_bundle_identif
QMAKE_MAC_XCODE_SETTINGS += xcode_product_bundle_identifier_setting
!macx-xcode {
- generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode $(EXPORT__PRO_FILE_)
+ generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode \"$(EXPORT__PRO_FILE_)\" $$QMAKE_ARGS
generate_xcode_project.target = xcodeproj
QMAKE_EXTRA_VARIABLES += _PRO_FILE_
QMAKE_EXTRA_TARGETS += generate_xcode_project
diff --git a/mkspecs/features/mac/no_warn_empty_obj_files.prf b/mkspecs/features/mac/no_warn_empty_obj_files.prf
new file mode 100644
index 0000000000..598938ab12
--- /dev/null
+++ b/mkspecs/features/mac/no_warn_empty_obj_files.prf
@@ -0,0 +1,7 @@
+# Prevent warnings about object files without any symbols. This is a common
+# thing in Qt as we tend to build files unconditionally, and then use ifdefs
+# to compile out parts that are not relevant.
+QMAKE_RANLIB += -no_warning_for_no_symbols
+
+# We have to tell 'ar' to not run ranlib by itself
+QMAKE_AR += -S
diff --git a/mkspecs/features/mac/sdk.mk b/mkspecs/features/mac/sdk.mk
index c40f58c987..a32ceacb6c 100644
--- a/mkspecs/features/mac/sdk.mk
+++ b/mkspecs/features/mac/sdk.mk
@@ -1,6 +1,6 @@
ifeq ($(QT_MAC_SDK_NO_VERSION_CHECK),)
- CHECK_SDK_COMMAND = /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version 2>&1
+ CHECK_SDK_COMMAND = /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version 2>/dev/null
CURRENT_MAC_SDK_VERSION := $(shell DEVELOPER_DIR=$(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) $(CHECK_SDK_COMMAND))
ifneq ($(CURRENT_MAC_SDK_VERSION),$(EXPORT_QMAKE_MAC_SDK_VERSION))
# We don't want to complain about out of date SDK unless the target needs to be remade.
@@ -13,12 +13,14 @@ ifeq ($(QT_MAC_SDK_NO_VERSION_CHECK),)
else ifneq ($(findstring SDK "$(EXPORT_QMAKE_MAC_SDK)" cannot be located,$(CURRENT_MAC_SDK_VERSION)),)
$(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) no longer contains the $(EXPORT_QMAKE_MAC_SDK_VERSION) platform SDK.)
else ifneq ($(CURRENT_MAC_SDK_VERSION),)
- $(info The platform SDK has been changed from version $(EXPORT_QMAKE_MAC_SDK_VERSION) to version $(CURRENT_MAC_SDK_VERSION).)
+ $(info The $(EXPORT_QMAKE_MAC_SDK) platform SDK has been changed from version $(EXPORT_QMAKE_MAC_SDK_VERSION) to version $(CURRENT_MAC_SDK_VERSION).)
else
$(info Unknown error resolving current platform SDK version.)
endif
- $(info This requires a fresh build. Please wipe the build directory completely,)
- $(info including any .qmake.stash and .qmake.cache files generated by qmake.)
+ $(info This requires a fresh build of your project. Please wipe the build directory)
+ ifneq ($(EXPORT__QMAKE_STASH_),)
+ $(info including the qmake cache in $(EXPORT__QMAKE_STASH_))
+ endif
$(error ^)
endif
endif
diff --git a/mkspecs/features/metatypes.prf b/mkspecs/features/metatypes.prf
new file mode 100644
index 0000000000..d23b299403
--- /dev/null
+++ b/mkspecs/features/metatypes.prf
@@ -0,0 +1,64 @@
+qtPrepareLibExecTool(MOC_COLLECT_JSON, moc)
+
+QMAKE_MOC_OPTIONS += --output-json
+
+MOC_JSON_H_BASE = $${QMAKE_H_MOD_MOC}
+MOC_JSON_CPP_BASE = $${QMAKE_CPP_MOD_MOC}
+
+!isEmpty(MOC_DIR) {
+ MOC_JSON_H_BASE = $$MOC_DIR/$${MOC_JSON_H_BASE}
+ MOC_JSON_CPP_BASE = $$MOC_DIR/$${MOC_JSON_CPP_BASE}
+}
+
+moc_json_header.input = HEADERS
+moc_json_header.output = $${MOC_JSON_H_BASE}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}.json
+moc_json_header.CONFIG = no_link moc_verify
+moc_json_header.depends = $${MOC_JSON_H_BASE}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}
+moc_json_header.commands = $$escape_expand(\\n) # force creation of rule
+moc_json_header.variable_out = MOC_JSON_FILES
+
+moc_json_source.input = SOURCES
+moc_json_source.output = $${MOC_JSON_CPP_BASE}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}.json
+moc_json_source.CONFIG = no_link moc_verify
+moc_json_source.depends = $${MOC_JSON_CPP_BASE}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}
+moc_json_source.commands = $$escape_expand(\\n) # force creation of rule
+moc_json_source.variable_out = MOC_JSON_FILES
+
+# Add an empty JSON file so that the moc_collect_json rule is executed even if there are no files
+# to run moc on.
+!build_pass {
+ MOC_EMPTY_JSON = "[]"
+ MOC_EMPTY_JSON_FILE = $$OUT_PWD/$${MOC_JSON_H_BASE}$${first(QMAKE_EXT_CPP)}.json
+ write_file($${MOC_EMPTY_JSON_FILE}, MOC_EMPTY_JSON)
+ MOC_JSON_FILES += $${MOC_EMPTY_JSON_FILE}
+}
+
+TARGET_BASENAME = $$lower($$basename(TARGET))
+TARGET_BASENAME ~= s/\s/_/g
+
+MOC_COLLECT_JSON_OUTPUT = $${TARGET_BASENAME}_metatypes.json
+
+moc_collect_json.CONFIG += no_link combine target_predeps
+moc_collect_json.commands = $$MOC_COLLECT_JSON --collect-json -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+moc_collect_json.input = MOC_JSON_FILES
+moc_collect_json.output = $$MOC_COLLECT_JSON_OUTPUT
+moc_collect_json.name = Collect moc JSON output into central file
+
+install_metatypes {
+ do_install_metatypes.CONFIG += no_check_exist
+ do_install_metatypes.path = $$[QT_INSTALL_ARCHDATA]/metatypes
+ do_install_metatypes.files = $$OUT_PWD/$$MOC_COLLECT_JSON_OUTPUT
+ prefix_build {
+ load(qt_build_paths)
+ !isEmpty(MODULE_BASE_OUTDIR) {
+ metatypes_to_builddir.files = $$do_install_metatypes.files
+ metatypes_to_builddir.path = $$MODULE_BASE_OUTDIR/lib/metatypes
+ COPIES += metatypes_to_builddir
+ }
+ INSTALLS += do_install_metatypes
+ } else {
+ COPIES += do_install_metatypes
+ }
+}
+
+QMAKE_EXTRA_COMPILERS += moc_collect_json moc_json_header moc_json_source
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index d075183028..c5504b21b8 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -1,6 +1,6 @@
#global defaults
-qtPrepareTool(QMAKE_MOC, moc)
+qtPrepareLibExecTool(QMAKE_MOC, moc)
isEmpty(MOC_DIR):MOC_DIR = .
isEmpty(QMAKE_H_MOD_MOC):QMAKE_H_MOD_MOC = moc_
isEmpty(QMAKE_EXT_CPP_MOC):QMAKE_EXT_CPP_MOC = .moc
@@ -90,11 +90,13 @@ QMAKE_EXTRA_COMPILERS += moc_objc_header
INCREDIBUILD_XGE += moc_objc_header
#moc sources
+moc_sources = $$SOURCES
+precompile_header: moc_sources += $$NO_PCH_SOURCES
moc_source.CONFIG = no_link moc_verify
moc_source.dependency_type = TYPE_C
moc_source.commands = ${QMAKE_FUNC_mocCmdBase} ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
moc_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}
-moc_source.input = SOURCES
+moc_source.input = moc_sources
moc_source.name = MOC ${QMAKE_FILE_IN}
moc_source.depends += $$WIN_INCLUDETEMP $$moc_predefs.output
silent:moc_source.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_source.commands
diff --git a/mkspecs/features/permissions.prf b/mkspecs/features/permissions.prf
new file mode 100644
index 0000000000..ac5f2cb108
--- /dev/null
+++ b/mkspecs/features/permissions.prf
@@ -0,0 +1,40 @@
+
+isEmpty(QMAKE_INFO_PLIST): \
+ return()
+
+plist_path = $$absolute_path($$QMAKE_INFO_PLIST, $$_PRO_FILE_PWD_)
+
+!exists($$plist_path): \
+ return()
+
+for(plugin, QT_PLUGINS) {
+ !equals(QT_PLUGIN.$${plugin}.TYPE, permissions): \
+ next()
+
+ usage_descriptions = $$eval(QT_PLUGIN.$${plugin}.usage_descriptions)
+
+ found_usage_description = false
+ for(usage_description_key, usage_descriptions) {
+ usage_description = $$system("/usr/libexec/PlistBuddy" \
+ "-c 'print $$usage_description_key' $$plist_path 2>/dev/null", \
+ singleLine, exit_code)
+
+ !equals(exit_code, 0): \
+ next()
+
+ !isEmpty(usage_description) {
+ found_usage_description = true
+ break()
+ }
+ }
+
+ !$$found_usage_description: \
+ next()
+
+ request_flag = $$eval(QT_PLUGIN.$${plugin}.request_flag)
+
+ QTPLUGIN += $$plugin
+ QMAKE_LFLAGS += $$request_flag
+
+ QMAKE_INTERNAL_INCLUDED_FILES *= $$QMAKE_INFO_PLIST
+}
diff --git a/mkspecs/features/qlalr.prf b/mkspecs/features/qlalr.prf
index 54d8b583c6..cb12818e39 100644
--- a/mkspecs/features/qlalr.prf
+++ b/mkspecs/features/qlalr.prf
@@ -1,4 +1,4 @@
-qtPrepareTool(QMAKE_QLALR, qlalr)
+qtPrepareLibExecTool(QMAKE_QLALR, qlalr)
isEmpty(QLALR_DIR): QLALR_DIR = .
diff --git a/mkspecs/features/qmake_use.prf b/mkspecs/features/qmake_use.prf
index 64faa4f215..8475e4111a 100644
--- a/mkspecs/features/qmake_use.prf
+++ b/mkspecs/features/qmake_use.prf
@@ -22,7 +22,13 @@ for(ever) {
!defined(QMAKE_LIBS_$$nu, var): \
error("Library '$$lower($$replace(nu, _, -))' is not defined.")
- debug: \
+ QMAKE_LIBDIR += $$eval(QMAKE_LIBDIR_$$nu)
+
+ android {
+ ABI_LIBS = $$eval(QMAKE_LIBS_$${nu}_$${QT_ARCH})
+ isEmpty(ABI_LIBS): ABI_LIBS = $$eval(QMAKE_LIBS_$${nu})
+ LIBS$${suffix} += $$ABI_LIBS
+ } else: debug: \
LIBS$${suffix} += $$eval(QMAKE_LIBS_$${nu}_DEBUG) $$eval(QMAKE_LIBS_$$nu)
else: \
LIBS$${suffix} += $$eval(QMAKE_LIBS_$${nu}_RELEASE) $$eval(QMAKE_LIBS_$$nu)
diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf
index 57cfec78b3..3d6cd9b3db 100644
--- a/mkspecs/features/qml_module.prf
+++ b/mkspecs/features/qml_module.prf
@@ -52,15 +52,26 @@ builtin_resources {
qmldir.base = $$qmldir_path
qmldir.files = $$qmldir_file
qmldir.path = $$[QT_INSTALL_QML]/$$TARGETPATH
-INSTALLS += qmldir
qmlfiles.base = $$_PRO_FILE_PWD_
qmlfiles.files = $$fq_aux_qml_files
install_qml_files: qmlfiles.files += $$fq_qml_files
qmlfiles.path = $${qmldir.path}
-INSTALLS += qmlfiles
-!debug_and_release|!build_all|CONFIG(release, debug|release) {
+INSTALL_QML_FILES = false
+
+android {
+ single_android_abi|build_pass {
+ isEmpty(ANDROID_ABIS): ANDROID_ABIS = $$ALL_ANDROID_ABIS
+ ABI = $$first(ANDROID_ABIS)
+ equals(ABI, $$QT_ARCH): INSTALL_QML_FILES = true
+ }
+} else: !debug_and_release|!build_all|CONFIG(release, debug|release): INSTALL_QML_FILES = true
+
+equals(INSTALL_QML_FILES, true) {
+ INSTALLS += qmldir
+ INSTALLS += qmlfiles
+
!prefix_build {
COPIES += qmldir qmlfiles
} else {
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
index ad8ecdf5f1..74ab932f80 100644
--- a/mkspecs/features/qml_plugin.prf
+++ b/mkspecs/features/qml_plugin.prf
@@ -55,7 +55,7 @@ INSTALLS += target
# Some final setup
-TARGET = $$qt5LibraryTarget($$TARGET)
+TARGET = $$qt5LibraryTarget($$TARGET, "qml/$$TARGETPATH/")
load(qt_targets)
load(qt_common)
@@ -68,7 +68,10 @@ load(qt_common)
# To regenerate run 'make qmltypes' which will update the plugins.qmltypes file in the source
# directory. Then review and commit the changes made to plugins.qmltypes.
#
-!cross_compile {
+# Due to the above mentioned drawbacks, there is a better mechanism available now: qmltyperegistrar
+# can generate the .qmltypes files at compile time. It will do this when CONFIG += qmltypes is set.
+# Therefore, don't try to generate the qmltypes files via qmlplugindump in that case.
+!cross_compile:!qmltypes {
qmlplugindump = qmlplugindump
importpath.name = QML2_IMPORT_PATH
importpath.value =
@@ -84,17 +87,18 @@ load(qt_common)
# 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) {
+ isEmpty(QML_IMPORT_VERSION):!isEmpty(IMPORT_VERSION): QML_IMPORT_VERSION = $$IMPORT_VERSION
+ isEmpty(QML_IMPORT_VERSION) {
no_cxx_module {
- IMPORT_VERSION = $$section(MODULE_VERSION, ., 0, 1)
- isEmpty(IMPORT_VERSION): error("Must set IMPORT_VERSION")
+ QML_IMPORT_VERSION = $$section(MODULE_VERSION, ., 0, 1)
+ isEmpty(QML_IMPORT_VERSION): error("Must set QML_IMPORT_VERSION")
} else {
- IMPORT_VERSION = $$section(QT.$${CXX_MODULE}.VERSION, ., 0, 1)
+ QML_IMPORT_VERSION = $$section(QT.$${CXX_MODULE}.VERSION, ., 0, 1)
}
}
load(resolve_target)
- TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, )
+ isEmpty(IMPORT_NAME): IMPORT_NAME = $$replace(TARGETPATH, \\.\\d+\$, )
!qml1_target {
isEmpty(QMAKE_PLUGINDUMP_DEPENDENCIES_FILE):exists($$_PRO_FILE_PWD_/dependencies.json): \
@@ -104,7 +108,7 @@ load(qt_common)
}
qmltypes.target = qmltypes
- qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$QMAKE_QMLPLUGINDUMP_FLAGS $$replace(TARGETPATHBASE, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE
+ qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$QMAKE_QMLPLUGINDUMP_FLAGS $$replace(IMPORT_NAME, /, .) $$QML_IMPORT_VERSION > $$QMLTYPEFILE
qmltypes.depends = $$QMAKE_RESOLVED_TARGET
} else {
qmltypes.CONFIG += recursive
diff --git a/mkspecs/features/qmltestcase.prf b/mkspecs/features/qmltestcase.prf
index b4b1224781..95e20a8a4f 100644
--- a/mkspecs/features/qmltestcase.prf
+++ b/mkspecs/features/qmltestcase.prf
@@ -1,8 +1,18 @@
!isEmpty(SOURCES) {
QT += qml qmltest
load(testcase)
- contains(TEMPLATE, vc.*): DEFINES += QUICK_TEST_SOURCE_DIR=\"$$_PRO_FILE_PWD_\"
- else: DEFINES += QUICK_TEST_SOURCE_DIR=$$shell_quote(\"$$_PRO_FILE_PWD_\")
+ !android {
+ contains(TEMPLATE, vc.*): DEFINES += QUICK_TEST_SOURCE_DIR=\"$$_PRO_FILE_PWD_\"
+ else: DEFINES += QUICK_TEST_SOURCE_DIR=$$shell_quote(\"$$_PRO_FILE_PWD_\")
+ } else {
+ isEmpty(RESOURCES) {
+ ANDROID_EXTRA_PLUGINS *= $$_PRO_FILE_PWD_
+ DEFINES += QUICK_TEST_SOURCE_DIR=$$shell_quote(\"assets:/$$basename(_PRO_FILE_PWD_)\")
+ } else {
+ DEFINES += QUICK_TEST_SOURCE_DIR=$$shell_quote(\":/\")
+ }
+ }
+
} else {
# Allow a project to run tests without a CPP stub
TEMPLATE = aux
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 89f4946c50..3b71eea6bc 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -2,7 +2,10 @@
# due to required Qt modules being missing.
!isEmpty(QMAKE_FAILED_REQUIREMENTS): return()
-CONFIG *= thread
+# hardcoded defaults
+QT_CONFIG *= c99 c11 c++11 c++14 c++1z c++17
+
+qtConfig(thread): CONFIG *= thread
#handle defines
win32 {
@@ -13,7 +16,6 @@ win32 {
}
}
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG
-qtConfig(force_asserts): DEFINES += QT_FORCE_ASSERTS
no_keywords:DEFINES += QT_NO_KEYWORDS
plugin { #Qt plugins
static:DEFINES += QT_STATICPLUGIN
@@ -59,6 +61,28 @@ qaxserver {
!force_import_plugins:!contains(TEMPLATE, ".*app"):!if(contains(TEMPLATE, ".*lib"):dll): \
CONFIG -= import_plugins
+unix {
+ contains(QT_CONFIG, no_direct_extern_access): CONFIG += no_direct_extern_access
+ else:contains(QT_CONFIG, reduce_relocations):!contains(TEMPLATE, .*lib): {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_PIC
+ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_PIC
+ }
+}
+
+# Load the entrypoint module if requested
+entrypoint {
+ win32 {
+ !console:contains(TEMPLATE, ".*app"): \
+ QT_PRIVATE += entrypoint_private
+ } else:uikit {
+ qt_depends = $$resolve_depends(QT, "QT.")
+ !watchos:equals(TEMPLATE, app):contains(qt_depends, gui(-private)?): \
+ QT_PRIVATE += entrypoint_private
+ }
+}
+
+# Will automatically add plugins, so run first
+contains(QT_CONFIG, permissions): load(permissions)
# qmake variables cannot contain dashes, so normalize the names first
CLEAN_QT = $$replace(QT, -private$, _private)
@@ -69,13 +93,15 @@ all_qt_module_deps = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_d
QTPLUGIN = $$unique($$list($$lower($$QTPLUGIN)))
-import_plugins:qtConfig(static) {
+# Sanitize requested plugins, and add any default plugins
+import_plugins {
manualplugs = $$QTPLUGIN # User may specify plugins. Mostly legacy.
autoplugs = # Auto-added plugins.
# First round: explicitly specified modules.
- plugin_deps = $$all_qt_module_deps
+ all_plugin_deps = $$all_qt_module_deps
+ plugin_deps = $$all_plugin_deps
for(ever) {
- # Automatically link the default plugins for the linked Qt modules.
+ # Automatically add the default plugins for the linked Qt modules.
for (qtmod, plugin_deps) {
for (ptype, QT.$${qtmod}.plugin_types) {
nptype = $$replace(ptype, [-/], _)
@@ -83,7 +109,7 @@ import_plugins:qtConfig(static) {
for (plug, QT_PLUGINS) {
equals(QT_PLUGIN.$${plug}.TYPE, $$ptype) {
for (dep, QT_PLUGIN.$${plug}.EXTENDS) {
- !contains(all_qt_module_deps, $$dep) {
+ !contains(all_plugin_deps, $$dep) {
plug =
break()
}
@@ -106,54 +132,74 @@ import_plugins:qtConfig(static) {
for (plug, QTPLUGIN): \
plugin_deps += $$eval(QT_PLUGIN.$${plug}.DEPENDS)
plugin_deps = $$resolve_depends(plugin_deps, "QT.", ".depends" ".run_depends")
- plugin_deps -= $$all_qt_module_deps
+ plugin_deps -= $$all_plugin_deps
+
isEmpty(plugin_deps): \
break()
# ... and start over if any new Qt modules appeared,
# as these may want to load plugins in turn.
- all_qt_module_deps += $$plugin_deps
+ all_plugin_deps += $$plugin_deps
}
extraplugs = $$manualplugs
manualplugs -= $$autoplugs
extraplugs -= $$manualplugs
!isEmpty(extraplugs): \
warning("Redundant entries in QTPLUGIN: $$extraplugs")
-
- !isEmpty(QTPLUGIN) {
- IMPORT_FILE_CONT = \
- "// This file is autogenerated by qmake. It imports static plugin classes for" \
- "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables." \
- "$${LITERAL_HASH}include <QtPlugin>"
- for (plug, QTPLUGIN) {
- plug_class = $$eval(QT_PLUGIN.$${plug}.CLASS_NAME)
- !isEmpty(plug_class): \
- IMPORT_FILE_CONT += "Q_IMPORT_PLUGIN($$plug_class)"
- else: \
- warning("Plugin class name could not be determined for plugin '$$plug'.")
- }
- IMPORT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_plugin_import.cpp
- write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error()
- GENERATED_SOURCES += $$IMPORT_CPP
- QMAKE_DISTCLEAN += $$IMPORT_CPP
- }
}
-# Only link against plugins in static builds
-!isEmpty(QTPLUGIN):qtConfig(static) {
+# Link static plugins
+!isEmpty(QTPLUGIN) {
for (plug, QTPLUGIN) {
+ module_config = $$eval(QT_PLUGIN.$${plug}.module_config)
+ isEmpty(module_config):!qtConfig(static): \
+ next() # Compatibility with older modules
+
+ !contains(module_config, staticlib): \
+ next()
+
+ plug_class = $$eval(QT_PLUGIN.$${plug}.CLASS_NAME)
+ !isEmpty(plug_class): \
+ IMPORT_FILE_CONT += "Q_IMPORT_PLUGIN($$plug_class)"
+ else: \
+ warning("Plugin class name could not be determined for plugin '$$plug'.")
+
+ plugin_deps = $$eval(QT_PLUGIN.$${plug}.DEPENDS)
+ plugin_deps = $$resolve_depends(plugin_deps, "QT.", ".depends" ".run_depends")
+ all_qt_module_deps *= $$plugin_deps
+
# Check if the plugin is known to Qt. We can use this to determine
# the plugin path. Unknown plugins must rely on the default link path.
plug_type = $$eval(QT_PLUGIN.$${plug}.TYPE)
!isEmpty(plug_type) {
- plug_name = $$QMAKE_PREFIX_STATICLIB$${plug}$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB
+ # Respect target config if Qt provides both debug and release versions
+ # of each plugin. Otherwise, respect what Qt was configured with.
+ qtConfig(debug_and_release): config_variable = CONFIG
+ else: config_variable = QT_CONFIG
+
+ plug_name = $$QMAKE_PREFIX_STATICLIB$${plug}$$qtPlatformTargetSuffix($$config_variable).$$QMAKE_EXTENSION_STATICLIB
plug_path = $$eval(QT_PLUGIN.$${plug}.PATH)
isEmpty(plug_path): \
plug_path = $$[QT_INSTALL_PLUGINS/get]
LIBS += $$plug_path/$$plug_type/$$plug_name
} else {
- LIBS += -l$${plug}$$qtPlatformTargetSuffix()
+ LIBS += -l$${plug}$$qtPlatformTargetSuffix(CONFIG)
}
}
+
+ !isEmpty(IMPORT_FILE_CONT) {
+ IMPORT_FILE_CONT = \
+ "// This file is autogenerated by qmake. It imports static plugin classes for" \
+ "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables." \
+ "$${LITERAL_HASH}include <QtPlugin>" \
+ "$$IMPORT_FILE_CONT"
+
+ TARGET_BASENAME = $$lower($$basename(TARGET))
+ TARGET_BASENAME ~= s/\s/_/g
+ IMPORT_CPP = $$OUT_PWD/$${TARGET_BASENAME}_plugin_import.cpp
+ write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error()
+ GENERATED_SOURCES += $$IMPORT_CPP
+ QMAKE_DISTCLEAN += $$IMPORT_CPP
+ }
}
# target variable, flag source variable
@@ -167,7 +213,7 @@ defineTest(qtProcessModuleFlags) {
export($$1)
}
-unset(using_privates)
+unset(using_private_headers)
var_sfx =
for(ever) {
# Topological resolution of modules based on their QT.<module>.depends variable
@@ -178,6 +224,7 @@ for(ever) {
MODULE_NAME = $$eval(QT.$${QTLIB}.name)
MODULE_MODULE = $$eval(QT.$${QTLIB}.module)
MODULE_INCLUDES = $$eval(QT.$${QTLIB}.includes)
+ MODULE_LDFLAGS = $$eval(QT.$${QTLIB}.ldflags)
MODULE_LIBS = $$eval(QT.$${QTLIB}.libs)
MODULE_FRAMEWORKS = $$eval(QT.$${QTLIB}.frameworks)
MODULE_USES = $$eval(QT.$${QTLIB}.uses)
@@ -188,8 +235,8 @@ for(ever) {
next()
}
- contains(MODULE_CONFIG, internal_module): \
- using_privates = true
+ contains(MODULE_CONFIG, internal_module):!isEmpty(MODULE_INCLUDES): \
+ using_private_headers = true
contains(MODULE_CONFIG, ltcg): \
CONFIG += link_ltcg
@@ -198,6 +245,9 @@ for(ever) {
MODULE_INCLUDES -= $$QMAKE_DEFAULT_INCDIRS
+ # Add linker flags before lib
+ LIBS$$var_sfx += $$MODULE_LDFLAGS
+
# Frameworks shouldn't need include paths, but much code does not use
# module-qualified #includes, so by default we add paths which point
# directly into the frameworks. Private modules have somewhat convoluted
@@ -212,33 +262,47 @@ for(ever) {
# Linking frameworks by absolute path does not work.
LIBS$$var_sfx += -framework $$framework
} else {
- lib = $$MODULE_MODULE$$qtPlatformTargetSuffix()
+ lib_bases = $$MODULE_MODULE$$qtPlatformTargetSuffix()
+ darwin: lib_bases *= $$MODULE_MODULE
+ add_lib_to_pretargetdeps = false
win32|contains(MODULE_CONFIG, staticlib) {
- lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_STATICLIB
- PRE_TARGETDEPS += $$lib
+ lib_prefix = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB
+ lib_suffixes = $$QMAKE_EXTENSION_STATICLIB
+ lib_suffixes *= $$QMAKE_LIB_EXTENSIONS
+ !xcodebuild: \
+ add_lib_to_pretargetdeps = true
} else {
- lib = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB$${lib}.$$QMAKE_EXTENSION_SHLIB
+ lib_prefix = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB
+ lib_suffixes = $$QMAKE_EXTENSION_SHLIB
+ }
+ candidates =
+ for(lib_base, lib_bases) {
+ for(lib_suffix, lib_suffixes) {
+ candidates += $${lib_prefix}$${lib_base}.$${lib_suffix}
+ }
}
+ lib =
+ for(candidate, candidates) {
+ exists("$$candidate") {
+ lib = "$$candidate"
+ break()
+ }
+ }
+ isEmpty(lib): \
+ lib = $$first(candidates)
+ $$add_lib_to_pretargetdeps: \
+ PRE_TARGETDEPS += $$lib
LIBS$$var_sfx += $$lib
}
}
QMAKE_USE$$var_sfx += $$MODULE_USES
- # Add capabilities as defined by modules used in the project
- winrt {
- MODULE_WINRT_CAPABILITIES = $$eval(QT.$${QTLIB}.winrt_capabilities)
- !isEmpty(MODULE_WINRT_CAPABILITIES): \
- WINRT_MANIFEST.capabilities_default += $$MODULE_WINRT_CAPABILITIES
- MODULE_WINRT_CAPABILITIES_DEVICE = $$eval(QT.$${QTLIB}.winrt_capabilities_device)
- !isEmpty(MODULE_WINRT_CAPABILITIES_DEVICE): \
- WINRT_MANIFEST.capabilities_device_default += $$MODULE_WINRT_CAPABILITIES_DEVICE
- }
}
!isEmpty(BAD_QT):error("Unknown module(s) in QT$$var_sfx: $$replace(BAD_QT, _private$, -private)")
!isEmpty(var_sfx): break()
var_sfx = _PRIVATE
}
-!isEmpty(using_privates):!no_private_qt_headers_warning:!build_pass {
+!isEmpty(using_private_headers):!no_private_qt_headers_warning:!build_pass {
message("This project is using private headers and will therefore be tied to this specific Qt module build version.")
message("Running this project against other versions of the Qt modules may crash at any arbitrary point.")
message("This is not a bug, but a result of using Qt internals. You have been warned!")
@@ -275,11 +339,30 @@ contains(all_qt_module_deps, qml): \
QMLPATHS *= $$[QT_INSTALL_QML/get]
# run qmlimportscanner
- qtPrepareTool(QMLIMPORTSCANNER, qmlimportscanner, , system)
+ qtPrepareLibExecTool(QMLIMPORTSCANNER, qmlimportscanner, , system)
for (QMLPATH, QMLPATHS): \
IMPORTPATHS += -importPath $$system_quote($$QMLPATH)
- #message(run $$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
+ # add resources to qmlimportscanner
+ for (RESOURCE, RESOURCES) {
+ defined($${RESOURCE}.files, var) {
+ # in case of a "struct", add the struct's files
+ base = $$RESOURCE.base
+ for (f, $$RESOURCE.files): SCANNERRESOURCES += "$$base/$$f"
+ } else {
+ # if the resource is a file, just add it
+ SCANNERRESOURCES += $$RESOURCE
+ }
+ }
+
+ !isEmpty(SCANNERRESOURCES) {
+ IMPORTPATHS += -qrcFiles
+ for (RESOURCE, SCANNERRESOURCES): \
+ IMPORTPATHS += $$absolute_path($$system_quote($$RESOURCE), $$_PRO_FILE_PWD_)
+ }
+
+
+ # message(run $$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
JSON = $$system($$QMLIMPORTSCANNER $$system_quote($$_PRO_FILE_PWD_) $$IMPORTPATHS)
parseJson(JSON, IMPORTS)| error("Failed to parse qmlimportscanner output.")
@@ -312,7 +395,10 @@ contains(all_qt_module_deps, qml): \
}
}
}
- QML_IMPORT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_qml_plugin_import.cpp
+ TARGET_BASENAME = $$lower($$basename(TARGET))
+ TARGET_BASENAME ~= s/\s/_/g
+
+ QML_IMPORT_CPP = $$OUT_PWD/$${TARGET_BASENAME}_qml_plugin_import.cpp
write_file($$QML_IMPORT_CPP, IMPORT_FILE_CONT)|error()
GENERATED_SOURCES += $$QML_IMPORT_CPP
QMAKE_DISTCLEAN += $$QML_IMPORT_CPP
diff --git a/mkspecs/features/qt_android_deps.prf b/mkspecs/features/qt_android_deps.prf
deleted file mode 100644
index c172ca8c4e..0000000000
--- a/mkspecs/features/qt_android_deps.prf
+++ /dev/null
@@ -1,90 +0,0 @@
-
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-# Generates an xml file to match the library in lib/ listing the dependencies
-# of the module on JNI-based libraries etc. Used for deployment of an Android
-# app.
-
-ANDROID_DEPENDS_DIR = $$MODULE_BASE_OUTDIR/lib/
-DEPENDENCY_FILE = $$ANDROID_DEPENDS_DIR$$TARGET-android-dependencies.xml
-
-!build_pass {
- !isEmpty(MODULE_PLUGIN_TYPES) {
- for(PLUGIN_TYPE, MODULE_PLUGIN_TYPES) {
- ANDROID_BUNDLED_FILES += "plugins/$$PLUGIN_TYPE"
- }
- }
-
- !isEmpty(ANDROID_JAR_DEPENDENCIES) {
- for(JAR_FILE, ANDROID_JAR_DEPENDENCIES) {
- INIT_CLASS = $$section(JAR_FILE, ":", 1, 1)
- !isEmpty(INIT_CLASS): INIT_CLASS = "initClass=\"$$INIT_CLASS\""
- JAR_FILE = $$section(JAR_FILE, ":", 0, 0)
- FILE_CONTENT += "<jar file=\"$$JAR_FILE\" $$INIT_CLASS />"
- }
- }
-
- !isEmpty(ANDROID_BUNDLED_JAR_DEPENDENCIES) {
- for(JAR_FILE, ANDROID_BUNDLED_JAR_DEPENDENCIES) {
- INIT_CLASS = $$section(JAR_FILE, ":", 1, 1)
- !isEmpty(INIT_CLASS): INIT_CLASS = "initClass=\"$$INIT_CLASS\""
- JAR_FILE = $$section(JAR_FILE, ":", 0, 0)
- FILE_CONTENT += "<jar bundling=\"1\" file=\"$$JAR_FILE\" $$INIT_CLASS />"
- }
- }
-
- !isEmpty(ANDROID_LIB_DEPENDENCIES) {
- for(LIB_FILE, ANDROID_LIB_DEPENDENCIES) {
- EXTENDS = $$section(LIB_FILE, ":", 1, 1)
- !isEmpty(EXTENDS): EXTENDS = "extends=\"$$EXTENDS\""
- LIB_FILE = $$section(LIB_FILE, ":", 0, 0)
- FILE_CONTENT += "<lib file=\"$$LIB_FILE\" $$EXTENDS />"
- }
- }
-
- !isEmpty(ANDROID_LIB_DEPENDENCY_REPLACEMENTS) {
- for(REPLACEMENT, ANDROID_LIB_DEPENDENCY_REPLACEMENTS) {
- REPLACEMENT_FILE = $$section(REPLACEMENT, ":", 0, 0)
- LIB_FILE = $$section(REPLACEMENT, ":", 1, 1)
- FILE_CONTENT += "<lib file=\"$$LIB_FILE\" replaces=\"$$REPLACEMENT_FILE\" />"
- }
- }
-
- !isEmpty(ANDROID_BUNDLED_FILES) {
- for (BUNDLED_FILE, ANDROID_BUNDLED_FILES) {
- FILE_CONTENT += "<bundled file=\"$$BUNDLED_FILE\" />"
- }
- }
-
- !isEmpty(ANDROID_PERMISSIONS) {
- for (ANDROID_PERMISSION, ANDROID_PERMISSIONS) {
- FILE_CONTENT += "<permission name=\"$$ANDROID_PERMISSION\" />"
- }
- }
-
- !isEmpty(ANDROID_FEATURES) {
- for (ANDROID_FEATURE, ANDROID_FEATURES) {
- FILE_CONTENT += "<feature name=\"$$ANDROID_FEATURE\" />"
- }
- }
-
-
- !isEmpty(FILE_CONTENT) {
- FILE_CONTENT = "<rules><dependencies><lib name=\"$$TARGET\"><depends>" $$FILE_CONTENT "</depends></lib></dependencies></rules>"
- write_file($$DEPENDENCY_FILE, FILE_CONTENT)|error()
- }
-}
-
-!isEmpty(ANDROID_JAR_DEPENDENCIES)|!isEmpty(ANDROID_LIB_DEPENDENCIES)|!isEmpty(ANDROID_LIB_DEPENDENCY_REPLACEMENTS)|!isEmpty(ANDROID_BUNDLED_JAR_DEPENDENCIES)|!isEmpty(ANDROID_BUNDLED_FILES) {
- install_dependencies_file.files = $$DEPENDENCY_FILE
- install_dependencies_file.path = $$[QT_INSTALL_LIBS]
- INSTALLS += install_dependencies_file
-}
diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf
deleted file mode 100644
index 8354f30eea..0000000000
--- a/mkspecs/features/qt_app.prf
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-TEMPLATE = app
-
-load(qt_build_paths)
-DESTDIR = $$MODULE_BASE_OUTDIR/bin
-
-isEmpty(VERSION): VERSION = $$MODULE_VERSION
-isEmpty(QMAKE_TARGET_DESCRIPTION): \
- QMAKE_TARGET_DESCRIPTION = "Qt $$title($$TARGET)"
-
-isEmpty(QMAKE_INFO_PLIST): CONFIG -= app_bundle
-
-host_build: QT -= gui # no host tool will ever use gui
-host_build:force_bootstrap {
- !build_pass:qtConfig(release_tools): CONFIG += release
- contains(QT, core(-private)?|xml) {
- QT -= core core-private xml
- QT += bootstrap-private
- }
- target.path = $$[QT_HOST_BINS]
-} else {
- !build_pass:qtConfig(debug_and_release): CONFIG += release
- target.path = $$[QT_INSTALL_BINS]
- CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable
-}
-INSTALLS += target
-
-load(qt_targets)
-load(qt_common)
-
-qtSetQmlPath()
-
-no_launch_target: return()
-
-load(resolve_target)
-launch.commands = $$shell_quote($$shell_path($$QMAKE_RESOLVED_TARGET))
-QMAKE_EXTRA_TARGETS += launch
-
-# Add environment for non-installed builds.
-QT_TOOL_NAME = target
-qtAddTargetEnv(launch.commands, QT)
-
-isEmpty(BUILDS)|build_pass {
- launch.depends = first
-} else {
- # For exclusive builds, run the app only once.
- launch.CONFIG = recursive
- launch.target = launch_all
- launch.recurse_target = launch
- launch.commands =
-
- launch_first.depends = $$eval($$first(BUILDS).target)-launch
- launch_first.target = launch
- QMAKE_EXTRA_TARGETS += launch_first
-}
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
deleted file mode 100644
index 8a7c9c28d3..0000000000
--- a/mkspecs/features/qt_build_config.prf
+++ /dev/null
@@ -1,147 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
- QMAKE_QT_MODULE = $$[QT_HOST_DATA/get]/mkspecs/qmodule.pri
- !exists($$QMAKE_QT_MODULE)|!include($$QMAKE_QT_MODULE, "", true) {
- debug(1, "Cannot load qmodule.pri!")
- } else {
- debug(1, "Loaded qmodule.pri from ($$QMAKE_QT_MODULE)")
- }
-} else {
- debug(1, "Not loading qmodule.pri twice")
-}
-
-PRECOMPILED_DIR = .pch
-OBJECTS_DIR = .obj
-MOC_DIR = .moc
-RCC_DIR = .rcc
-UI_DIR = .uic
-TRACEGEN_DIR = .tracegen
-QMLCACHE_DIR = .qmlcache
-LRELEASE_DIR = .qm
-intel_icl {
- # ICL 14.0 has a bug that makes it not find #includes in dirs starting with .
- MOC_DIR = tmp/moc
- RCC_DIR = tmp/rcc
- UI_DIR = tmp/uic
-}
-
-QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR
-
-load(qt_prefix_build_check)
-
-# force_independent can be set externally. prefix_build not.
-qtIsPrefixBuild($$[QT_HOST_DATA]): \
- CONFIG += prefix_build force_independent
-
-!build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):force_independent {
- # When doing a -prefix build of top-level qt5/qt.pro, we need to announce
- # this repo's output dir to the other repos.
- MODULE_BASE_OUTDIR = $$shadowed($$dirname(_QMAKE_CONF_))
- !contains(QTREPOS, $$MODULE_BASE_OUTDIR): \
- cache(QTREPOS, add super, MODULE_BASE_OUTDIR)
- # This repo's module pris' location needs to be made known to qmake.
- isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$MODULE_BASE_OUTDIR
- modpath = $$MODULE_QMAKE_OUTDIR/mkspecs/modules
- !contains(QMAKEMODULES, $$modpath): \
- cache(QMAKEMODULES, add super, modpath)
- unset(modpath)
-}
-
-defineTest(qtSetQmlPath) {
- !qtConfig(static)|host_build|no_import_scan: \
- return()
- deps = $$replace(QT, -private$, _private)
- deps = $$resolve_depends(deps, "QT.")
- !contains(deps, qml): \
- return()
-
- isEmpty(QTREPOS): \
- QTREPOS = $$shadowed($$dirname(_QMAKE_CONF_))
- for (qrep, QTREPOS): \
- exists($$qrep/qml): \
- QMLPATHS += $$qrep/qml
- export(QMLPATHS)
-}
-
-# Apply extra compiler flags passed via configure last.
-CONFIG = qt_build_extra $$CONFIG
-
-# Don't actually try to install anything in non-prefix builds.
-# This is much easier and safer than making every single INSTALLS
-# assignment conditional.
-!prefix_build: \
- CONFIG += qt_clear_installs
-
-cross_compile: \
- CONFIG += force_bootstrap
-
-android|uikit|winrt: \
- CONFIG += builtin_testdata
-
-CONFIG += \
- utf8_source \
- create_prl link_prl \
- prepare_docs qt_docs_targets \
- no_private_qt_headers_warning QTDIR_build \
- qt_example_installs \
- # Qt modules get compiled without exceptions enabled by default.
- # However, testcases should be still built with exceptions.
- exceptions_off testcase_exceptions
-
-# Under Windows, this is neither necessary (transitive deps are automatically
-# resolved), nor functional (.res files end up in .prl files and break things).
-unix: CONFIG += explicitlib
-
-# By default we want tests on macOS to be built as standalone executables
-macos: CONFIG += testcase_no_bundle
-
-# Override MinGW's definition in _mingw.h
-mingw: DEFINES += WINVER=0x0601 _WIN32_WINNT=0x0601
-
-defineTest(qtBuildPart) {
- bp = $$eval($$upper($$section(_QMAKE_CONF_, /, -2, -2))_BUILD_PARTS)
- isEmpty(bp): bp = $$QT_BUILD_PARTS
- contains(bp, $$1): return(true)
- return(false)
-}
-
-defineTest(qtNomakeTools) {
- qtBuildPart(tools): return()
- for (d, 1) {
- $${d}.CONFIG += no_default_target no_default_install
- export($${d}.CONFIG)
- }
-}
-
-# This overloads the same function from qt_functions.prf.
-# This is not in qt_module.prf, as that gets loaded too late.
-defineTest(qtConfig) {
- modules = $$QT $$QT_PRIVATE $$QT_FOR_PRIVATE $$QT_FOR_CONFIG
- modules ~= s,-private$,_private,g
- modules = $$resolve_depends(modules, "QT.", ".depends")
- isEmpty(MODULE): \
- MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
- exists($$OUT_PWD/qt$${MODULE}-config.pri) {
- include($$OUT_PWD/qt$${MODULE}-config.pri)
- modules += $${MODULE} $${MODULE}_private
- }
- modules += global global_private
- modules = $$reverse(modules)
- for (module, modules) {
- contains(QT.$${module}.enabled_features, $$1): \
- return(true)
- contains(QT.$${module}.disabled_features, $$1): \
- return(false)
- }
- error("Could not find feature $${1}.")
-}
diff --git a/mkspecs/features/qt_build_extra.prf b/mkspecs/features/qt_build_extra.prf
deleted file mode 100644
index a1512c3a19..0000000000
--- a/mkspecs/features/qt_build_extra.prf
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-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:cross_compile: return()
-
-# The headersclean check needs defines and includes even for
-# header-only modules.
-DEFINES += $$EXTRA_DEFINES
-INCLUDEPATH += $$EXTRA_INCLUDEPATH
-
-# The other flags are relevant only for actual libraries.
-equals(TEMPLATE, aux): return()
-
-QMAKE_LIBDIR += $$EXTRA_LIBDIR
-QMAKE_FRAMEWORKPATH += $$EXTRA_FRAMEWORKPATH
-
-# Static libs need no rpaths
-static: return()
-
-for (rp, EXTRA_RPATHS) {
- absrp = $$absolute_path($$rp, $$[QT_INSTALL_LIBS])
- !isEqual(absrp, $$rp) {
- isEmpty(QMAKE_REL_RPATH_BASE)|!contains(INSTALLS, target): \
- rp = $$absrp
- else: \
- rp = $$relative_path($$absrp, $$qtRelativeRPathBase())
- }
- QMAKE_RPATHDIR += $$rp
-}
diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf
deleted file mode 100644
index 3bb3823a8e..0000000000
--- a/mkspecs/features/qt_build_paths.prf
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-# Find the module's source root dir.
-isEmpty(_QMAKE_CONF_): error("Project has no top-level .qmake.conf file.")
-MODULE_BASE_INDIR = $$dirname(_QMAKE_CONF_)
-REAL_MODULE_BASE_OUTDIR = $$shadowed($$MODULE_BASE_INDIR)
-MODULE_BASE_OUTDIR = $$REAL_MODULE_BASE_OUTDIR
-!isEmpty(MODULE_BASE_DIR): MODULE_SYNCQT_DIR = $$MODULE_BASE_DIR # compat for webkit
-isEmpty(MODULE_SYNCQT_DIR): MODULE_SYNCQT_DIR = $$MODULE_BASE_INDIR
-isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$MODULE_BASE_OUTDIR
-
-exists($$MODULE_BASE_INDIR/.git): \
- CONFIG += git_build
-
-!force_independent {
- # If the module is not built independently, everything ends up in qtbase.
- # This is the case in non-prefix builds, except for selected modules.
- MODULE_BASE_OUTDIR = $$[QT_HOST_PREFIX]
- MODULE_QMAKE_OUTDIR = $$[QT_HOST_PREFIX]
-}
diff --git a/mkspecs/features/qt_clear_installs.prf b/mkspecs/features/qt_clear_installs.prf
deleted file mode 100644
index 66d12f9d6d..0000000000
--- a/mkspecs/features/qt_clear_installs.prf
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-INSTALLS =
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
deleted file mode 100644
index caecb68a84..0000000000
--- a/mkspecs/features/qt_common.prf
+++ /dev/null
@@ -1,166 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-QMAKE_DIR_REPLACE_SANE += DESTDIR
-CONFIG -= debug_and_release_target
-
-DEFINES *= QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
-
-qtConfig(c++11): CONFIG += c++11 strict_c++
-qtConfig(c++14): CONFIG += c++14
-qtConfig(c++1z): CONFIG += c++1z
-qtConfig(c99): CONFIG += c99
-qtConfig(c11): CONFIG += c11
-qtConfig(stack-protector-strong): CONFIG += stack_protector_strong
-contains(TEMPLATE, .*lib) {
- # module and plugins
- if(!host_build|!cross_compile):qtConfig(reduce_exports): CONFIG += hide_symbols
- unix:qtConfig(reduce_relocations): CONFIG += bsymbolic_functions
- qtConfig(separate_debug_info): CONFIG += separate_debug_info
-
- !isEmpty(_QMAKE_SUPER_CACHE_): \
- rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*
- else: \
- rplbase = $$MODULE_BASE_OUTDIR
- host_build {
- qqt_libdir = \$\$\$\$[QT_HOST_LIBS]
- qt_libdir = $$[QT_HOST_LIBS]
- } else {
- qqt_libdir = \$\$\$\$[QT_INSTALL_LIBS]
- qt_libdir = $$[QT_INSTALL_LIBS]
- }
- contains(QMAKE_DEFAULT_LIBDIRS, $$qt_libdir) {
- lib_replace0.match = $$rplbase/lib/
- lib_replace0.replace = $$qqt_libdir/
- lib_replace0.CONFIG = path
- QMAKE_PRL_INSTALL_REPLACE += lib_replace0
- lib_replace.match = "[^ ']*$$rplbase/lib"
- lib_replace.replace =
- } else {
- lib_replace.match = $$rplbase/lib
- lib_replace.replace = $$qqt_libdir
- }
- lib_replace.CONFIG = path
- QMAKE_PRL_INSTALL_REPLACE += lib_replace
- !equals(qt_libdir, $$rplbase/lib) {
- qtlibdir_replace.match = $$qt_libdir
- qtlibdir_replace.replace = $$qqt_libdir
- qtlibdir_replace.CONFIG = path
- QMAKE_PRL_INSTALL_REPLACE += qtlibdir_replace
- }
-}
-
-# 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: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.
-# -Wdate-time: warn if we use __DATE__ or __TIME__ (we want to be able to reproduce the exact same binary)
-# -Wvla: use of variable-length arrays (an extension to C++)
-clang {
- clang_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}
- apple_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
- versionAtLeast(clang_ver, 3.5): \
- QMAKE_CXXFLAGS_WARN_ON += -Wdate-time
-
- versionAtLeast(clang_ver, 3.6)|versionAtLeast(apple_ver, 6.3): \
- QMAKE_CXXFLAGS_WARN_ON += -Winconsistent-missing-override
-
- darwin {
- QMAKE_CXXFLAGS_WARN_ON += \
- -Wobjc-interface-ivars \
- -Wobjc-method-access \
- -Wobjc-multiple-method-names
-
- # Clang/LLVM 5.0 and Xcode 9.0 introduced unguarded availability warnings.
- # The same construct has been a hard error in Swift from the very beginning.
- versionAtLeast(clang_ver, 5.0)|versionAtLeast(apple_ver, 9.0): \
- QMAKE_CXXFLAGS_WARN_ON += \
- -Werror=unguarded-availability \
- -Werror=unguarded-availability-new \
- -Werror=unsupported-availability-guard
- }
-} else: gcc:!intel_icc {
- QMAKE_CXXFLAGS_WARN_ON += -Wvla
- # GCC 5 fixed -Wmissing-field-initializers for when there are no initializers
- lessThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wno-missing-field-initializers
- # GCC 5 introduced -Wdate-time
- greaterThan(QT_GCC_MAJOR_VERSION, 4): QMAKE_CXXFLAGS_WARN_ON += -Wdate-time
- # GCC 6 introduced these
- greaterThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wshift-overflow=2 -Wduplicated-cond
- # GCC 7 has a lot of false positives relating to this, so disable completely
- greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-stringop-overflow
- # GCC 9 has a lot of false positives relating to this, so disable completely
- greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-copy
- # GCC 9 introduced this
- greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-redundant-move
- # GCC 9 introduced this
- greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-format-overflow
- # GCC 9 introduced this
- greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-init-list-lifetime
-}
-
-warnings_are_errors:warning_clean {
- # If the module declares that it has does its clean-up of warnings, enable -Werror.
- # This setting is compiler-dependent anyway because it depends on the version of the
- # compiler.
- clang {
- # Apple clang 4.0-4.2,5.0-5.1,6.0-6.4,7.0-7.3,8.0-8.3,9.0-9.2
- # Regular clang 3.x-6.0
- 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]|7\\.[0123]|8\\.[0123]|9\\.[012]")|contains(reg_ver, "[345]\\.|6\\.0") {
- QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR
- }
- } else:intel_icc:linux {
- # Intel CC 13.0 - 18.0, on Linux only
- ver = $${QT_ICC_MAJOR_VERSION}.$${QT_ICC_MINOR_VERSION}
- linux:contains(ver, "(1[345678]\\.|19\\.0)") {
- # 177: function "entity" was declared but never referenced
- # (too aggressive; ICC reports even for functions created due to template instantiation)
- # 1224: #warning directive
- # 1478: function "entity" (declared at line N) was declared deprecated
- # 1786: function "entity" (declared at line N of "file") was declared deprecated ("message")
- # 1881: argument must be a constant null pointer value
- # (NULL in C++ is usually a literal 0)
- QMAKE_CXXFLAGS_WARN_ON += -Werror -ww177,1224,1478,1786,1881 $$WERROR
- }
- } else:gcc:!clang:!intel_icc:!rim_qcc {
- # GCC 4.6-4.9, 5.x, ...
- ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION}
- contains(ver, "(4\\.[6789]|[5-9]\\..)") {
- QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=cpp -Wno-error=deprecated-declarations $$WERROR
-
- # GCC prints this bogus warning, after it has inlined a lot of code
- # error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
- QMAKE_CXXFLAGS_WARN_ON += -Wno-error=strict-overflow
-
- # GCC 7 includes -Wimplicit-fallthrough in -Wextra, but Qt is not yet free of implicit fallthroughs.
- greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-error=implicit-fallthrough
- # GCC 9 has a lot of false positives relating to this, so disable completely
- greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-copy
- # GCC 9 introduced this
- greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-redundant-move
- # GCC 9 introduced this
- greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-format-overflow
- # GCC 9 introduced this
- greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-init-list-lifetime
- # Work-around for bug https://code.google.com/p/android/issues/detail?id=58135
- android: QMAKE_CXXFLAGS_WARN_ON += -Wno-error=literal-suffix
- }
- } else:msvc:!intel_icl {
- # enable for MSVC 2012, MSVC 2013, MSVC 2015
- contains(MSVC_VER, "1[124].0"): QMAKE_CXXFLAGS_WARN_ON += -WX
- }
- unset(ver)
-}
-
diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf
index 93c54e3010..40105f0ab2 100644
--- a/mkspecs/features/qt_config.prf
+++ b/mkspecs/features/qt_config.prf
@@ -26,6 +26,7 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS]
QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS]
QT_MODULE_HOST_LIB_BASE = $$[QT_HOST_LIBS]
+ QT_MODULE_HOST_LIBEXEC_BASE = $$[QT_HOST_LIBEXECS]
QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS]
include($$mod)
}
@@ -35,8 +36,8 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
unset(QT_MODULE_INCLUDE_BASE)
unset(QT_MODULE_LIB_BASE)
unset(QT_MODULE_HOST_LIB_BASE)
+ unset(QT_MODULE_HOST_LIBEXEC_BASE)
unset(QT_MODULE_BIN_BASE)
}
load(qt_functions)
-
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
deleted file mode 100644
index 242544d41b..0000000000
--- a/mkspecs/features/qt_configure.prf
+++ /dev/null
@@ -1,2522 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-QT_CONFIGURE_REPORT =
-QT_CONFIGURE_NOTES =
-QT_CONFIGURE_WARNINGS =
-QT_CONFIGURE_ERRORS =
-
-defineTest(qtConfAddReport) {
- QT_CONFIGURE_REPORT += "$$join(1, $$escape_expand(\\n))"
- export(QT_CONFIGURE_REPORT)
-}
-
-defineTest(qtConfAddNote) {
- QT_CONFIGURE_NOTES += "Note: $$join(1, $$escape_expand(\\n))"
- export(QT_CONFIGURE_NOTES)
-}
-
-defineTest(qtConfAddWarning) {
- QT_CONFIGURE_WARNINGS += "WARNING: $$join(1, $$escape_expand(\\n))"
- export(QT_CONFIGURE_WARNINGS)
-}
-
-defineTest(qtConfAddError) {
- QT_CONFIGURE_ERRORS += "ERROR: $$join(1, $$escape_expand(\\n))"
- export(QT_CONFIGURE_ERRORS)
- equals(2, log):qt_conf_tests_allowed {
- CONFIG += mention_config_log
- export(CONFIG)
- }
-}
-
-defineTest(qtConfFatalError) {
- qtConfAddError($$1, $$2)
- qtConfPrintReport()
- error()
-}
-
-# Return a string list for the specified JSON path, which may be either a
-# single string or an array of strings.
-# Note that this returns a variable name, so it can be directly iterated over.
-defineReplace(qtConfScalarOrList) {
- defined($$1, var): return($$1)
- vals = $$list()
- for (i, $${1}._KEYS_): \
- $$vals += $$eval($${1}.$$i)
- export($$vals)
- return($$vals)
-}
-
-defineTest(qtConfCommandlineSetInput) {
- arg = $${1}
- val = $${2}
- !isEmpty($${currentConfig}.commandline.options.$${arg}.name): \
- arg = $$eval($${currentConfig}.commandline.options.$${arg}.name)
-
- config.input.$$arg = $$val
- export(config.input.$$arg)
-}
-
-defineReplace(qtConfGetNextCommandlineArg) {
- c = $$take_first(QMAKE_EXTRA_ARGS)
- export(QMAKE_EXTRA_ARGS)
- return($$c)
-}
-
-defineReplace(qtConfPeekNextCommandlineArg) {
- return($$first(QMAKE_EXTRA_ARGS))
-}
-
-defineTest(qtConfCommandline_boolean) {
- opt = $${1}
- val = $${2}
- isEmpty(val): val = yes
-
- !equals(val, yes):!equals(val, no) {
- qtConfAddError("Invalid value given for boolean command line option '$$opt'.")
- return()
- }
-
- qtConfCommandlineSetInput($$opt, $$val)
-}
-
-defineTest(qtConfCommandline_void) {
- opt = $${1}
- val = $${2}
- !isEmpty(val) {
- qtConfAddError("Command line option '$$opt' expects no argument ('$$val' given).")
- return()
- }
-
- val = $$eval($${currentConfig}.commandline.options.$${opt}.value)
- isEmpty(val): val = yes
-
- qtConfCommandlineSetInput($$opt, $$val)
-}
-
-defineTest(qtConfCommandline_enum) {
- opt = $${1}
- val = $${2}
- isEmpty(val): val = yes
-
- # validate and map value
- mapped = $$eval($${currentConfig}.commandline.options.$${opt}.values.$${val})
- isEmpty(mapped) {
- # just a list of allowed values
- for (i, $${currentConfig}.commandline.options.$${opt}.values._KEYS_) {
- equals($${currentConfig}.commandline.options.$${opt}.values.$${i}, $$val) {
- mapped = $$val
- break()
- }
- }
- }
- isEmpty(mapped) {
- qtConfAddError("Invalid value '$$val' supplied to command line option '$$opt'.")
- return()
- }
-
- qtConfCommandlineSetInput($$opt, $$mapped)
-}
-
-defineTest(qtConfValidateValue) {
- opt = $${1}
- val = $${2}
-
- validValues = $$eval($${currentConfig}.commandline.options.$${opt}.values._KEYS_)
- isEmpty(validValues): \
- return(true)
-
- for (i, validValues) {
- equals($${currentConfig}.commandline.options.$${opt}.values.$${i}, $$val): \
- return(true)
- }
-
- qtConfAddError("Invalid value '$$val' supplied to command line option '$$opt'.")
- return(false)
-}
-
-defineTest(qtConfCommandline_string) {
- opt = $${1}
- val = $${2}
- nextok = $${3}
- isEmpty(val):$$nextok: val = $$qtConfGetNextCommandlineArg()
-
- # Note: Arguments which are variable assignments are legit here.
- contains(val, "^-.*")|isEmpty(val) {
- qtConfAddError("No value supplied to command line option '$$opt'.")
- return()
- }
-
- !qtConfValidateValue($$opt, $$val): \
- return()
-
- qtConfCommandlineSetInput($$opt, $$val)
-}
-
-defineTest(qtConfCommandline_optionalString) {
- opt = $${1}
- val = $${2}
- nextok = $${3}
- isEmpty(val) {
- $$nextok: val = $$qtConfPeekNextCommandlineArg()
- contains(val, "^-.*|[A-Z0-9_]+=.*")|isEmpty(val): \
- val = "yes"
- else: \
- val = $$qtConfGetNextCommandlineArg()
- }
-
- !qtConfValidateValue($$opt, $$val): \
- return()
-
- qtConfCommandlineSetInput($$opt, $$val)
-}
-
-
-defineTest(qtConfCommandline_addString) {
- opt = $${1}
- val = $${2}
- nextok = $${3}
- isEmpty(val):$$nextok: val = $$qtConfGetNextCommandlineArg()
-
- # Note: Arguments which are variable assignments are legit here.
- contains(val, "^-.*")|isEmpty(val) {
- qtConfAddError("No value supplied to command line option '$$opt'.")
- return()
- }
-
- !qtConfValidateValue($$opt, $$val): \
- return()
-
- !isEmpty($${currentConfig}.commandline.options.$${opt}.name): \
- opt = $$eval($${currentConfig}.commandline.options.$${opt}.name)
-
- config.input.$$opt += $$val
- export(config.input.$$opt)
-}
-
-defineTest(qtConfCommandline_redo) {
- !exists($$OUT_PWD/config.opt) {
- qtConfAddError("No config.opt present - cannot redo configuration.")
- return()
- }
- QMAKE_EXTRA_REDO_ARGS = $$cat($$OUT_PWD/config.opt, lines)
- export(QMAKE_EXTRA_REDO_ARGS) # just for config.log
- QMAKE_EXTRA_ARGS = $$QMAKE_EXTRA_REDO_ARGS $$QMAKE_EXTRA_ARGS
- export(QMAKE_EXTRA_ARGS)
- QMAKE_REDO_CONFIG = true
- export(QMAKE_REDO_CONFIG)
-}
-
-defineTest(qtConfParseCommandLine) {
- customCalls =
- for (cc, allConfigs) {
- custom = $$eval($${cc}.commandline.custom)
-
- !isEmpty(custom) {
- customCall = qtConfCommandline_$$custom
- !defined($$customCall, test): \
- error("Custom command line callback '$$custom' is undefined.")
- customCalls += $$customCall
- }
- }
-
- for (ever) {
- c = $$qtConfGetNextCommandlineArg()
- isEmpty(c): break()
-
- didCustomCall = false
- for (customCall, customCalls) {
- $${customCall}($$c) {
- didCustomCall = true
- break()
- }
- }
- $$didCustomCall: \
- next()
-
- contains(c, "([A-Z0-9_]+)=(.*)") {
- opt = $$replace(c, "^([A-Z0-9_]+)=(.*)", "\\1")
- val = $$replace(c, "^([A-Z0-9_]+)=(.*)", "\\2")
- for (cc, allConfigs) {
- var = $$eval($${cc}.commandline.assignments.$${opt})
- !isEmpty(var): \
- break()
- }
- isEmpty(var) {
- qtConfAddError("Assigning unknown variable '$$opt' on command line.")
- return()
- }
- config.input.$$var = $$val
- export(config.input.$$var)
- next()
- }
-
- # parse out opt and val
- nextok = false
- contains(c, "^--?enable-(.*)") {
- opt = $$replace(c, "^--?enable-(.*)", "\\1")
- val = yes
- } else: contains(c, "^--?(disable|no)-(.*)") {
- opt = $$replace(c, "^--?(disable|no)-(.*)", "\\2")
- val = no
- } else: contains(c, "^--([^=]+)=(.*)") {
- opt = $$replace(c, "^--([^=]+)=(.*)", "\\1")
- val = $$replace(c, "^--([^=]+)=(.*)", "\\2")
- } else: contains(c, "^--(.*)") {
- opt = $$replace(c, "^--(.*)", "\\1")
- val =
- } else: contains(c, "^-(.*)") {
- opt = $$replace(c, "^-(.*)", "\\1")
- val =
- nextok = true
- for (cc, allConfigs) {
- type = $$eval($${cc}.commandline.options.$${opt})
- !isEmpty(type): break()
- type = $$eval($${cc}.commandline.options.$${opt}.type)
- !isEmpty(type): break()
- }
- isEmpty(type):contains(opt, "(qt|system)-.*") {
- val = $$replace(opt, "(qt|system)-(.*)", "\\1")
- opt = $$replace(opt, "(qt|system)-(.*)", "\\2")
- }
- } else {
- qtConfAddError("Invalid command line parameter '$$c'.")
- return()
- }
-
- for (cc, allConfigs) {
- type = $$eval($${cc}.commandline.options.$${opt})
- isEmpty(type): \
- type = $$eval($${cc}.commandline.options.$${opt}.type)
- isEmpty(type) {
- # no match in the regular options, try matching the prefixes
- for (p, $${cc}.commandline.prefix._KEYS_) {
- e = "^-$${p}(.*)"
- contains(c, $$e) {
- opt = $$eval($${cc}.commandline.prefix.$${p})
- val = $$replace(c, $$e, "\\1")
- nextok = true
- type = "addString"
- break()
- }
- }
- }
- !isEmpty(type) {
- currentConfig = $$cc
- break()
- }
- }
- # handle builtin [-no]-feature-xxx
- isEmpty(type):contains(opt, "feature-(.*)") {
- opt ~= s,^feature-,,
- found = false
- for (cc, allConfigs) {
- contains($${cc}.features._KEYS_, $$opt) {
- found = true
- break()
- }
- }
- !$$found {
- qtConfAddError("Enabling/Disabling unknown feature '$$opt'.")
- return()
- }
- # this is a boolean enabling/disabling the corresponding feature
- type = boolean
- }
-
- isEmpty(type):contains(opt, "skip") {
- isEmpty(skipOptionWarningAdded) {
- qtConfAddWarning("Command line option -skip is only effective in top-level builds.")
- skipOptionWarningAdded = 1
- }
- val = $$qtConfGetNextCommandlineArg()
- next()
- }
-
- isEmpty(type) {
- qtConfAddError("Unknown command line option '$$c'.")
- equals(config.input.continue, yes): \
- next()
- else: \
- return()
- }
-
- call = "qtConfCommandline_$${type}"
- !defined($$call, test): \
- error("Command line option '$$c' has unknown type '$$type'.")
-
- # now that we have opt and value, process it
- $${call}($$opt, $$val, $$nextok)
- }
-}
-
-defineReplace(qtConfToolchainSupportsFlag) {
- test_out_dir = $$OUT_PWD/$$basename(QMAKE_CONFIG_TESTS_DIR)
- test_cmd_base = "$$QMAKE_CD $$system_quote($$system_path($$test_out_dir)) &&"
-
- conftest = "int main() { return 0; }"
- write_file("$$test_out_dir/conftest.cpp", conftest)|error()
-
- qtRunLoggedCommand("$$test_cmd_base $$QMAKE_CXX $$QMAKE_CXXFLAGS $${1} -o conftest-out conftest.cpp"): \
- return(true)
- return(false)
-}
-
-defineTest(qtConfTest_compilerSupportsFlag) {
- flag = $$eval($${1}.flag)
-
- return($$qtConfToolchainSupportsFlag($$flag))
-}
-
-defineTest(qtConfTest_linkerSupportsFlag) {
- flag = $$eval($${1}.flag)
-
- use_gold_linker: \
- LFLAGS = -fuse-ld=gold
-
- return($$qtConfToolchainSupportsFlag($$LFLAGS "-Wl,$$flag"))
-}
-
-defineReplace(qtConfFindInPathList) {
- # This nesting is consistent with Apple ld -search_paths_first,
- # and presumably with GNU ld (no actual documentation found).
- for (dir, 2) {
- for (file, 1) {
- exists("$$dir/$$file"): \
- return("$$dir/$$file")
- }
- }
- return()
-}
-
-defineReplace(qtConfFindInPath) {
- ensurePathEnv()
- equals(QMAKE_HOST.os, Windows):!contains(1, .*\\.exe): 1 = $${1}.exe
- return($$qtConfFindInPathList($$1, $$2 $$QMAKE_PATH_ENV))
-}
-
-defineReplace(qtConfPkgConfigEnv) {
- env =
- !isEmpty(PKG_CONFIG_SYSROOT_DIR): env = "$${SETENV_PFX}PKG_CONFIG_SYSROOT_DIR=$${PKG_CONFIG_SYSROOT_DIR}$${SETENV_SFX} "
- !isEmpty(PKG_CONFIG_LIBDIR): env = "$$env$${SETENV_PFX}PKG_CONFIG_LIBDIR=$${PKG_CONFIG_LIBDIR}$${SETENV_SFX} "
- return($$env)
-}
-
-defineReplace(qtConfPkgConfig) {
- host = $$1
- isEmpty(host): host = false
-
- $$host {
- pkg_config = $$qtConfFindInPath("pkg-config")
- } else {
- pkg_config = "$$qtConfPkgConfigEnv()$$PKG_CONFIG_EXECUTABLE"
- }
-
- return($$pkg_config)
-}
-
-defineTest(qtConfPkgConfigPackageExists) {
- isEmpty(1)|isEmpty(2): \
- return(false)
-
- !qtRunLoggedCommand("$${1} --exists --silence-errors $${2}"): \
- return(false)
-
- return(true)
-}
-
-defineReplace(qtSystemQuote) {
- args =
- for (a, 1): \
- args += $$system_quote($$a)
- return($$args)
-}
-
-defineReplace(qtConfPrepareArgs) {
- return($$qtSystemQuote($$split(1)))
-}
-
-defineTest(qtConfSetupLibraries) {
- asspfx = $${currentConfig}.commandline.assignments
- for (l, $${currentConfig}.libraries._KEYS_) {
- lpfx = $${currentConfig}.libraries.$${l}
- # 'export' may be omitted, in which case it falls back to the library's name
- !defined($${lpfx}.export, var) {
- $${lpfx}.export = $$replace(l, -, _)
- export($${lpfx}.export)
- }
- # 'export' may also be empty, but we need a derived identifier
- alias = $$eval($${lpfx}.export)
- isEmpty(alias): alias = $$replace(l, -, _)
- $${lpfx}.alias = $$alias
- export($${lpfx}.alias)
- # make it easy to refer to the library by its export name.
- $${currentConfig}.exports._KEYS_ += $$alias
- $${currentConfig}.exports.$$alias += $$l
- export($${currentConfig}.exports.$$alias)
- isEmpty($${lpfx}.sources._KEYS_): \
- error("Library $$l defines no sources")
- for (s, $${lpfx}.sources._KEYS_) {
- spfx = $${lpfx}.sources.$${s}
- # link back to parent object
- $${spfx}.library = $$l
- export($${spfx}.library)
- # a plain string is transformed into a structure
- isEmpty($${spfx}._KEYS_) {
- $${spfx}.libs = $$eval($${spfx})
- export($${spfx}.libs)
- }
- # if the type is missing (implicitly in the case of plain strings), assume 'inline'
- isEmpty($${spfx}.type) {
- $${spfx}.type = inline
- export($${spfx}.type)
- }
- }
- }
- $${currentConfig}.exports._KEYS_ = $$unique($${currentConfig}.exports._KEYS_)
- export($${currentConfig}.exports._KEYS_)
-
- for (alias, $${currentConfig}.exports._KEYS_) {
- ua = $$upper($$alias)
- $${asspfx}._KEYS_ += \
- $${ua}_PREFIX $${ua}_INCDIR $${ua}_LIBDIR \
- $${ua}_LIBS $${ua}_LIBS_DEBUG $${ua}_LIBS_RELEASE
- uapfx = $${asspfx}.$${ua}
- $${uapfx}_PREFIX = $${alias}.prefix
- $${uapfx}_INCDIR = $${alias}.incdir
- $${uapfx}_LIBDIR = $${alias}.libdir
- $${uapfx}_LIBS = $${alias}.libs
- $${uapfx}_LIBS_DEBUG = $${alias}.libs.debug
- $${uapfx}_LIBS_RELEASE = $${alias}.libs.release
- export($${uapfx}_PREFIX)
- export($${uapfx}_INCDIR)
- export($${uapfx}_LIBDIR)
- export($${uapfx}_LIBS)
- export($${uapfx}_LIBS_DEBUG)
- export($${uapfx}_LIBS_RELEASE)
- }
- export($${asspfx}._KEYS_)
-
- # reverse mapping for assignments on command line.
- for (a, $${asspfx}._KEYS_) {
- apfx = $${asspfx}.$${a}
- ra = config.commandline.rev_assignments.$$eval($$apfx)
- $$ra = $$a
- export($$ra)
- }
-}
-
-defineReplace(qtGccSysrootifiedPath) {
- return($$replace(1, ^=, $$[QT_SYSROOT]))
-}
-
-defineReplace(qtGccSysrootifiedPaths) {
- sysrootified =
- for (path, 1): \
- sysrootified += $$qtGccSysrootifiedPath($$path)
- return($$sysrootified)
-}
-
-# libs-var, libs, in-paths, out-paths-var
-defineTest(qtConfResolveLibs) {
- ret = true
- paths = $$3
- out =
- copy = false
- for (l, 2) {
- $$copy {
- copy = false
- out += $$l
- } else: equals(l, "-s") {
- # em++ flag to link libraries from emscripten-ports; passed on literally.
- copy = true
- out += $$l
- } else: contains(l, "^-L.*") {
- lp = $$replace(l, "^-L", )
- gcc: lp = $$qtGccSysrootifiedPath($$lp)
- !exists($$lp/.) {
- qtLog("Library path $$val_escape(lp) is invalid.")
- ret = false
- } else {
- paths += $$lp
- }
- } else: contains(l, "^-l.*") {
- lib = $$replace(l, "^-l", )
- lcan =
- integrity:contains(lib, "^.*\\.a") {
- # INTEGRITY compiler searches for exact filename
- # if -l argument has .a suffix
- lcan += $${lib}
- } else: contains(lib, "^:.*") {
- # Use exact filename when -l:filename syntax is used.
- lib ~= s/^://
- lcan += $${lib}
- } else: unix {
- # Under UNIX, we look for actual shared libraries, in addition
- # to static ones.
- shexts = $$QMAKE_EXTENSION_SHLIB $$QMAKE_EXTENSIONS_AUX_SHLIB
- for (ext, shexts) {
- lcan += $${QMAKE_PREFIX_SHLIB}$${lib}.$${ext}
- }
- lcan += \
- $${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB}
- } else {
- # Under Windows, we look only for static libraries, as even for DLLs
- # one actually links against a static import library.
- mingw {
- lcan += \
- # MinGW supports UNIX-style library naming in addition to
- # the MSVC style.
- lib$${lib}.dll.a lib$${lib}.a \
- # Fun fact: prefix-less libraries are also supported.
- $${lib}.dll.a $${lib}.a
- }
- lcan += $${lib}.lib
- }
- l = $$qtConfFindInPathList($$lcan, $$paths $$EXTRA_LIBDIR $$QMAKE_DEFAULT_LIBDIRS)
- isEmpty(l) {
- qtLog("None of [$$val_escape(lcan)] found in [$$val_escape(paths)] and global paths.")
- ret = false
- } else {
- out += $$l
- }
- } else {
- out += $$l
- }
- }
- $$1 = $$out
- export($$1)
- !isEmpty(4) {
- $$4 = $$paths
- export($$4)
- }
- return($$ret)
-}
-
-# source-var
-defineTest(qtConfResolveAllLibs) {
- ret = true
- !qtConfResolveLibs($${1}.libs, $$eval($${1}.libs), , $${1}.libdirs): \
- ret = false
- for (b, $${1}.builds._KEYS_): \
- !qtConfResolveLibs($${1}.builds.$${b}, $$eval($${1}.builds.$${b}), $$eval($${1}.libdirs), ): \
- ret = false
- return($$ret)
-}
-
-# libs-var, in-paths, libs
-defineTest(qtConfResolvePathLibs) {
- ret = true
- gcc: 2 = $$qtGccSysrootifiedPaths($$2)
- for (libdir, 2) {
- !exists($$libdir/.) {
- qtLog("Library path $$val_escape(libdir) is invalid.")
- ret = false
- }
- }
- !qtConfResolveLibs($$1, $$3, $$2): \
- ret = false
- return($$ret)
-}
-
-defineReplace(qtConfGetTestSourceList) {
- result =
- !isEmpty($${1}.test.inherit) {
- base = $$section(1, ., 0, -2)
- for (i, $${1}.test.inherit): \
- result += $$qtConfGetTestSourceList($${base}.$$i)
- }
- return($$result $$1)
-}
-
-defineReplace(qtConfGetTestIncludes) {
- defined($${1}._KEYS_, var) {
- 1st = $$first($${1}._KEYS_)
- equals(1st, 0) {
- # array; recurse for every element
- ret =
- for (k, $${1}._KEYS_): \
- ret += $$qtConfGetTestIncludes($${1}.$$k)
- return($$ret)
- }
- # object; try condition and recurse
- !defined($${1}.headers, var):!defined($${1}.headers._KEYS_, var): \ # just plain broken without it
- error("headers object '$$1' has no nested headers entry")
- cond = $$eval($${1}.condition)
- isEmpty(cond): \ # would be pointless otherwise
- error("headers object '$$1' has no condition")
- !$$qtConfEvaluate($$cond) {
- qtLog("header entry '$$1' failed condition '$$cond'.")
- return()
- }
- qtLog("header entry '$$1' passed condition.")
- return($$qtConfGetTestIncludes($${1}.headers))
- }
- return($$eval($$1)) # plain string - or nothing (can happen for top-level call only)
-}
-
-# includes-var, in-paths, test-object-var
-defineTest(qtConfResolvePathIncs) {
- ret = true
- gcc: 2 = $$qtGccSysrootifiedPaths($$2)
- for (incdir, 2) {
- !exists($$incdir/.) {
- qtLog("Include path $$val_escape(incdir) is invalid.")
- ret = false
- }
- }
- 2 -= $$QMAKE_DEFAULT_INCDIRS
- $$1 = $$2
- export($$1)
- wasm {
- # FIXME: emcc downloads pre-built libraries and adds their include
- # path to the clang call dynamically. it would be possible to parse
- # the emcc -s USE_xyz=1 --cflags output to populate xzy_INCDIR and
- # thus make the code below work.
- return($$ret)
- }
- tests = $$qtConfGetTestSourceList($$3)
- hdrs =
- for (test, tests): \
- hdrs += $$qtConfGetTestIncludes($${test}.headers)
- for (hdr, hdrs) {
- h = $$qtConfFindInPathList($$hdr, $$2 $$EXTRA_INCLUDEPATH $$QMAKE_DEFAULT_INCDIRS)
- isEmpty(h) {
- qtLog("$$hdr not found in [$$val_escape(2)] and global paths.")
- ret = false
- }
- }
- return($$ret)
-}
-
-# the library is specified inline in a 'libs' field.
-# overrides from the command line are accepted.
-defineTest(qtConfLibrary_inline) {
- lib = $$eval($${1}.library)
- !defined($${1}.libs, var):isEmpty($${1}.builds._KEYS_): \
- error("'inline' source in library '$$lib' specifies neither 'libs' nor 'builds'.")
-
- # library lists are specified as strings in the json sources for
- # readability, but it's a pain to work with that, so expand it now.
- eval($${1}.libs = $$eval($${1}.libs))
- export($${1}.libs)
- for (b, $${1}.builds._KEYS_) {
- eval($${1}.builds.$${b} = $$eval($${1}.builds.$${b}))
- export($${1}.builds.$${b})
- }
-
- # if multiple libraries provide the same export, it makes sense
- # to make them recognize the same input variables.
- input = $$eval($${2}.alias)
-
- # build-specific direct libs. overwrites inline libs.
- vars =
- any = false
- all = true
- for (b, $$list(debug release)) {
- iv = $${input}.libs.$${b}
- vars += $$eval(config.commandline.rev_assignments.$${iv})
- defined(config.input.$${iv}, var) {
- eval($${1}.builds.$${b} = $$eval(config.input.$${iv}))
- $${1}.builds._KEYS_ *= $${b}
- any = true
- } else {
- all = false
- }
- }
- $$any {
- !$$all {
- qtConfAddError("Either none or all of $$join(vars, ", ", [, ]) must be specified.")
- return(false)
- }
- export($${1}.builds._KEYS_)
- # we also reset the generic libs, to avoid surprises.
- $${1}.libs =
- }
-
- # direct libs. overwrites inline libs.
- defined(config.input.$${input}.libs, var): \
- eval($${1}.libs = $$eval(config.input.$${input}.libs))
-
- includes = $$eval(config.input.$${input}.incdir)
-
- # prefix. prepends to (possibly overwritten) inline libs.
- prefix = $$eval(config.input.$${input}.prefix)
- !isEmpty(prefix) {
- includes += $$prefix/include
- $${1}.libs = -L$$prefix/lib $$eval($${1}.libs)
- }
-
- libdir = $$eval(config.input.$${input}.libdir)
- !isEmpty(libdir) {
- libs =
- for (ld, libdir): \
- libs += -L$$ld
- $${1}.libs = $$libs $$eval($${1}.libs)
- }
-
- !qtConfResolveAllLibs($$1): \
- return(false)
-
- !qtConfResolvePathIncs($${1}.includedir, $$includes, $$2): \
- return(false)
-
- return(true)
-}
-
-# the library is provided by the qmake spec.
-# this source type cannot fail.
-defineTest(qtConfLibrary_makeSpec) {
- spec = $$eval($${1}.spec)
- isEmpty(spec): \
- error("makeSpec source in library '$$eval($${1}.library)' does not specify 'spec'.")
-
- !qtConfResolvePathLibs($${1}.libs, $$eval(QMAKE_LIBDIR_$$spec), $$eval(QMAKE_LIBS_$$spec)): \
- return(false)
-
- !qtConfResolvePathIncs($${1}.includedir, $$eval(QMAKE_INCDIR_$$spec), $$2): \
- return(false)
-
- !isEmpty(QMAKE_EXPORT_INCDIR_$$spec) {
- $${1}.exportincludedir = $$eval(QMAKE_EXPORT_INCDIR_$$spec)
- export($${1}.exportincludedir)
- }
-
- # note that the object is re-exported, because we resolve the libraries.
-
- return(true)
-}
-
-# the library is found via pkg-config.
-defineTest(qtConfLibrary_pkgConfig) {
- pkg_config = $$qtConfPkgConfig($$eval($${1}.host))
- isEmpty(pkg_config) {
- qtLog("pkg-config use disabled globally.")
- return(false)
- }
- args = $$qtConfPrepareArgs($$eval($${1}.args))
-
- !qtConfPkgConfigPackageExists($$pkg_config, $$args) {
- qtLog("pkg-config did not find package.")
- return(false)
- }
-
- qtRunLoggedCommand("$$pkg_config --modversion $$args", version)|return(false)
- version ~= s/[^0-9.].*$//
- $${1}.version = $$first(version)
- export($${1}.version)
-
- qtRunLoggedCommand("$$pkg_config --libs-only-L $$args", libpaths)|return(false)
- qtRunLoggedCommand("$$pkg_config --libs-only-l $$args", libs)|return(false)
- eval(libs = $$libpaths $$libs)
- !qtConfResolveLibs($${1}.libs, $$libs): \
- return(false)
- contains($${1}.libs, ".*\\.$${QMAKE_EXTENSION_STATICLIB}$") {
- qtRunLoggedCommand("$$pkg_config --static --libs-only-L $$args", libpaths)|return(false)
- qtRunLoggedCommand("$$pkg_config --static --libs-only-l $$args", libs)|return(false)
- eval(libs = $$libpaths $$libs)
- !qtConfResolveLibs($${1}.libs, $$libs): \
- return(false)
- }
-
- qtRunLoggedCommand("$$pkg_config --cflags $$args", $${1}.cflags)|return(false)
- # Split CFLAGS into stuff that goes into DEFINES, INCLUDEPATH, and other stuff.
- # The compound variable is still set in case something wants to use it outside
- # regular library exports.
- defines =
- includes =
- ignored =
- eval(cflags = $$eval($${1}.cflags))
- for (i, cflags) {
- contains(i, "-I.*") {
- i ~= s/^-I//
- includes += $$i
- } else: contains(i, "-D.*") {
- i ~= s/^-D//
- defines += $$i
- } else {
- # Sometimes, pkg-config files include other flags
- # we really don't need and shouldn't add.
- ignored += $$i
- }
- }
- !isEmpty(ignored): \
- qtLog("Note: Dropped compiler flags '$$ignored'.")
- !qtConfResolvePathIncs($${1}.includedir, $$includes, $$2): \
- return(false)
- $${1}.defines = $$defines
-
- # now remove the content of the transitive deps we know about.
- largs = $$qtConfAllLibraryArgs($$eval($${2}.dependencies))
- for (la, largs): \
- eval("$$la")
- USES = $$eval($$list($$upper($$replace(QMAKE_USE, -, _))))
- # _CC == _LD for configure's library sources, so pick first arbitrarily.
- DEPS = $$resolve_depends(USES, QMAKE_DEPENDS_, _CC)
- for (DEP, DEPS) {
- $${1}.libs -= $$eval(QMAKE_LIBS_$${DEP})
- $${1}.includedir -= $$eval(QMAKE_INCDIR_$${DEP})
- $${1}.defines -= $$eval(QMAKE_DEFINES_$${DEP})
- }
- export($${1}.libs)
- export($${1}.includedir)
- export($${1}.defines)
-
- return(true)
-}
-
-defineTest(qtConfTest_getPkgConfigVariable) {
- pkg_config = $$qtConfPkgConfig($$eval($${1}.host))
- isEmpty(pkg_config): \
- return(false)
- args = $$qtConfPrepareArgs($$eval($${1}.pkg-config-args))
-
- !qtConfPkgConfigPackageExists($$pkg_config, $$args): \
- return(false)
-
- variable = $$eval($${1}.pkg-config-variable)
- qtRunLoggedCommand("$$pkg_config --variable=$$variable $$args", $${1}.value)|return(false)
- export($${1}.value)
- $${1}.cache += value
- export($${1}.cache)
- return(true)
-}
-
-defineReplace(qtConfLibraryArgs) {
- NAME = $$upper($$replace($${1}.library, -, _))
- qmake_args = "QMAKE_LIBS_$${NAME} = $$val_escape($${1}.libs)"
- for (b, $${1}.builds._KEYS_): \
- qmake_args += "QMAKE_LIBS_$${NAME}_$$upper($$b) = $$val_escape($${1}.builds.$${b})"
- includedir = $$eval($${1}.includedir)
- !isEmpty(includedir): \
- qmake_args += "QMAKE_INCDIR_$${NAME} = $$val_escape(includedir)"
- defines = $$eval($${1}.defines)
- !isEmpty(defines): \
- qmake_args += "QMAKE_DEFINES_$${NAME} = $$val_escape(defines)"
- depends = $$eval($${2}.dependencies)
- !isEmpty(depends) {
- dep_uses =
- for (use, depends): \
- dep_uses += $$section(use, :, 1, 1)
- qmake_args += \
- "QMAKE_DEPENDS_$${NAME}_CC = $$upper($$replace(dep_uses, -, _))" \
- "QMAKE_DEPENDS_$${NAME}_LD = $$upper($$replace(dep_uses, -, _))"
- }
- return($$qmake_args)
-}
-
-defineReplace(qtConfAllLibraryArgs) {
- isEmpty(1): return()
- dep_uses =
- for (use, 1): \
- dep_uses += $$section(use, :, 1, 1)
- dep_args =
- seen =
- for(ever) {
- isEmpty(1): break()
- use = $$take_last(1)
- contains(seen, $$use): next()
- seen += $$use
- use_cfg = $$section(use, :, 0, 0)
- !isEmpty(use_cfg) {
- use_lib = $$section(use, :, 1, 1)
- lpfx = $${use_cfg}.libraries.$$use_lib
- dep_args += $$qtConfLibraryArgs($${lpfx}.sources.$$eval($${lpfx}.source), $$lpfx)
- 1 += $$eval($${lpfx}.dependencies)
- }
- }
- return("QMAKE_USE += $$dep_uses" $$dep_args)
-}
-
-defineTest(qtConfExportLibrary) {
- lpfx = $${currentConfig}.libraries.$$1
- alias = $$eval($${lpfx}.alias)
- $${currentConfig}.found.$$alias = $$1
- export($${currentConfig}.found.$$alias)
- name = $$eval($${lpfx}.export)
- isEmpty(name): return()
- spfx = $${lpfx}.sources.$$eval($${lpfx}.source)
- !$$qtConfEvaluate($$eval($${spfx}.export)): return()
-
- output = privatePro
- NAME = $$upper($$name)
- # LIBS is emitted even if empty, as this allows the library to be "seen".
- libs = $$eval($${spfx}.libs)
- qtConfOutputVar(assign, $$output, QMAKE_LIBS_$$NAME, $$libs)
- for (b, $${spfx}.builds._KEYS_) {
- blibs = $$eval($${spfx}.builds.$${b})
- qtConfOutputVar(assign, $$output, QMAKE_LIBS_$${NAME}_$$upper($$b), $$blibs)
- }
- defines = $$eval($${spfx}.defines)
- !isEmpty(defines): qtConfOutputVar(assign, $$output, QMAKE_DEFINES_$$NAME, $$defines)
- includes = $$eval($${spfx}.exportincludedir)
- !equals(includes, -) {
- isEmpty(includes): includes = $$eval($${spfx}.includedir)
- !isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes)
- }
- uses = $$eval($${lpfx}.dependencies)
- !isEmpty(uses) {
- # FIXME: ideally, we would export transitive deps only for static
- # libs, to not extend the link interface unduly. however, the system
- # does currently not differentiate between public and private deps.
- depends =
- for (use, uses) {
- use_cfg = $$section(use, :, 0, 0)
- use_lib = $$section(use, :, 1, 1)
- !isEmpty(use_cfg): \
- depends += $$upper($$eval($${use_cfg}.libraries.$${use_lib}.export))
- else: \
- depends += $$upper($$replace(use_lib, -, _))
- }
- # we use suffixes instead of infixes, because $$resolve_depends() demands it.
- qtConfOutputVar(assign, $$output, QMAKE_DEPENDS_$${NAME}_CC, $$depends)
- qtConfOutputVar(assign, $$output, QMAKE_DEPENDS_$${NAME}_LD, $$depends)
- }
- !isEmpty($${currentConfig}.module): \
- qtConfExtendVar($$output, "QT.$${currentModule}_private.libraries", $$name)
-}
-
-defineTest(qtConfHandleLibrary) {
- lpfx = $${currentConfig}.libraries.$$1
- defined($${lpfx}.result, var): return()
-
- alias = $$eval($${lpfx}.alias)
- !isEmpty($${currentConfig}.found.$$alias) {
- # this happening indicates a logic error in the conditions
- # of the feature(s) referring to this library.
- # note that this does not look across module boundaries, as
- # multiple modules may know the same libraries; de-duplication
- # happens via the cache (obviously, this assumes identical
- # definitions and logic).
- error("A library exporting '$$alias' was already found.")
- }
-
- qtConfEnsureTestTypeDeps("library")
- !qtConfTestPrepare_compile($$lpfx) {
- $${lpfx}.result = false
- export($${lpfx}.result)
- return()
- }
- $${lpfx}.dependencies = $$eval($${lpfx}.resolved_uses)
- export($${lpfx}.dependencies)
-
- qtConfLoadResult($${lpfx}, $$1, "library") {
- $$eval($${lpfx}.result): \
- qtConfExportLibrary($$1)
- return()
- }
-
- qtLogTestIntro($${lpfx}, "looking for library $${1}")
- qtPersistLog()
-
- result = false
- for (s, $${lpfx}.sources._KEYS_) {
- spfx = $${lpfx}.sources.$${s}
-
- t = $$eval($${spfx}.type)
- call = qtConfLibrary_$$t
- !defined($$call, test): \
- error("Library $${1} source $${s} has unknown type '$$t'")
-
- qtLog("Trying source $$s (type $$t) of library $${1} ...")
-
- cond = $$eval($${spfx}.condition)
- !$$qtConfEvaluate($$cond) {
- qtLog(" => source failed condition '$$cond'.")
- next()
- }
-
- !$${call}($$spfx, $$lpfx) {
- qtLog(" => source produced no result.")
- next()
- }
-
- $${lpfx}.source = $$s
- export($${lpfx}.source)
-
- # if the library defines a test, use it to verify the source.
- defined($${lpfx}.test, var)|defined($${lpfx}.test._KEYS_, var) {
- $${lpfx}.resolved_uses = $$currentConfig:$$1
- $${lpfx}.host = $$eval($${spfx}.host)
- !qtConfTest_compile($$lpfx) {
- qtLog(" => source failed verification.")
- next()
- }
- }
-
- qtLog(" => source accepted.")
-
- $${lpfx}.cache += source
- for (v, $$list(libs includedir cflags version export)): \
- $${lpfx}.cache += sources.$${s}.$${v}
- for (b, $${spfx}.builds._KEYS_): \
- $${lpfx}.cache += sources.$${s}.builds.$${b}
-
- # immediately output the library as well.
- qtConfExportLibrary($$1)
-
- result = true
- break()
- }
-
- $${lpfx}.msgs = $$qtPersistedLog()
- export($${lpfx}.msgs)
-
- qtLogTestResult($${lpfx}, $$result)
-
- $${lpfx}.result = $$result
- export($${lpfx}.result)
- qtConfSaveResult($${lpfx}, $$1)
-}
-
-# This is a fake test type for the test dependency system.
-defineTest(qtConfTest_library) {
- error("The test type 'library' may not be instantiated.")
-}
-
-defineTest(qtConfTestPrepare_compile) {
- !isEmpty($${1}.use._KEYS_) {
- uses =
- for (k, $${1}.use._KEYS_) {
- use = $$eval($${1}.use.$${k}.lib)
- isEmpty(use): \
- error("'use' entry $$k in test $$1 lacks 'lib' field.")
- !$$qtConfEvaluate($$eval($${1}.use.$${k}.condition)): \
- next()
- uses += $$use
- }
- } else {
- uses = $$split($${1}.use)
- }
- for (u, uses) {
- libConfig =
- exports = $$eval($${currentConfig}.exports.$$u)
- !isEmpty(exports) {
- # using a local library by exported name.
- ru = $$eval($${currentConfig}.found.$$u)
- !isEmpty(ru) {
- # if it was already found, all is good.
- u = $$ru
- } else: count(exports, 1) {
- # otherwise, if there is only one option, ensure it's resolved.
- u = $$exports
- qtConfHandleLibrary($$u)
- } else {
- # otherwise, verify that all options were resolved.
- for (x, exports) {
- isEmpty($${currentConfig}.libraries.$${x}.result) {
- # the higher-level logic is in the features, which we cannot
- # infer from here. so the only option is failing.
- error("Test $$1 refers to yet unresolved library export '$$u'")
- }
- }
- return(false)
- }
- libConfig = $$currentConfig
- } else: contains($${currentConfig}.libraries._KEYS_, $$u) {
- # using a local library by real name. this should be the exception.
- qtConfHandleLibrary($$u)
- libConfig = $$currentConfig
- } else {
- for (d, QMAKE_LIBRARY_DEPS) {
- exports = $$eval($${d}.exports.$$u)
- !isEmpty(exports) {
- # using a foreign library by exported name.
- # foreign libraries may be external (if they are from a different
- # repository and the build is modular), and using these by real
- # name is impossible. so for consistency, uses by real name are
- # limited to local libraries.
- ru = $$eval($${d}.found.$$u)
- !isEmpty(ru) {
- u = $$ru
- libConfig = $$d
- break()
- }
- for (x, exports) {
- isEmpty($${d}.libraries.$${x}.result): \
- error("Test $$1 refers to unresolved library export '$$u' in '$$d'")
- }
- return(false)
- }
- }
- }
- isEmpty(libConfig) {
- nu = $$upper($$replace(u, -, _))
- !defined(QMAKE_LIBS_$$nu, var): \
- error("Test $$1 tries to use undeclared library '$$u'")
- # using an external library by exported name.
- $${1}.resolved_uses += :$$u
- } else {
- lpfx = $${libConfig}.libraries.$${u}
- !equals($${lpfx}.result, true): \
- return(false)
- $${1}.resolved_uses += $$libConfig:$$u
- }
- }
- export($${1}.resolved_uses)
- return(true)
-}
-
-defineTest(qtConfPrepareCompileTestSource) {
- test_dir = $$2
-
- tests = $$qtConfGetTestSourceList($$1)
-
- test_lang = "c++"
- for (test, tests): \
- test_lang += $$eval($${test}.test.lang)
- test_lang = $$last(test_lang) # Last non-empty, that is.
-
- equals(test_lang, "c++"): suffix = "cpp"
- else: equals(test_lang, "c"): suffix = "c"
- else: equals(test_lang, "objc"): suffix = "m"
- else: equals(test_lang, "objc++"): suffix = "mm"
- else: error("Unknown language '$$test_lang' in compile test $$1")
-
- # Create source code
- contents = "/* Generated by configure */"
- # Custom code before includes
- for (test, tests): \
- for (ent, $$qtConfScalarOrList($${test}.test.head)): \
- contents += $$ent
- # Includes
- for (test, tests) {
- hdrs = $$qtConfGetTestIncludes($${test}.test.include)
- isEmpty(hdrs): \
- hdrs = $$qtConfGetTestIncludes($${test}.headers)
- for (ent, hdrs): \
- contents += "$${LITERAL_HASH}include <$$ent>"
- }
- # Custom code after includes
- for (test, tests): \
- for (ent, $$qtConfScalarOrList($${test}.test.tail)): \
- contents += $$ent
- # And finally the custom code inside main()
- contents += \
- "int main(int argc, char **argv)" \
- "{" \
- " (void)argc; (void)argv;" \
- " /* BEGIN TEST: */"
- for (test, tests): \
- for (ent, $$qtConfScalarOrList($${test}.test.main)): \
- contents += " $$ent"
- contents += \
- " /* END TEST */" \
- " return 0;" \
- "}"
- write_file($$test_dir/main.$$suffix, contents)|error()
-
- for (test, tests) {
- for (file, $$qtConfScalarOrList($${test}.test.files._KEYS_)): \
- write_file($$test_dir/$$file, $$qtConfScalarOrList($${test}.test.files.$${file}))|error()
- }
-
- # Create stub .pro file
- contents = "SOURCES = main.$$suffix"
- # Custom project code
- pwd = $$val_escape($${currentConfig}.dir)
- for (test, tests): \
- for (ent, $$qtConfScalarOrList($${test}.test.qmake)): \
- contents += $$replace(ent, "@PWD@", $$pwd)
- write_file($$test_dir/$$basename(test_dir).pro, contents)|error()
-}
-
-defineTest(qtConfTest_compile) {
- test = $$eval($${1}.test)
- host = $$eval($${1}.host)
- isEmpty(host): host = false
-
- test_base_out_dir = $$OUT_PWD/$$basename(QMAKE_CONFIG_TESTS_DIR)
- isEmpty(test) {
- test_dir = $$test_base_out_dir/$$section(1, ".", -1)
- test_out_dir = $$test_dir
- qtConfPrepareCompileTestSource($$1, $$test_dir)
- } else {
- test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$test
- test_out_dir = $$test_base_out_dir/$$test
- !isEmpty($${1}.pro): \
- test_dir = $$test_dir/$$eval($${1}.pro)
- }
- test_cmd_base = "$$QMAKE_CD $$system_quote($$system_path($$test_out_dir)) &&"
-
- qmake_args = $$qtConfPkgConfigEnv()$$system_quote($$system_path($$QMAKE_QMAKE))
- !isEmpty(QMAKE_QTCONF): \
- qmake_args += -qtconf $$system_quote($$QMAKE_QTCONF)
-
- # Disable qmake features which are typically counterproductive for tests
- qmake_args += "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\""
-
- # allow tests to behave differently depending on the type of library
- # being built (shared/static). e.g. see config.tests/unix/icu
- shared: \
- qmake_configs = "shared"
- else: \
- qmake_configs = "static"
-
- use_gold_linker: \
- qmake_configs += "use_gold_linker"
-
- # disable warnings from the builds, since they're just noise at this point.
- qmake_configs += "warn_off"
-
- # add console to the CONFIG variable when running the tests, so that they
- # can work with a regular main() entry point on Windows.
- qmake_configs += "console"
-
- # for platforms with multiple architectures (macOS, iOS, tvOS, watchOS),
- # make sure tests are only built for a single architecture
- qmake_configs += "single_arch"
-
- qmake_args += "\"CONFIG += $$qmake_configs\""
-
- !$$host|!cross_compile {
- # On WinRT we need to change the entry point as we cannot create windows
- # applications
- winrt: \
- qmake_args += " \"QMAKE_LFLAGS += /ENTRY:main\""
-
- # add compiler flags, these are set for the target and should not be applied to host tests
- !isEmpty(EXTRA_DEFINES): \
- qmake_args += $$system_quote(DEFINES += $$val_escape(EXTRA_DEFINES))
- !isEmpty(EXTRA_LIBDIR): \
- qmake_args += $$system_quote(QMAKE_LIBDIR += $$val_escape(EXTRA_LIBDIR))
- !isEmpty(EXTRA_FRAMEWORKPATH): \
- qmake_args += $$system_quote(QMAKE_FRAMEWORKPATH += $$val_escape(EXTRA_FRAMEWORKPATH))
- !isEmpty(EXTRA_INCLUDEPATH): \
- qmake_args += $$system_quote(INCLUDEPATH += $$val_escape(EXTRA_INCLUDEPATH))
- qmake_args += $$EXTRA_QMAKE_ARGS
- }
-
- # make sure to make this the last override (because of -early)
- cross_compile {
- # must be done before loading default_pre.prf.
- qmake_args += -early "\"CONFIG += cross_compile\""
- }
-
- # Clean up after previous run
- exists($$test_out_dir/Makefile): \
- QMAKE_MAKE = "$$QMAKE_MAKE clean && $$QMAKE_MAKE"
-
- mkpath($$test_out_dir)|error()
- cont = "CONFIG += QTDIR_build"
- write_file($$test_base_out_dir/.qmake.cache, cont)|error()
-
- $${1}.literal_args += $$qtConfAllLibraryArgs($$eval($${1}.resolved_uses))
-
- # add possible command line args
- qmake_args += \
- $$qtConfPrepareArgs($$eval($${1}.args)) \
- $$qtSystemQuote($$eval($${1}.literal_args))
-
- qtRunLoggedCommand("$$test_cmd_base $$qmake_args $$system_quote($$test_dir)") {
- qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE"): \
- return(true)
- }
-
- return(false)
-}
-
-defineTest(qtConfTest_files) {
- for(i, $${1}.files._KEYS_) {
- f = $$eval($${1}.files.$${i})
- qtLog("Searching for file $${f}.")
- contains(f, ".*\\.h") {
- file = $$qtConfFindInPathList($$f, $$EXTRA_INCLUDEPATH $$QMAKE_DEFAULT_INCDIRS)
- } else: contains(f, ".*\\.(lib|so|a)") {
- file = $$qtConfFindInPathList($$f, $$EXTRA_LIBDIR $$QMAKE_DEFAULT_LIBDIRS)
- } else {
- # assume we're looking for an executable
- file = $$qtConfFindInPath($$f, $$EXTRA_PATH)
- }
- isEmpty(file) {
- qtLog(" Not found.");
- return(false)
- }
- qtLog(" Found at $${file}.")
- }
- return(true)
-}
-
-defineTest(logn) {
- log("$${1}$$escape_expand(\\n)")
-}
-
-defineTest(qtLogTestIntro) {
- label = $$eval($${1}.label)
- isEmpty(label): return()
-
- isEmpty(3): log("Checking for $${label}... ")
- $$QMAKE_CONFIG_VERBOSE: log("$$escape_expand(\\n)")
- write_file($$QMAKE_CONFIG_LOG, 2, append)
-}
-
-defineTest(qtLogTestResult) {
- isEmpty($${1}.label): return()
-
- !isEmpty($${1}.log) {
- field = $$eval($${1}.log)
- log_msg = $$eval($${1}.$$field)
- msg = "test $$1 gave result $$log_msg"
- } else: $${2} {
- log_msg = yes
- msg = "test $$1 succeeded"
- } else {
- log_msg = no
- msg = "test $$1 FAILED"
- }
- $$QMAKE_CONFIG_VERBOSE: log_msg = $$msg
- isEmpty(3): logn("$$log_msg")
- write_file($$QMAKE_CONFIG_LOG, msg, append)
-}
-
-defineTest(qtConfSaveResult) {
- equals($${1}.cache, -): \
- return()
- keys = result msgs $$eval($${1}.cache)
- cont = "cache.$${2}._KEYS_ = $$keys"
- cache.$${2}._KEYS_ = $$keys
- export(cache.$${2}._KEYS_)
- for (k, keys) {
- cont += "cache.$${2}.$${k} = $$val_escape($${1}.$${k})"
- cache.$${2}.$${k} = $$eval($${1}.$${k})
- export(cache.$${2}.$${k})
- }
- write_file($$QMAKE_CONFIG_CACHE, cont, append)|error()
-}
-
-defineTest(qtConfLoadResult) {
- equals(QMAKE_CONFIG_CACHE_USE, none): \
- return(false)
- isEmpty(cache.$${2}._KEYS_): \
- return(false)
- equals(QMAKE_CONFIG_CACHE_USE, positive):!$$eval(cache.$${2}.result): \
- return(false)
- for (k, cache.$${2}._KEYS_) {
- $${1}.$${k} = $$eval(cache.$${2}.$${k})
- export($${1}.$${k})
- }
- # we could print the cached result, but that's basically just noise -
- # the explicitly generated summary is supposed to contain all relevant
- # information.
- qtLogTestIntro($$1, "loaded result for $$3 $$1", false)
- qtLog($$eval($${1}.msgs))
- qtLogTestResult($$1, $$eval($${1}.result), false)
- return(true)
-}
-
-defineTest(qtConfIsBoolean) {
- equals(1, "true")|equals(1, "false"): \
- return(true)
- return(false)
-}
-
-defineTest(qtConfSetupTestTypeDeps) {
- for (tt, $${currentConfig}.testTypeDependencies._KEYS_) {
- !defined(qtConfTest_$${tt}, test): \
- error("Declaring dependency for undefined test type '$$tt'.")
- for (f, $${currentConfig}.testTypeDependencies.$${tt}._KEYS_) {
- feature = $$eval($${currentConfig}.testTypeDependencies.$${tt}.$${f})
- isEmpty($${currentConfig}.features.$${feature}._KEYS_): \
- error("Test type '$$tt' depends on undefined feature '$$feature'.")
- }
- }
- # Test type aliasing means that one test type's callback is called by
- # another test type's callback. Put differently, one callback forwards
- # the call to another one. The former representation is more natural
- # (and concise) to write, while the latter is more efficient to process.
- # Hence, this function inverts the mapping.
- for (tt, $${currentConfig}.testTypeAliases._KEYS_) {
- !defined(qtConfTest_$${tt}, test): \
- error("Aliasing undefined test type '$$tt'.")
- for (tta, $${currentConfig}.testTypeAliases.$${tt}._KEYS_) {
- type = $$eval($${currentConfig}.testTypeAliases.$${tt}.$${tta})
- !defined(qtConfTest_$${type}, test): \
- error("Aliasing '$$tt' to undefined test type '$$type'.")
- $${currentConfig}.testTypeForwards.$${type} += $$tt
- export($${currentConfig}.testTypeForwards.$${type})
- }
- }
-}
-
-defineTest(qtConfEnsureTestTypeDepsOne) {
- depsn = $${currentConfig}.testTypeDependencies.$${1}._KEYS_
- !isEmpty($$depsn) {
- for (dep, $$depsn) {
- feature = $$eval($${currentConfig}.testTypeDependencies.$${1}.$${dep})
- !qtConfCheckFeature($$feature): \
- error("Test type '$$1' depends on non-emitted feature $${feature}.")
- }
- $$depsn =
- export($$depsn)
- }
- fwdsn = $${currentConfig}.testTypeForwards.$${1}
- !isEmpty($$fwdsn) {
- for (fwd, $$fwdsn): \
- qtConfEnsureTestTypeDepsOne($$fwd)
- $$fwdsn =
- export($$fwdsn)
- }
-}
-
-defineTest(qtConfEnsureTestTypeDeps) {
- qtConfEnsureTestTypeDepsOne($$1)
- currentConfig = config.builtins
- qtConfEnsureTestTypeDepsOne($$1)
-}
-
-defineTest(qtRunSingleTest) {
- tpfx = $${currentConfig}.tests.$${1}
- defined($${tpfx}.result, var): \
- return()
-
- type = $$eval($${tpfx}.type)
- call = "qtConfTest_$$type"
- !defined($$call, test): \
- error("Configure test $${1} refers to nonexistent type $$type")
-
- qtConfEnsureTestTypeDeps($$type)
-
- preCall = "qtConfTestPrepare_$$type"
- defined($$preCall, test):!$${preCall}($${tpfx}) {
- $${tpfx}.result = false
- export($${tpfx}.result)
- # don't cache the result; the pre-deps have their own caches.
- return()
- }
-
- # note: we do this only after resolving the dependencies and the
- # preparation (which may resolve libraries), so that caching does
- # not alter the execution order (and thus the output).
- qtConfLoadResult($${tpfx}, $$1, "config test"): \
- return()
-
- qtLogTestIntro($${tpfx}, "executing config test $${1}")
- qtPersistLog()
-
- result = false
- $${call}($${tpfx}): result = true
-
- $${tpfx}.msgs = $$qtPersistedLog()
- export($${tpfx}.msgs)
-
- qtLogTestResult($${tpfx}, $$result)
-
- $${tpfx}.result = $$result
- export($${tpfx}.result)
- qtConfSaveResult($${tpfx}, $$1)
-}
-
-defineTest(qtConfHaveModule) {
- module = $$replace(1, -, _)
- !isEmpty(QT.$${module}.skip):$$eval(QT.$${module}.skip): \
- return(false)
- !isEmpty(QT.$${module}.name): \
- return(true)
- return(false)
-}
-
-defineReplace(qtConfEvaluate) {
- isEmpty(1): return(true)
-
- 1 ~= s/$$escape_expand(\\t)/ /g
- 1 ~= s/$$escape_expand(\\r)//g
- 1 ~= s/$$escape_expand(\\n) */ /g
- expr = $${1}
- expr ~= s/&&/ && /g
- expr ~= s/\\|\\|/ || /g
- expr ~= s/!/ ! /g
- expr ~= s/\\(/ ( /g
- expr ~= s/\\)/ ) /g
- expr ~= s/ *== */==/g
- expr ~= s/ *! = */!=/g
- expr_list = $$eval($$list($$expr))
- return($$qtConfEvaluateSubExpression($${1}, $$expr_list, 0))
-}
-
-defineReplace(qtConfEvaluateSingleExpression) {
- e = $${2}
-
- equals(e, true) {
- result = true
- } else: equals(e, false) {
- result = false
- } else: contains(e, "^[0-9]+$") {
- # numbers
- result = $$e
- } else: contains(e, "^'.*'$") {
- # quoted literals
- result = $$replace(e, "^'(.*)'$", "\\1")
- } else: contains(e, "^tests\\..*") {
- !qt_conf_tests_allowed: \
- error("Expression '$${1}' refers to a test, which is not allowed at this stage of configuring.")
- test = $$section(e, ".", 1, 1)
- var = $$section(e, ".", 2, -1)
- isEmpty(var): \
- var = result
- !contains($${currentConfig}.tests._KEYS_, $$test): \
- error("Unknown test object $${test} in expression '$${1}'.")
- qtRunSingleTest($$test)
- result = $$eval($${currentConfig}.tests.$${test}.$${var})
- } else: contains(e, "^libs\\..*") {
- !qt_conf_tests_allowed: \
- error("Expression '$${1}' refers to a library, which is not allowed at this stage of configuring.")
- lib = $$section(e, ".", 1, 1)
- var = $$section(e, ".", 2, -1)
- isEmpty(var): \
- var = result
- !contains($${currentConfig}.libraries._KEYS_, $$lib): \
- error("Unknown library object $${lib} in expression '$${1}'.")
- qtConfHandleLibrary($$lib)
- !defined($${currentConfig}.libraries.$${lib}.$${var}, var): \
- var = sources.$$eval($${currentConfig}.libraries.$${lib}.source).$$var
- result = $$eval($${currentConfig}.libraries.$${lib}.$${var})
- } else: contains(e, "^features\\..*") {
- feature = $$section(e, ".", 1, 1)
- var = $$section(e, ".", 2, -1)
- isEmpty(var): \
- var = available
- !contains($${currentConfig}.features._KEYS_, $$feature) {
- # this is basically a copy of what qtConfig() in qt_build_config.prf
- # does, but we produce a nicer error message.
- for (module, QMAKE_CONFIG_DEPS) {
- contains(QT.$${module}.enabled_features, $$feature): \
- result = true
- else: contains(QT.$${module}.disabled_features, $$feature): \
- result = false
- else: \
- next()
- !equals(var, available): \
- error("Expression '$$1' is accessing field '$$var' of non-local feature $${feature}.")
- return($$result)
- }
- error("Unknown feature object $${feature} in expression '$${1}'.")
- }
- !qtConfCheckFeature($$feature): \
- error("Expression '$$1' is accessing non-emitted feature $${feature}.")
- result = $$eval($${currentConfig}.features.$${feature}.$${var})
- } else: contains(e, "^config\\..*") {
- var = $$replace(e, "^config\\.", "")
- result = false
- contains(CONFIG, $$var): result = true
- } else: contains(e, "^module\\..*") {
- var = $$replace(e, "^module\\.", "")
- result = false
- qtConfHaveModule($$var): result = true
- } else: contains(e, "^arch\\..*") {
- var = $$replace(e, "^arch\\.", "")
- result = false
- isEmpty(QT_ARCH): \
- qtConfCheckFeature(architecture)
- contains(QT_ARCH, $$var): result = true
- } else: contains(e, "^subarch\\..*") {
- var = $$replace(e, "^subarch\\.", "")
- result = false
- isEmpty(QT_ARCH): \
- qtConfCheckFeature(architecture)
- contains(QT_CPU_FEATURES.$$QT_ARCH, $$var): result = true
- } else: contains(e, "^input\\..*") {
- result = $$eval(config.$$e)
- } else: contains(e, "^var\\..*") {
- var = $$replace(e, "^var\\.", "")
- result = $$eval($$var)
- } else: contains(e, "^call\\..*") {
- call = $$replace(e, "^call\\.", "qtConfFunc_")
- !defined($$call, replace): \
- error("Call $$call referenced in expression '$${1}' does not exist")
- eval(result = \$\$"$$call"())
- } else {
- error("Unrecognized token $$e in expression '$${1}'")
- }
- return($$result)
-}
-
-defineReplace(qtConfEvaluateSubExpression) {
- expr_list = $${2}
- result = true
- negate = false
- runSubExpression = false
- nesting_level = 0
- for (n, $${3}..$$num_add($$size(expr_list), -1)) {
- e = $$member(expr_list, $$n)
- $$runSubExpression {
- runSubExpression = false
- result = $$qtConfEvaluateSubExpression($${1}, $$expr_list, $$n)
- } else: isEqual(e, "(") {
- isEqual(nesting_level, 0): runSubExpression = true
- nesting_level = $$num_add($$nesting_level, 1)
- next()
- } else: isEqual(e, ")") {
- nesting_level = $$num_add($$nesting_level, -1)
- lessThan(nesting_level, 0): break()
- next()
- } else: greaterThan(nesting_level, 0) {
- next()
- } else: isEqual(e, "!") {
- negate = true
- next()
- } else: isEqual(e, "&&") {
- !qtConfIsBoolean($$result): \
- error("Left hand side of && is non-boolean value '$$result' in expression '$${1}'")
- !$$result: return(false)
- } else: isEqual(e, "||") {
- !qtConfIsBoolean($$result): \
- error("Left hand side of || is non-boolean value '$$result' in expression '$${1}'")
- $$result: return(true)
- } else {
- contains(e, ".*==.*") {
- lhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, "==.*", ""))
- rhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, ".*==", ""))
- result = false
- equals(lhs, $$rhs): result = true
- } else: contains(e, ".*!=.*") {
- lhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, "!=.*", ""))
- rhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, ".*!=", ""))
- result = false
- !equals(lhs, $$rhs): result = true
- } else {
- result = $$qtConfEvaluateSingleExpression($${1}, $$e)
- }
- }
- $$negate {
- !qtConfIsBoolean($$result): \
- error("Attempting to negate a non-boolean value '$$result' in expression '$${1}'")
- $$result: \
- result = false
- else: \
- result = true
- negate = false
- }
- }
- return($$result)
-}
-
-defineReplace(qtIsFeatureEnabled) {
- enable = $$eval($${currentConfig}.features.$${1}.enable)
- !isEmpty(enable) {
- $$qtConfEvaluate($$enable): \
- return(true)
- } else {
- equals(config.input.$${1}, "yes"): \
- return(true)
- }
-
- return(false)
-}
-
-defineReplace(qtIsFeatureDisabled) {
- disable = $$eval($${currentConfig}.features.$${1}.disable)
- !isEmpty(disable) {
- $$qtConfEvaluate($$disable): \
- return(true)
- } else {
- equals(config.input.$${1}, "no"): \
- return(true)
- }
-
- return(false)
-}
-
-defineReplace(qtConfCheckSingleCondition) {
- result = $$qtConfEvaluate($$2)
-
- !qtConfIsBoolean($$result): \
- error("Evaluation of condition '$$2' yielded non-boolean value '$$result' in feature '$${1}'.")
-
- !$$result {
- $${3} {
- qtConfAddError("Feature '$${1}' was enabled, but the pre-condition '$$2' failed.", log)
- $$result = true
- }
- }
- return($$result)
-}
-
-defineTest(qtConfCheckFeature) {
- fpfx = $${currentConfig}.features.$${1}
-
- available = $$eval($${fpfx}.available)
- !isEmpty(available): return(true)
-
- # skip features that will not get emitted anyway
- emitIf = $$qtConfEvaluate($$eval($${fpfx}.emitIf))
- enabled = $$qtIsFeatureEnabled($$1)
- disabled = $$qtIsFeatureDisabled($$1)
-
- !$$emitIf {
- $$enabled|$$disabled: \
- qtConfAddWarning("Feature $${1} is insignificant in this configuration, ignoring related command line option(s).")
- return(false)
- }
-
- $$disabled {
- result = false
- } else: !$$enabled:!$$qtConfEvaluate($$eval($${fpfx}.autoDetect)) {
- # feature not auto-detected and not explicitly enabled
- result = false
- } else {
- result = true
- for (condition, $$qtConfScalarOrList($${fpfx}.condition)) {
- result = $$qtConfCheckSingleCondition($$1, $$condition, $$enabled)
- !$$result: break()
- }
- }
- $${fpfx}.available = $$result
- export($${fpfx}.available)
-
- for (i, $${fpfx}.output._KEYS_): \
- qtConfProcessOneOutput($${1}, $$i)
-
- return(true)
-}
-
-defineTest(qtConfCheckModuleCondition) {
- QT.$${currentModule}.skip = false
- !$$qtConfEvaluate($$eval($${currentConfig}.condition)): \
- QT.$${currentModule}.skip = true
- export(QT.$${currentModule}.skip)
-
- # ensure qtConfHaveModule() works
- QT.$${currentModule}.name = -
- export(QT.$${currentModule}.name)
-}
-
-
-defineTest(qtConfProcessFeatures) {
- for (feature, $${currentConfig}.features._KEYS_): \
- qtConfCheckFeature($$feature)
-}
-
-#
-# reporting
-#
-
-defineReplace(qtConfPadCols) {
- pad = $$num_add($$str_size($$2), -$$str_size($${1}))
- lessThan(pad, 0): pad = 0
- return("$$1 $$str_member($$2, 0, $$pad) $$3")
-}
-
-defineTest(qtConfReportPadded) {
- qtConfAddReport($$qtConfPadCols($$1, "........................................", $$2))
-}
-
-defineReplace(qtConfCollectFeatures) {
- l =
- for (feature, $$list($${1})) {
- $$eval($${currentConfig}.features.$${feature}.available): \
- l += $$eval($${currentConfig}.features.$${feature}.label)
- }
-
- isEmpty(l): return("<none>")
- return($$join(l, ' '))
-}
-
-defineTest(qtConfReport_featureList) {
- qtConfReportPadded($${1}, $$qtConfCollectFeatures($${2}))
-}
-
-defineReplace(qtConfFindFirstAvailableFeature) {
- for (feature, $$list($${1})) {
- isEmpty($${currentConfig}.features.$${feature}._KEYS_): \
- error("Asking for a report on undefined feature $${2}.")
- $$eval($${currentConfig}.features.$${feature}.available): \
- return($$eval($${currentConfig}.features.$${feature}.label))
- }
-
- return("<none>")
-}
-
-defineTest(qtConfReport_firstAvailableFeature) {
- qtConfReportPadded($${1}, $$qtConfFindFirstAvailableFeature($${2}))
-}
-
-defineTest(qtConfReport_feature) {
- !contains($${currentConfig}.features._KEYS_, $$2): \
- error("Asking for a report on undefined feature $${2}.")
-
- # hide report for not emitted features
- isEmpty($${currentConfig}.features.$${2}.available): \
- return()
-
- $$eval($${currentConfig}.features.$${2}.available) {
- result = "yes"
- !isEmpty(3): result = "$${3}"
- } else {
- result = "no"
- !isEmpty(4): result = "$${4}"
- }
-
- text = $$eval($${currentConfig}.features.$${2}.label)
-
- qtConfReportPadded($${1}$$text, $$result)
-}
-
-defineTest(qtConfReport_note) {
- qtConfAddNote($${1})
-}
-
-defineTest(qtConfReport_warning) {
- qtConfAddWarning($${1})
-}
-
-defineTest(qtConfReport_error) {
- qtConfAddError($${1}, log)
-}
-
-defineTest(qtConfReport_fatal) {
- qtConfFatalError($${1})
-}
-
-defineTest(qtConfCreateReportRecurse) {
- equals(2, false) {
- indent = ""
- recurse = false
- } else {
- indent = $${2}
- recurse = true
- }
-
- keys = $$eval($${1}._KEYS_)
- for (n, keys) {
- entry = $${1}.$$n
- subKeys = $$eval($${entry}._KEYS_)
- contains(subKeys, condition) {
- condition = $$eval($${entry}.condition)
- r = $$qtConfEvaluate($$condition)
- !qtConfIsBoolean($$r): \
- error("Evaluation of condition '$$condition' in report entry $${entry} yielded non-boolean value '$$r'.")
- !$$r: next()
- }
- contains(subKeys, "section") {
- !$$recurse: \
- error("Report type 'section' is not allowed in '$$1'.")
- section = $$eval($${entry}.section)
- qtConfAddReport("$$indent$$section:")
- qtConfCreateReportRecurse("$${entry}.entries", "$$indent ")
- } else: !isEmpty($${entry}) {
- feature = $$eval($${entry})
- qtConfReport_feature($$indent, $$feature)
- } else {
- text = $$eval($${entry}.message)
- isEmpty($${entry}.type): \
- error("Report entry $${entry} doesn't define a type.")
- r = "qtConfReport_$$eval($${entry}.type)"
- !defined($$r, test): \
- error("Undefined report type $$eval($${entry}.type) used in report entry $${entry}.")
- args = $$eval($${entry}.args)
- $${r}($$indent$${text}, $$args)
- }
- }
-}
-
-defineTest(qtConfProcessEarlyChecks) {
- qtConfCreateReportRecurse($${currentConfig}.earlyReport, false)
-}
-
-defineTest(qtConfCreateReport) {
- qtConfCreateReportRecurse($${currentConfig}.report, false)
-}
-
-defineTest(qtConfCreateSummary) {
- qtConfCreateReportRecurse($${currentConfig}.summary, "")
-}
-
-defineTest(qtConfPrintReport) {
- blocks = \
- "$$join(QT_CONFIGURE_REPORT, $$escape_expand(\\n))" \
- "$$join(QT_CONFIGURE_NOTES, $$escape_expand(\\n\\n))" \
- "$$join(QT_CONFIGURE_WARNINGS, $$escape_expand(\\n\\n))"
-
- !isEmpty(QT_CONFIGURE_ERRORS) {
- blocks += "$$join(QT_CONFIGURE_ERRORS, $$escape_expand(\\n\\n))"
- mention_config_log:!$$QMAKE_CONFIG_VERBOSE: \
- blocks += "Check config.log for details."
- }
- blocks = "$$join(blocks, $$escape_expand(\\n\\n))"
- logn($$blocks)
- !isEmpty(QT_CONFIGURE_ERRORS):!equals(config.input.continue, yes): \
- error()
- write_file($$OUT_PWD/config.summary, blocks)|error()
-}
-
-defineTest(qtConfCheckErrors) {
- !isEmpty(QT_CONFIGURE_ERRORS):!equals(config.input.continue, yes): \
- qtConfPrintReport()
-}
-
-#
-# output generation
-#
-
-defineTest(qtConfOutput_libraryPaths) {
- qtLog("Global lib dirs: [$$val_escape(EXTRA_LIBDIR)] [$$val_escape(QMAKE_DEFAULT_LIBDIRS)]")
- qtLog("Global inc dirs: [$$val_escape(EXTRA_INCLUDEPATH)] [$$val_escape(QMAKE_DEFAULT_INCDIRS)]")
-}
-
-# qtConfOutputVar(modifier, output, name, value)
-defineTest(qtConfOutputVar) {
- modifier = $$1
- output = $$2
- name = $$3
- value = $$val_escape(4)
-
- defined($${currentConfig}.output.$${output}.assign.$${name}, var): \
- error("Trying to overwrite assigned variable '$$name' in '$$output' using modifier '$$modifier'.")
-
- equals(modifier, assign) {
- !isEmpty($${currentConfig}.output.$${output}.append.$${name})|!isEmpty($${currentConfig}.output.$${output}.remove.$${name}): \
- error("Trying to assign variable '$$name' in '$$output', which has already appended or removed parts.")
- $${currentConfig}.output.$${output}.assign.$${name} = $$value
- } else: equals(modifier, append) {
- contains($${currentConfig}.output.$${output}.remove.$${name}, $$value): \
- error("Trying to append removed '$$value' to variable '$$name' in '$$output'.")
- $${currentConfig}.output.$${output}.append.$${name} += $$value
- } else: equals(modifier, remove) {
- contains($${currentConfig}.output.$${output}.append.$${name}, $$value): \
- error("Trying to remove appended '$$value' to variable '$$name' in '$$output'.")
- $${currentConfig}.output.$${output}.remove.$${name} += $$value
- } else {
- error("Invalid modifier '$$modifier' passed to qtConfOutputVar.")
- }
- $${currentConfig}.output.$${output}.$${modifier}._KEYS_ *= $${name}
- export($${currentConfig}.output.$${output}.$${modifier}.$${name})
- export($${currentConfig}.output.$${output}.$${modifier}._KEYS_)
-}
-
-# qtConfExtendVar(output, name, value)
-defineTest(qtConfExtendVar) {
- output = $$1
- name = $$2
- value = $$val_escape(3)
-
- !defined($${currentConfig}.output.$${output}.assign.$${name}, var): \
- error("Trying to extend undefined variable '$$name' in '$$output'.")
-
- $${currentConfig}.output.$${output}.assign.$${name} += $$value
- export($${currentConfig}.output.$${output}.assign.$${name})
-}
-
-defineTest(qtConfOutputVarHelper) {
- !isEmpty($${2}.public):$$eval($${2}.public) {
- output = "publicPro"
- } else {
- output = "privatePro"
- }
-
- negative = $$eval($${2}.negative)
- isEmpty(negative): negative = false
- equals(3, $$negative): return()
-
- name = $$eval($${2}.name)
- isEmpty(name): \
- error("Output type 'var$$title($$1)' used in feature '$$eval($${2}.feature)' without a 'name' entry.")
-
- value = $$qtConfEvaluate($$eval($${2}.value))
- !isEmpty($${2}.eval):$$qtConfEvaluate($$eval($${2}.eval)): \
- eval(value = $$value)
- qtConfOutputVar($$1, $$output, $$name, $$value)
- equals(output, "publicPro"):!isEmpty($${currentConfig}.module): \
- qtConfExtendVar($$output, "QT.$${currentModule}.exports", $$name)
-}
-
-defineTest(qtConfOutput_varAssign) {
- qtConfOutputVarHelper(assign, $$1, $$2)
-}
-
-defineTest(qtConfOutput_varAppend) {
- qtConfOutputVarHelper(append, $$1, $$2)
-}
-
-defineTest(qtConfOutput_varRemove) {
- qtConfOutputVarHelper(remove, $$1, $$2)
-}
-
-defineTest(qtConfOutputConfigVar) {
- pro = $$3
- var = $$4
- modular = $$5
-
- negative = $$eval($${1}.negative)
- isEmpty(negative): negative = false
- equals(2, $$negative): return()
-
- val = $$eval($${1}.name)
- isEmpty(val) {
- val = $$eval($${1}.feature)
- $$negative: val = no-$$val
- }
-
- isEmpty($${currentConfig}.module)|!$$modular: \
- qtConfOutputVar(append, $$pro, $$var, $$val)
- else: \
- qtConfExtendVar($$pro, "QT.$${currentModule}.$$var", $$val)
-}
-
-defineTest(qtConfOutput_publicQtConfig) {
- qtConfOutputConfigVar($$1, $$2, "publicPro", "QT_CONFIG", true)
-}
-
-defineTest(qtConfOutput_publicConfig) {
- !isEmpty($${currentConfig}.module): \
- error("Cannot use output type 'publicConfig' in module-local feature '$$eval($${1}.feature)'.")
- qtConfOutputConfigVar($$1, $$2, "publicPro", "CONFIG", false)
-}
-
-defineTest(qtConfOutput_privateConfig) {
- qtConfOutputConfigVar($$1, $$2, "privatePro", "CONFIG", false)
-}
-
-defineTest(qtConfOutputSetDefine) {
- $${currentConfig}.output.$${1}.$${2} = $${3}
- $${currentConfig}.output.$${1}._KEYS_ *= $${2}
- export($${currentConfig}.output.$${1}.$${2})
- export($${currentConfig}.output.$${1}._KEYS_)
-}
-
-defineTest(qtConfOutput_define) {
- output = publicHeader
- define = $$eval($${1}.name)
- value = $$qtConfEvaluate($$eval($${1}.value))
- isEmpty(define): \
- error("Output type 'define' used in feature '$$eval($${1}.feature)' without a 'name' entry.")
-
- negative = $$eval($${1}.negative)
- isEmpty(negative): negative = false
- equals(2, $$negative): return()
-
- qtConfOutputSetDefine($$output, $$define, $$value)
-}
-
-defineTest(qtConfOutput_feature) {
- name = "$$eval($${1}.name)"
- isEmpty(name): \
- name = $$eval($${1}.feature)
-
- $${2} {
- isEmpty($${currentConfig}.module): \
- qtConfOutputVar(append, "publicPro", "QT_CONFIG", $$name)
- else: \
- qtConfExtendVar("publicPro", "QT.$${currentModule}.QT_CONFIG", $$name)
- } else {
- f = $$upper($$replace(name, -, _))
- qtConfOutputSetDefine("publicHeader", "QT_NO_$$f")
- }
-}
-
-defineTest(qtConfSetModuleName) {
- currentModule = $$eval($${currentConfig}.module)
- isEmpty(currentModule): \
- currentModule = global
- export(currentModule)
-}
-
-defineTest(qtConfSetupModuleOutputs) {
- qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.enabled_features", )
- qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.disabled_features", )
- qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}_private.enabled_features", )
- qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}_private.disabled_features", )
- !isEmpty($${currentConfig}.module) {
- qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.QT_CONFIG", )
- qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.exports", )
- qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}_private.libraries", )
- }
-}
-
-defineTest(qtConfOutput_publicFeature) {
- name = "$$eval($${1}.name)"
- isEmpty(name): \
- name = $$eval($${1}.feature)
- feature = $$replace(name, [-+.], _)
-
- $${2} {
- qtConfExtendVar("publicPro", "QT.$${currentModule}.enabled_features", $$name)
- QT.$${currentModule}.enabled_features += $$name
- export(QT.$${currentModule}.enabled_features)
- qtConfOutputSetDefine("publicHeader", "QT_FEATURE_$$feature", 1)
- } else {
- qtConfExtendVar("publicPro", "QT.$${currentModule}.disabled_features", $$name)
- QT.$${currentModule}.disabled_features += $$name
- export(QT.$${currentModule}.disabled_features)
- qtConfOutputSetDefine("publicHeader", "QT_FEATURE_$$feature", -1)
- }
-}
-
-defineTest(qtConfOutput_privateFeature) {
- name = "$$eval($${1}.name)"
- isEmpty(name): \
- name = $$eval($${1}.feature)
- feature = $$replace(name, [-+.], _)
-
- $${2} {
- qtConfExtendVar("privatePro", "QT.$${currentModule}_private.enabled_features", $$name)
- QT.$${currentModule}_private.enabled_features += $$name
- export(QT.$${currentModule}_private.enabled_features)
- qtConfOutputSetDefine("privateHeader", "QT_FEATURE_$$feature", 1)
- } else {
- qtConfExtendVar("privatePro", "QT.$${currentModule}_private.disabled_features", $$name)
- QT.$${currentModule}_private.disabled_features += $$name
- export(QT.$${currentModule}_private.disabled_features)
- qtConfOutputSetDefine("privateHeader", "QT_FEATURE_$$feature", -1)
- }
-}
-
-defineTest(qtConfProcessOneOutput) {
- feature = $${1}
- fpfx = $${currentConfig}.features.$${feature}
- opfx = $${fpfx}.output.$${2}
-
- call = $$eval($${opfx}.type)
- isEmpty(call) {
- # output is just a string, not an object
- call = $$eval($$opfx)
- }
- !defined("qtConfOutput_$$call", test): \
- error("Undefined type '$$call' in output '$$2' of feature '$$feature'.")
-
- !$$qtConfEvaluate($$eval($${opfx}.condition)): \
- return()
-
- $${opfx}.feature = $$feature
- qtConfOutput_$${call}($$opfx, $$eval($${fpfx}.available))
-}
-
-defineTest(qtConfProcessOutput) {
- !contains($${currentConfig}._KEYS_, "features"): \
- return()
-
- basedir = $$shadowed($$eval($${currentConfig}.dir))
- module = $$eval($${currentConfig}.module)
-
- # write it to the output files
- !defined($${currentConfig}.files._KEYS_, var) {
- # set defaults that should work for most Qt modules
- isEmpty(module): \
- error("Neither module nor files section specified in configuration file.")
-
- $${currentConfig}.files._KEYS_ = publicPro privatePro publicHeader privateHeader
- $${currentConfig}.files.publicPro = qt$${module}-config.pri
- $${currentConfig}.files.privatePro = qt$${module}-config.pri # sic!
- $${currentConfig}.files.publicHeader = qt$${module}-config.h
- $${currentConfig}.files.privateHeader = qt$${module}-config_p.h
- }
-
- for (type, $${currentConfig}.files._KEYS_) {
- contains(type, ".*Pro") {
- for (k, $${currentConfig}.output.$${type}.assign._KEYS_): \
- $${currentConfig}.output.$$type += "$$k = $$eval($${currentConfig}.output.$${type}.assign.$$k)"
- for (k, $${currentConfig}.output.$${type}.remove._KEYS_): \
- $${currentConfig}.output.$$type += "$$k -= $$eval($${currentConfig}.output.$${type}.remove.$$k)"
- for (k, $${currentConfig}.output.$${type}.append._KEYS_): \
- $${currentConfig}.output.$$type += "$$k += $$eval($${currentConfig}.output.$${type}.append.$$k)"
- } else: contains(type, ".*Header") {
- for (define, $${currentConfig}.output.$${type}._KEYS_) {
- value = $$eval($${currentConfig}.output.$${type}.$${define})
- $${currentConfig}.output.$$type += "$${LITERAL_HASH}define $$define $$value"
- }
- }
-
- content = $$eval($${currentConfig}.output.$${type})
-
- !isEmpty(module): \
- call = qtConfOutputPostProcess_$${module}_$${type}
- else: \
- call = qtConfOutputPostProcess_$${type}
- defined($$call, replace): \
- eval(content = \$\$"$$call"(\$\$content))
-
- file = $$eval($${currentConfig}.files.$${type})
- fileCont.$$file += $$content
- fileCont._KEYS_ *= $$file
- }
-
- for (file, fileCont._KEYS_): \
- write_file($$basedir/$$file, fileCont.$$file)|error()
-}
-
-#
-# tie it all together
-#
-
-!isEmpty(_QMAKE_SUPER_CACHE_):!equals(OUT_PWD, $$dirname(_QMAKE_SUPER_CACHE_)) {
- # sub-repo within a top-level build; no need to configure anything.
- !isEmpty(QMAKE_EXTRA_ARGS) {
- # sub-projects don't get the extra args passed down automatically,
- # so we can use their presence to detect misguided attempts to
- # configure the repositories separately.
- # caveat: a plain qmake call is indistinguishable from a recursion
- # (by design), so we cannot detect this case.
- error("You cannot configure $$TARGET separately within a top-level build.")
- }
- return()
-}
-
-config.$${TARGET}.dir = $$_PRO_FILE_PWD_
-cfgs = $$TARGET
-!isEmpty(_QMAKE_SUPER_CACHE_) {
- for (s, SUBDIRS) {
- config.$${s}.dir = $$_PRO_FILE_PWD_/$${s}
- cfgs += $$s
- }
-}
-configsToProcess =
-for (c, cfgs) {
- s = $$eval(config.$${c}.dir)
- exists($$s/configure.json): \
- configsToProcess += $$c
-}
-isEmpty(configsToProcess) {
- !isEmpty(QMAKE_EXTRA_ARGS): \
- error("This module does not accept configure command line arguments.")
- return()
-}
-
-load(configure_base)
-
-QMAKE_POST_CONFIGURE =
-config.builtins.dir = $$PWD/data
-configsToProcess = builtins $$configsToProcess
-allConfigs =
-for(ever) {
- isEmpty(configsToProcess): \
- break()
-
- thisConfig = $$take_first(configsToProcess)
- currentConfig = config.$$thisConfig
- thisDir = $$eval($${currentConfig}.dir)
- jsonFile = $$thisDir/configure.json
- priFile = $$thisDir/configure.pri
-
- # load configuration data
- configure_data = $$cat($$jsonFile, blob)
- !parseJson(configure_data, $$currentConfig): \
- error("Invalid or non-existent file $${jsonFile}.")
- exists($$priFile): \
- !include($$priFile): error()
-
- # only configs which contain more than just subconfigs are saved for later.
- $${currentConfig}._KEYS_ -= subconfigs
- !isEmpty($${currentConfig}._KEYS_) {
- allConfigs += $$currentConfig
- contains($${currentConfig}._KEYS_, libraries) {
- qtConfSetupLibraries()
- # this ensures that references in QMAKE_LIBRARY_DEPS are unique.
- qtConfSetModuleName()
- ex = $$eval(config.modules.$${currentModule})
- !isEmpty(ex): \
- error("Module $$currentModule is claimed by both $$currentConfig and $${ex}.")
- config.modules.$${currentModule} = $$currentConfig
- }
- }
-
- # prepend all subconfigs to files to keep a depth first search order
- subconfigs =
- for(n, $${currentConfig}.subconfigs._KEYS_) {
- subconfig = $$eval($${currentConfig}.subconfigs.$${n})
- name = $${thisConfig}_$$basename(subconfig)
- ex = $$eval(config.$${name}.dir)
- !isEmpty(ex): \
- error("Basename clash between $$thisDir/$$subconfig and $${ex}.")
- config.$${name}.dir = $$thisDir/$$subconfig
- subconfigs += $$name
- }
- configsToProcess = $$subconfigs $$configsToProcess
-}
-# 'builtins' is used for command line parsing and test type dependency
-# injection, but its features must not be processed regularly.
-allModuleConfigs = $$member(allConfigs, 1, -1)
-
-QMAKE_SAVED_ARGS = $$QMAKE_EXTRA_ARGS
-QMAKE_REDO_CONFIG = false
-qtConfParseCommandLine()
-qtConfCheckErrors()
-
-!isEmpty(config.input.list-features) {
- all_ft =
- for (currentConfig, allModuleConfigs) {
- for (k, $${currentConfig}.features._KEYS_) {
- pp = $$eval($${currentConfig}.features.$${k}.purpose)
- !isEmpty(pp) {
- pfx = $$eval($${currentConfig}.features.$${k}.section)
- !isEmpty(pfx): pfx = "$$pfx: "
- all_ft += $$qtConfPadCols($$k, ".......................", \
- $$pfx$$section(pp, $$escape_expand(\\n), 0, 0))
- }
- }
- }
- all_ft = $$sorted(all_ft)
- logn()
- for (ft, all_ft): \
- logn($$ft)
- error()
-}
-
-!isEmpty(config.input.list-libraries) {
- logn()
- for (currentConfig, allModuleConfigs) {
- !isEmpty($${currentConfig}.exports._KEYS_) {
- !isEmpty($${currentConfig}.module): \
- logn($$eval($${currentConfig}.module):)
- else: \
- logn($$section(currentConfig, ., -1):)
- all_xp =
- for (xport, $${currentConfig}.exports._KEYS_) {
- libs = $$eval($${currentConfig}.exports.$$xport)
- isEqual($${currentConfig}.libraries.$$first(libs).export, "") { # not isEmpty()!
- !isEmpty(config.input.verbose): \
- all_xp += "$$xport!"
- } else {
- out = "$$xport"
- !isEmpty(config.input.verbose):!isEqual(xport, $$libs): \
- out += "($$libs)"
- all_xp += "$$out"
- }
- }
- all_xp = $$sorted(all_xp)
- all_xp ~= s,^([^!]*)!$,(\\1),g
- for (xp, all_xp): \
- logn(" $$xp")
- }
- }
- error()
-}
-
-QMAKE_CONFIG_VERBOSE = $$eval(config.input.verbose)
-isEmpty(QMAKE_CONFIG_VERBOSE): \
- QMAKE_CONFIG_VERBOSE = false
-QMAKE_CONFIG_LOG = $$OUT_PWD/config.log
-write_file($$QMAKE_CONFIG_LOG, "")
-qtLog("Command line: $$qtSystemQuote($$QMAKE_SAVED_ARGS)")
-$$QMAKE_REDO_CONFIG: \
- qtLog("config.opt: $$qtSystemQuote($$QMAKE_EXTRA_REDO_ARGS)")
-
-for (currentConfig, allModuleConfigs) {
- qtConfSetModuleName()
- qtConfSetupModuleOutputs()
- # do early checks, mainly to validate the command line
- qtConfProcessEarlyChecks()
-}
-qtConfCheckErrors()
-
-QMAKE_CONFIG_CACHE = $$OUT_PWD/config.cache
-QMAKE_CONFIG_CACHE_USE = $$eval(config.input.cache_use)
-cache_recheck = $$eval(config.input.cache_recheck)
-equals(cache_recheck, yes) {
- QMAKE_CONFIG_CACHE_USE = positive
- cache_recheck =
-}
-isEmpty(QMAKE_CONFIG_CACHE_USE): \
- QMAKE_CONFIG_CACHE_USE = all
-!equals(QMAKE_CONFIG_CACHE_USE, none) {
- include($$QMAKE_CONFIG_CACHE, , true)
- # this crudely determines when to discard the cache. this also catches the case
- # of no cache being there in the first place.
- !equals(cache.platform, $$[QMAKE_SPEC])|!equals(cache.xplatform, $$[QMAKE_XSPEC]) {
- QMAKE_CONFIG_CACHE_USE = none
- } else: !isEmpty(cache_recheck) {
- for (cr, $$list($$split(cache_recheck, ","))) {
- !isEmpty(cache.$${cr}._KEYS_) {
- cache.$${cr}._KEYS_ =
- } else {
- qtConfAddWarning("Attempting to discard non-cached result '$$cr'.")
- }
- }
- }
-}
-equals(QMAKE_CONFIG_CACHE_USE, none) {
- cont = \
- "cache.platform = $$[QMAKE_SPEC]" \
- "cache.xplatform = $$[QMAKE_XSPEC]"
- write_file($$QMAKE_CONFIG_CACHE, cont)
-}
-
-CONFIG += qt_conf_tests_allowed
-logn()
-logn("Running configuration tests...")
-
-for (currentConfig, allModuleConfigs) {
- tdir = $$eval($${currentConfig}.testDir)
- isEmpty(tdir): tdir = config.tests
- QMAKE_CONFIG_TESTS_DIR = $$absolute_path($$tdir, $$eval($${currentConfig}.dir))
-
- qtConfSetModuleName()
-
- qtConfSetupTestTypeDeps()
-
- # correctly setup dependencies
- QMAKE_CONFIG_DEPS = global global_private
- QMAKE_LIBRARY_DEPS = $$eval(config.modules.global)
- !isEmpty($${currentConfig}.module) {
- for (d, $${currentConfig}.depends._KEYS_) {
- dep = $$replace($${currentConfig}.depends.$$d, -private$, _private)
- gdep = $$replace(dep, _private$, )
- dep *= $$gdep
- QMAKE_CONFIG_DEPS += $$dep
- !isEqual(gdep, $$dep): \ # libraries are in the private module.
- QMAKE_LIBRARY_DEPS += $$eval(config.modules.$$gdep)
- }
- }
-
- qtConfCheckModuleCondition()
-
- qtConfHaveModule($$currentModule) {
- # process all features
- qtConfProcessFeatures()
- } else {
- qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}.skip", "true")
- }
-
- # generate files and reports
- qtConfProcessOutput()
- qtConfHaveModule($$currentModule) {
- qtConfCreateReport()
- qtConfCreateSummary()
- } else {
- QT_CONFIGURE_SKIPPED_MODULES += " $$currentModule"
- }
-}
-
-!isEmpty(QT_CONFIGURE_SKIPPED_MODULES): \
- qtConfAddNote("The following modules are not being compiled in this configuration:" $$QT_CONFIGURE_SKIPPED_MODULES)
-
-logn("Done running configuration tests.")
-logn()
-
-!$$QMAKE_REDO_CONFIG {
- write_file($$OUT_PWD/config.opt, QMAKE_SAVED_ARGS)|error()
-}
-
-# these come from the pri files loaded above.
-for (p, QMAKE_POST_CONFIGURE): \
- eval($$p)
-
-logn("Configure summary:")
-logn()
-qtConfPrintReport()
-
-load(qt_prefix_build_check)
-
-# final notes for the user
-logn()
-logn("Qt is now configured for building. Just run '$$QMAKE_MAKE_NAME'.")
-pfx = $$[QT_INSTALL_PREFIX]
-qtIsPrefixBuild($$pfx) {
- logn("Once everything is built, you must run '$$QMAKE_MAKE_NAME install'.")
- logn("Qt will be installed into '$$system_path($$pfx)'.")
-} else {
- logn("Once everything is built, Qt is installed.")
- logn("You should NOT run '$$QMAKE_MAKE_NAME install'.")
- logn("Note that this build cannot be deployed to other machines or devices.")
-}
-logn()
-logn("Prior to reconfiguration, make sure you remove any leftovers from")
-logn("the previous build.")
-logn()
diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
deleted file mode 100644
index 3b74cd4dd5..0000000000
--- a/mkspecs/features/qt_docs.prf
+++ /dev/null
@@ -1,106 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-!exists($$QMAKE_DOCS): error("Cannot find documentation specification file $$QMAKE_DOCS")
-
-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]
-builddir.name = BUILDDIR
-builddir.value = $$OUT_PWD
-QT_TOOL_ENV = qtver qtmver qtvertag qtdocs builddir
-qtPrepareTool(QDOC, qdoc)
-QT_TOOL_ENV =
-
-!build_online_docs: qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
-
-qtPrepareTool(QTATTRIBUTIONSSCANNER, qtattributionsscanner)
-
-# 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.
-debug_and_release:!build_pass: return()
-
-load(qt_build_paths)
-QMAKE_DOCS_BASE_OUTDIR = $$MODULE_BASE_OUTDIR/doc
-
-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
-
-QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR)
-!build_online_docs: \
- QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS])
-PREP_DOC_INDEXES =
-DOC_INDEXES =
-!isEmpty(QTREPOS) {
- prepare_docs {
- # This is not for linking, but for providing type information.
- mps =
- deps = $$replace(QT, -private$, )
- deps = $$resolve_depends(deps, "QT.")
- for (d, deps): \
- mps += $$dirname(QT.$${d}.libs)
- mps = $$unique(mps)
- for (mp, mps): \
- PREP_DOC_INDEXES += -indexdir $$shell_quote($$mp/doc)
- }
- for(qrep, QTREPOS): \
- DOC_INDEXES += -indexdir $$shell_quote($$qrep/doc)
-} else {
- prepare_docs: \
- PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
- DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
-}
-
-qtattributionsscanner.target = qtattributionsscanner
-qtattributionsscanner.commands = $$QTATTRIBUTIONSSCANNER $$shell_quote($$MODULE_BASE_INDIR) \
- --filter "QDocModule=$$QMAKE_DOCS_TARGET" -o $$shell_quote($$OUT_PWD/codeattributions.qdoc)
-qtattributionsscanner.CONFIG += phony
-QMAKE_EXTRA_TARGETS += qtattributionsscanner
-
-doc_command = $$QDOC $$QMAKE_DOCS
-prepare_docs {
- prepare_docs.commands += $$doc_command -prepare $$PREP_DOC_INDEXES -no-link-errors $(INCPATH)
- generate_docs.commands += $$doc_command -generate $$DOC_INDEXES $(INCPATH)
- prepare_docs.depends += qtattributionsscanner
-} else {
- html_docs.commands += $$doc_command $$DOC_INDEXES $(INCPATH)
- html_docs.depends += qtattributionsscanner
-}
-
-!build_online_docs {
- qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch)
-
- inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR
- inst_html_docs.path = $$[QT_INSTALL_DOCS]
- inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build
- INSTALLS += inst_html_docs
-
- inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
- inst_qch_docs.path = $$[QT_INSTALL_DOCS]
- inst_qch_docs.CONFIG += no_check_exist no_default_install no_build
- INSTALLS += inst_qch_docs
-
- install_html_docs.depends = install_inst_html_docs
- uninstall_html_docs.depends = uninstall_inst_html_docs
- install_qch_docs.depends = install_inst_qch_docs
- uninstall_qch_docs.depends = uninstall_inst_qch_docs
- install_docs.depends = install_html_docs install_qch_docs
- uninstall_docs.depends = uninstall_html_docs uninstall_qch_docs
-}
diff --git a/mkspecs/features/qt_docs_targets.prf b/mkspecs/features/qt_docs_targets.prf
deleted file mode 100644
index 9e96432462..0000000000
--- a/mkspecs/features/qt_docs_targets.prf
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-DOC_TARGETS = \
- install_html_docs uninstall_html_docs \
- install_qch_docs uninstall_qch_docs \
- install_docs uninstall_docs \
- qch_docs
-
-prepare_docs {
- DOC_TARGETS += prepare_docs generate_docs
- html_docs.commands = $(MAKE) -f $(MAKEFILE) prepare_docs && $(MAKE) -f $(MAKEFILE) generate_docs
- QMAKE_EXTRA_TARGETS += html_docs
-} else {
- DOC_TARGETS += html_docs
-}
-
-docs.commands = $(MAKE) -f $(MAKEFILE) html_docs && $(MAKE) -f $(MAKEFILE) qch_docs
-QMAKE_EXTRA_TARGETS += docs
-
-contains(TEMPLATE, subdirs) {
- for(inst, DOC_TARGETS): \
- prepareRecursiveTarget($$inst)
-} else {
- !isEmpty(BUILDS):!build_pass {
- sub = $$first(BUILDS)
- for(inst, DOC_TARGETS) {
- $${inst}.CONFIG = recursive
- $${inst}.recurse = $$sub
- }
- }
- # Apps and libs request docs creation by setting QMAKE_DOCS.
- # This is a backwards compat hack - technically, the modules which need it
- # are supposed to load(qt_docs) themselves.
- !isEmpty(QMAKE_DOCS): load(qt_docs)
-}
-QMAKE_EXTRA_TARGETS += $$DOC_TARGETS
diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf
deleted file mode 100644
index 43b58817fe..0000000000
--- a/mkspecs/features/qt_example_installs.prf
+++ /dev/null
@@ -1,143 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-defineTest(addInstallFiles) {
- for(sf, 2) {
- sf = $$relative_path($$sf, $$_PRO_FILE_PWD_)
- contains(sf, \\..*) {
- check_examples: message("Notice: $$_PRO_FILE_ refers to $$sf")
- } else {
- sfp = $$replace(sf, /.*, )
- !equals(sfp, $$sf): \
- $$1 *= $$sfp
- else: \
- $$1 += $$sf
- }
- }
- export($$1)
-}
-
-probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples)
-isEmpty(probase)|contains(probase, ^\\..*): \
- return()
-
-isEmpty(_QMAKE_CACHE_) {
- !equals(OUT_PWD, $$_PRO_FILE_PWD_): \
- return()
- error("You cannot build examples inside the Qt source tree, except as part of a proper Qt build.")
-}
-
-contains(TEMPLATE, "vc.*"): \
- return()
-
-contains(TEMPLATE, .*app): \
- qtSetQmlPath()
-
-for(ex, EXAMPLE_FILES): \
- sourcefiles += $$files($$absolute_path($$ex, $$_PRO_FILE_PWD_))
-for(res, RESOURCES) {
- !contains(res, .*\\.qrc): \
- next()
- rfile = $$absolute_path($$res, $$_PRO_FILE_PWD_)
- rpath = $$dirname(rfile)
- rcont = $$cat($$rfile, lines)
- for (rline, rcont) {
- resrc = $$replace(rline, ^[ \\t]*<file[^>]*>([^<]+)</file>[ \\t]*$, \\1)
- !equals(resrc, $$rline): \
- sourcefiles += $$absolute_path($$resrc, $$rpath)
- }
-}
-for(res, RC_FILE) {
- rfile = $$absolute_path($$res, $$_PRO_FILE_PWD_)
- rpath = $$dirname(rfile)
- rcont = $$cat($$rfile, lines)
- for (rline, rcont) {
- resrc = $$replace(rline, "^\\d+\\s+ICON\\s+[^\"]*\"([^\"]+)\"\$", \\1)
- !equals(resrc, $$rline): \
- sourcefiles += $$absolute_path($$resrc, $$rpath)
- }
-}
-sourcefiles += \
- $$ANDROID_PACKAGE_SOURCE_DIR \
- $$QMAKE_INFO_PLIST \
- $$DISTFILES
-extras = \
- $$_PRO_FILE_PWD_/README \
- $$_PRO_FILE_PWD_/README.TXT \
- $$files($$_PRO_FILE_PWD_/*.pri) \
- $$replace(_PRO_FILE_, \\.pro$, .qmlproject) \
- $$replace(_PRO_FILE_, \\.pro$, .json) \
- $$replace(_PRO_FILE_, \\.pro$, .inf)
-for(extra, extras): \
- exists($$extra): \
- sourcefiles += $$extra
-
-# Just for Qt Creator
-OTHER_FILES += $$sourcefiles
-
-sourcefiles += \
- $$_PRO_FILE_ $$RC_FILE $$DEF_FILE \
- $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
- $$DBUS_ADAPTORS $$DBUS_INTERFACES
-addInstallFiles(sources.files, $$sourcefiles)
-sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase
-INSTALLS += sources
-
-check_examples {
- srcfiles = $$sources.files
- for(inst, INSTALLS): \
- !equals(inst, target):!contains($${inst}.CONFIG, no_check_exist): \
- for(file, $${inst}.files): \
- instfiles += $$files($$absolute_path($$file, $$_PRO_FILE_PWD_))
- addInstallFiles(srcfiles, $$instfiles)
-
- thefiles = $$files($$_PRO_FILE_PWD_/*)
- for(i, thefiles): \
- allfiles += $$relative_path($$i, $$_PRO_FILE_PWD_)
- for(i, srcfiles): \
- allfiles -= $$relative_path($$i, $$_PRO_FILE_PWD_)
- for(i, SUBDIRS) {
- sd = $$eval($${i}.file)
- !isEmpty(sd) {
- sd ~= s,/.*,,
- } else {
- sd = $$eval($${i}.subdir)
- isEmpty(sd): sd = $$i
- }
- allfiles -= $$sd
- }
- allfiles -= doc
- !isEmpty(allfiles): warning("remaining files in $$_PRO_FILE_PWD_: $$allfiles")
-}
-
-equals(TEMPLATE, app)|equals(TEMPLATE, lib) {
- !contains(INSTALLS, target) {
- !install_ok: \
- error("$$_PRO_FILE_ is lacking an install target.")
- else: check_examples: \
- warning("$$_PRO_FILE_ is lacking an install target.")
- } else: !equals(target.path, $$sources.path) {
- !install_ok: \
- error("$$_PRO_FILE_ installs target to unexpected location.")
- else: check_examples: \
- warning("$$_PRO_FILE_ installs target to unexpected location.")
- }
-}
-
-!equals(TEMPLATE, subdirs):!compile_examples {
- TEMPLATE = aux
- CONFIG -= have_target qt staticlib dll
- SOURCES =
- OBJECTIVE_SOURCES =
- INSTALLS -= target
-} else {
- CONFIG += relative_qt_rpath # Examples built as part of Qt should be relocatable
-}
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 1903e509c8..f1371c8cc6 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -1,10 +1,26 @@
defineReplace(qtPlatformTargetSuffix) {
+ config_variable = $$1
+ isEmpty(config_variable): \
+ config_variable = CONFIG
+
suffix =
- CONFIG(debug, debug|release) {
- !debug_and_release|build_pass {
- mac: return($${suffix}_debug)
- win32: return($${suffix}d)
+ android: return($${suffix}_$${QT_ARCH})
+ win32 {
+ contains($$config_variable, debug, debug|release) {
+ mingw {
+ qtConfig(debug_and_release):build_pass: \
+ return($${suffix}d)
+ } else {
+ !debug_and_release|build_pass: \
+ return($${suffix}d)
+ }
+ }
+ }
+ darwin {
+ contains($$config_variable, debug, debug|release) {
+ !debug_and_release|build_pass: \
+ return($${suffix}_debug)
}
}
return($$suffix)
@@ -20,7 +36,13 @@ defineReplace(qtLibraryTarget) {
}
defineReplace(qt5LibraryTarget) {
- LIBRARY_NAME = $$qtLibraryTarget($$1)
+ android {
+ LIBRARY_NAME_PREFIX = $$2
+ LIBRARY_NAME_PREFIX = $$replace(LIBRARY_NAME_PREFIX, "//", "/")
+ LIBRARY_NAME_PREFIX = $$replace(LIBRARY_NAME_PREFIX, "/", "_")
+ LIBRARY_NAME = $$LIBRARY_NAME_PREFIX$$qtLibraryTarget($$1)
+ unset(LIBRARY_NAME_PREFIX)
+ } else: LIBRARY_NAME = $$qtLibraryTarget($$1)
isEmpty(QMAKE_FRAMEWORK_BUNDLE_NAME) {
# Insert the major version of Qt in the library name
# unless it's a framework build.
@@ -65,11 +87,19 @@ defineTest(qtHaveModule) {
return(false)
}
-# variable, default, [suffix for variable for system() use], [prepare primary variable for system() use]
+# Arguments:
+# variable, default, [suffix for variable for system() use],
+# [prepare primary variable for system() use],
+# [installation location; default: $$[QT_HOST_BINS]]
defineTest(qtPrepareTool) {
cmd = $$eval(QT_TOOL.$${2}.binary)
isEmpty(cmd) {
- cmd = $$[QT_HOST_BINS]/$$2
+ isEmpty(5) {
+ instloc = $$[QT_HOST_BINS]
+ } else {
+ instloc = $$5
+ }
+ cmd = $$instloc/$$2
exists($${cmd}.pl) {
$${1}_EXE = $${cmd}.pl
cmd = perl -w $$system_path($${cmd}.pl)
@@ -105,6 +135,15 @@ defineTest(qtPrepareTool) {
}
}
+# Prepare a tool that's not supposed to be called manually by users but by the build system.
+#
+# Forwards its arguments to qtPrepareTool but defaults the installation location to
+# $$[QT_HOST_LIBEXECS]
+defineTest(qtPrepareLibExecTool) {
+ isEmpty(instloc): instloc = "$$[QT_HOST_LIBEXECS]"
+ qtPrepareTool($$1, $$2, $$3, $$4, $$instloc)
+}
+
# target variable, list of env var names, [non-empty: prepare for system(), not make]
defineTest(qtAddToolEnv) {
isEmpty(3): \
@@ -152,8 +191,12 @@ defineTest(qtAddToolEnv) {
!isEmpty(cmd): cmd = "$$cmd "
equals(ds, /) {
batch_name = $${batch_name}.sh
+ equals(QMAKE_HOST.os, Darwin):exists(/bin/bash): \
+ shell = /bin/bash
+ else: \
+ shell = /bin/sh
batch_cont = \
- "$$LITERAL_HASH!/bin/sh" \
+ "$$LITERAL_HASH!$$shell" \
$$batch_sets \
"exec $$cmd\"$@\""
# It would be nicer to use the '.' command (without 'exec' above),
diff --git a/mkspecs/features/qt_helper_lib.prf b/mkspecs/features/qt_helper_lib.prf
deleted file mode 100644
index 2cb54fc547..0000000000
--- a/mkspecs/features/qt_helper_lib.prf
+++ /dev/null
@@ -1,85 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-load(qt_build_paths)
-
-TEMPLATE = lib
-CONFIG -= qt
-QT = # In case qt is re-added.
-
-INCLUDEPATH += $$MODULE_INCLUDEPATH
-DEFINES += $$MODULE_DEFINES
-
-CONFIG -= warning_clean # Don't presume 3rd party code to be clean
-load(qt_common)
-
-qtConfig(debug_and_release): CONFIG += debug_and_release
-qtConfig(build_all): CONFIG += build_all
-
-DESTDIR = $$MODULE_BASE_OUTDIR/lib
-DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin
-
-THE_TARGET = $$qt5LibraryTarget($$TARGET)
-
-!build_pass {
- MODULE = $$replace(TARGET, ^qt, )
- MODULE ~= s,-,_,
- MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_ext_$${MODULE}.pri
- ucmodule = $$upper($$MODULE)
-
- win32|CONFIG(static, static|shared) {
- prefix = $$QMAKE_PREFIX_STATICLIB
- suffix = $$QMAKE_EXTENSION_STATICLIB
- } else {
- prefix = $$QMAKE_PREFIX_SHLIB
- suffix = $$QMAKE_EXTENSION_SHLIB
- }
- CC_USES =
- LD_USES =
- for (use, QMAKE_USE) {
- use = $$split(use, /)
- name = $$take_first(use)
- nu = $$upper($$replace(name, -, _))
- !contains(use, linkonly): CC_USES += $$nu
- !contains(use, nolink): LD_USES += $$nu
- }
- CC_USES = $$unique(CC_USES)
- LD_USES = $$unique(LD_USES)
- MODULE_PRI_CONT = \
- "QMAKE_DEPENDS_$${ucmodule}_CC =$$join(CC_USES, " ", " ")" \
- "QMAKE_DEPENDS_$${ucmodule}_LD =$$join(LD_USES, " ", " ")" \
- "QMAKE_INCDIR_$${ucmodule} = $$val_escape(MODULE_INCLUDEPATH)" \
- "QMAKE_DEFINES_$${ucmodule} = $$val_escape(MODULE_DEFINES)"
- debug_and_release {
- win32: \
- MODULE_DEBUG_LIBS = $$DESTDIR/$$prefix$${TARGET}d.$$suffix
- else: darwin: \
- MODULE_DEBUG_LIBS = $$DESTDIR/$$prefix$${TARGET}_debug.$$suffix
- else: \
- error("'$$QMAKE_PLATFORM' does not do debug_and_release.")
- MODULE_RELEASE_LIBS = $$DESTDIR/$$prefix$${TARGET}.$$suffix
- MODULE_PRI_CONT += \
- "QMAKE_LIBS_$${ucmodule} =" \ # Needed for the module to be recognized.
- "QMAKE_LIBS_$${ucmodule}_DEBUG = $$val_escape(MODULE_DEBUG_LIBS)" \
- "QMAKE_LIBS_$${ucmodule}_RELEASE = $$val_escape(MODULE_RELEASE_LIBS)"
- } else {
- MODULE_LIBS = $$DESTDIR/$$prefix$${THE_TARGET}.$$suffix
- MODULE_PRI_CONT += \
- "QMAKE_LIBS_$${ucmodule} = $$val_escape(MODULE_LIBS)"
- }
- write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
-}
-
-TARGET = $$THE_TARGET
-
-# In static builds of Qt, convenience libraries must be installed,
-# as in this case they are not linked to the final library/plugin.
-installed|if(!not_installed:qtConfig(static)): load(qt_installs)
diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
deleted file mode 100644
index 1ebca17366..0000000000
--- a/mkspecs/features/qt_installs.prf
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-#library
-!qt_no_install_library {
- win32 {
- host_build: \
- dlltarget.path = $$[QT_HOST_BINS]
- else: \
- dlltarget.path = $$[QT_INSTALL_BINS]
- INSTALLS += dlltarget
- }
- host_build: \
- target.path = $$[QT_HOST_LIBS]
- else: \
- target.path = $$[QT_INSTALL_LIBS]
- !static: target.CONFIG = no_dll
- INSTALLS += target
-}
-
-#headers
-qt_install_headers {
- gen_headers.files = $$SYNCQT.GENERATED_HEADER_FILES
- gen_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
- INSTALLS += gen_headers
-
- targ_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.INJECTED_HEADER_FILES
- targ_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
- INSTALLS += targ_headers
-
- private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.INJECTED_PRIVATE_HEADER_FILES
- private_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
- generated_privates: \
- private_headers.CONFIG += no_check_exist
- INSTALLS += private_headers
-
- qpa_headers.files = $$SYNCQT.QPA_HEADER_FILES
- qpa_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
- INSTALLS += qpa_headers
-}
-
-#module
-qt_install_module {
- !isEmpty(MODULE_PRI) {
- pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
- pritarget.files = $$MODULE_PRI
- INSTALLS += pritarget
- } else: isEmpty(MODULE_PRIVATE_PRI) {
- warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects.")
- }
- !isEmpty(MODULE_PRIVATE_PRI) {
- privpritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
- privpritarget.files = $$MODULE_PRIVATE_PRI
- INSTALLS += privpritarget
- }
-}
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
deleted file mode 100644
index ee7de22059..0000000000
--- a/mkspecs/features/qt_module.prf
+++ /dev/null
@@ -1,338 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-isEmpty(MODULE):MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
-isEmpty(VERSION): VERSION = $$MODULE_VERSION
-isEmpty(VERSION): error("Module does not define version.")
-
-isEmpty(MODULE_CFG_FILE): MODULE_CFG_FILE = qt$${MODULE}-config
-exists($$OUT_PWD/$${MODULE_CFG_FILE}.pri) {
- include($$OUT_PWD/$${MODULE_CFG_FILE}.pri)
- CONFIG += generated_privates
-}
-
-skip = $$eval(QT.$${MODULE}.skip)
-isEmpty(skip): skip = false
-requires(!$$skip)
-
-# Compile as shared/DLL or static according to the option given to configure
-# unless overridden. Host builds are always static
-host_build|staticlib: CONFIG += static
-
-host_build {
- QT -= gui # no host module will ever use gui
- force_bootstrap {
- !build_pass:qtConfig(release_tools): CONFIG += release
- contains(QT, core(-private)?|xml) {
- QT -= core core-private xml
- QT += bootstrap-private
- }
- } else {
- !build_pass:qtConfig(debug_and_release): CONFIG += release
- }
-}
-
-qtConfig(framework) {
- minimal_syncqt: \
- CONFIG += module_frameworks
- else: CONFIG(shared, static|shared): \
- CONFIG += module_frameworks lib_bundle
-}
-
-CONFIG += relative_qt_rpath # Qt libraries should be relocatable
-
-# Qt libraries should only use Application Extension safe APIs
-darwin:!no_app_extension_api_only: CONFIG += app_extension_api_only
-
-ucmodule = $$upper($$MODULE)
-
-isEmpty(MODULE_INCNAME): MODULE_INCNAME = $$TARGET
-
-internal_module: \
- MODULE_DEPENDS = $$replace(QT, -private$, _private)
-else: \
- MODULE_DEPENDS = $$replace(QT, -private$, )
-MODULE_DEPENDS = $$unique(MODULE_DEPENDS)
-contains(MODULE_DEPENDS, $$MODULE): \
- error("$$TARGET depends on itself.")
-
-contains(TARGET, QtAddOn.*): \
- MODULE_DEFINE = QT_ADDON_$${ucmodule}_LIB
-else: \
- MODULE_DEFINE = QT_$${ucmodule}_LIB
-MODULE_DEFINES = $$MODULE_DEFINE $$MODULE_DEFINES
-
-# Make sure that the supporting runtime is linked into the application when
-# the module is built with exceptions enabled.
-integrity:CONFIG(exceptions, exceptions|exceptions_off): \
- MODULE_CONFIG += exceptions
-
-load(qt_build_paths)
-
-header_module {
- TEMPLATE = aux
- CONFIG += force_qt # Needed for the headers_clean tests.
- !lib_bundle: \
- CONFIG += qt_no_install_library
-
- # Allow creation of .prl, .la and .pc files.
- target.path = $$[QT_INSTALL_LIBS]
- target.CONFIG += dummy_install
- INSTALLS += target
-} else {
- TEMPLATE = lib
-}
-DESTDIR = $$MODULE_BASE_OUTDIR/lib
-DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin
-
-CONFIG += qmake_cache target_qt
-
-QMAKE_DOCS_TARGETDIR = qt$${MODULE}
-
-load(qt_common)
-!no_module_headers: load(qt_module_headers)
-load(qt_module_pris)
-
-INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}_private.includes)
-
-# If Qt was configured with -debug-and-release then build the module the same way
-# - unless this is a host library
-!host_build:if(win32|mac):!macx-xcode {
- qtConfig(debug_and_release): CONFIG += debug_and_release
- qtConfig(build_all): CONFIG += build_all
-}
-
-QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
-
-QT_PRIVATE += $$QT_FOR_PRIVATE
-unset(QT_FOR_PRIVATE)
-QMAKE_USE_PRIVATE += $$QMAKE_USE_FOR_PRIVATE
-unset(QMAKE_USE_FOR_PRIVATE)
-
-!internal_module:CONFIG += create_cmake
-
-contains(TARGET, QtAddOn.*): \
- DEFINES += QT_BUILD_ADDON_$${ucmodule}_LIB
-else: \
- DEFINES += QT_BUILD_$${ucmodule}_LIB
-
-# OS X and iOS frameworks
-lib_bundle {
- # Set the CFBundleIdentifier prefix for Qt frameworks
- QMAKE_TARGET_BUNDLE_PREFIX = org.qt-project
- #QMAKE_FRAMEWORK_VERSION = 4.0
- CONFIG += sliced_bundle
- header_module {
- CONFIG += bundle
- QMAKE_BUNDLE_NAME = $$TARGET
- QMAKE_BUNDLE_EXTENSION = .framework
- QMAKE_INFO_PLIST = $$QMAKESPEC/Info.plist.lib
- }
- !build_all| \
- if(if(!debug_and_release|CONFIG(release, debug|release))) {
- FRAMEWORK_HEADERS.version = Versions
- FRAMEWORK_HEADERS.files = \
- $$SYNCQT.HEADER_FILES $$SYNCQT.GENERATED_HEADER_FILES $$SYNCQT.INJECTED_HEADER_FILES
- FRAMEWORK_HEADERS.path = Headers
- FRAMEWORK_PRIVATE_HEADERS.version = Versions
- FRAMEWORK_PRIVATE_HEADERS.files = \
- $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.INJECTED_PRIVATE_HEADER_FILES
- FRAMEWORK_PRIVATE_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME/private
- FRAMEWORK_QPA_HEADERS.version = Versions
- FRAMEWORK_QPA_HEADERS.files = $$SYNCQT.QPA_HEADER_FILES
- FRAMEWORK_QPA_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME/qpa
- QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS FRAMEWORK_PRIVATE_HEADERS FRAMEWORK_QPA_HEADERS
- }
-}
-
-mac {
- macx-g++ {
- QMAKE_CFLAGS += -fconstant-cfstrings
- QMAKE_CXXFLAGS += -fconstant-cfstrings
- }
-
- qtConfig(rpath): \
- QMAKE_SONAME_PREFIX = @rpath
- else: \
- CONFIG += absolute_library_soname
-}
-
-DEFINES += QT_BUILDING_QT
-win32 {
- INCLUDEPATH += tmp
- CONFIG += skip_target_version_ext
- # If the code is really "unsafe" then it is unsafe on
- # other platforms as well; so fixing these warnings just
- # for MSVC builds, would clutter the code and wouldn't help
- # in fixing issues that might exist on other platforms.
- # Using the same functions across all supported platforms
- # keeps the code clean and helps in writing code that is
- # safe across all platforms.
- DEFINES *= _CRT_SECURE_NO_WARNINGS
-
- DEFINES += _USE_MATH_DEFINES
-}
-
-aix-g++* {
- QMAKE_CFLAGS += -mminimal-toc
- QMAKE_CXXFLAGS += -mminimal-toc
-}
-
-sse2:!contains(QT_CPU_FEATURES.$$QT_ARCH, sse2):!host_build:!if(static:qtConfig(shared)) {
- # If the compiler supports SSE2, enable it unconditionally in all of Qt shared libraries
- # (and only the libraries). This is not expected to be a problem because:
- # - on Windows, sharing of libraries is uncommon
- # - on Mac OS X, all x86 CPUs already have SSE2 support (we won't even reach here)
- # - on Linux, the dynamic loader can find the libraries on LIBDIR/sse2/
- # The last guarantee does not apply to executables and plugins, so we can't enable for them.
- QT_CPU_FEATURES.$$QT_ARCH += sse sse2
- QMAKE_CFLAGS += $$QMAKE_CFLAGS_SSE2
- QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_SSE2
-}
-
-clang {
- apple_clang_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
- reg_clang_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}
- versionAtLeast(apple_clang_ver, 5.1)|versionAtLeast(reg_clang_ver, 3.4): \
- CONFIG += compiler_supports_fpmath
-} else: gcc {
- CONFIG += compiler_supports_fpmath
-}
-
-equals(QT_ARCH, i386):contains(QT_CPU_FEATURES.$$QT_ARCH, sse2):compiler_supports_fpmath {
- # Turn on SSE-based floating-point math
- QMAKE_CFLAGS += -mfpmath=sse
- QMAKE_CXXFLAGS += -mfpmath=sse
-}
-
-android: CONFIG += qt_android_deps no_linker_version_script
-
-!header_module:unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!no_linker_version_script:!static {
- verscript = $${TARGET}.version
- QMAKE_LFLAGS += $${QMAKE_LFLAGS_VERSION_SCRIPT}$$verscript
-
- internal_module {
- verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API { *; };"
- } else {
- verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API {" \
- " qt_private_api_tag*;"
-
- private_api_headers = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.QPA_HEADER_FILES
-
- for(header, private_api_headers): \
- verscript_content += " @FILE:$$header@"
- verscript_content += "};"
-
- current = Qt_$$QT_MAJOR_VERSION
- verscript_content += "$$current { *; };"
- isEmpty(QT_NAMESPACE): tag_symbol = qt_version_tag
- else: tag_symbol = qt_version_tag_$$QT_NAMESPACE
-
- for(i, 0..$$QT_MINOR_VERSION) {
- previous = $$current
- current = Qt_$${QT_MAJOR_VERSION}.$$i
- equals(i, $$QT_MINOR_VERSION): verscript_content += "$$current { $$tag_symbol; } $$previous;"
- else: verscript_content += "$$current {} $$previous;"
- }
-
- # Add a post-processing step to replace the @FILE:filename@
- verscript_in = $${verscript}.in
- verscriptprocess.name = linker version script ${QMAKE_FILE_BASE}
- verscriptprocess.input = verscript_in
- verscriptprocess.CONFIG += no_link target_predeps
- verscriptprocess.depends = $$private_api_headers
- verscriptprocess.output = $$verscript
- verscriptprocess.commands = perl $${PWD}/data/unix/findclasslist.pl < ${QMAKE_FILE_IN} > $@
- silent:verscriptprocess.commands = @echo creating linker version script ${QMAKE_FILE_BASE} && $$verscriptprocess.commands
- QMAKE_EXTRA_COMPILERS += verscriptprocess
-
- verscript = $$verscript_in
- }
- write_file($$OUT_PWD/$$verscript, verscript_content)|error()
- unset(current)
- unset(previous)
- unset(verscript)
- unset(verscript_content)
-}
-
-#install directives
-load(qt_installs)
-
-load(qt_targets)
-
-# this builds on top of qt_common
-!internal_module:if(unix|mingw) {
- CONFIG += create_pc
- QMAKE_PKGCONFIG_DESTDIR = pkgconfig
- host_build: \
- QMAKE_PKGCONFIG_LIBDIR = $$[QT_HOST_LIBS]
- else: \
- QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw]
- lib_bundle {
- QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_LIBS/raw]/$${MODULE_INCNAME}.framework/Headers
- QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE
- } else {
- QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]
- QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE -I${includedir}/$$MODULE_INCNAME
- }
- QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ")
- QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION)
- for(i, MODULE_DEPENDS): \
- QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))
- isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \
- QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module
- !isEmpty(lib_replace0.match) {
- pclib_replace0.match = $$lib_replace0.match
- pclib_replace0.replace = $$QMAKE_PKGCONFIG_LIBDIR/
- pclib_replace0.CONFIG = path
- QMAKE_PKGCONFIG_INSTALL_REPLACE += pclib_replace0
- }
- pclib_replace.match = $$lib_replace.match
- !isEmpty(lib_replace.replace): \
- pclib_replace.replace = $$QMAKE_PKGCONFIG_LIBDIR
- pclib_replace.CONFIG = path
- QMAKE_PKGCONFIG_INSTALL_REPLACE += pclib_replace
-}
-!lib_bundle:unix {
- CONFIG += create_libtool
- host_build: \
- QMAKE_LIBTOOL_LIBDIR = $$[QT_HOST_LIBS]
- else: \
- QMAKE_LIBTOOL_LIBDIR = "=$$[QT_INSTALL_LIBS/raw]"
- !isEmpty(lib_replace0.match) {
- ltlib_replace0.match = $$lib_replace0.match
- ltlib_replace0.replace = $$QMAKE_LIBTOOL_LIBDIR/
- ltlib_replace0.CONFIG = path
- QMAKE_LIBTOOL_INSTALL_REPLACE += ltlib_replace0
- }
- ltlib_replace.match = $$lib_replace.match
- !isEmpty(lib_replace.replace): \
- ltlib_replace.replace = $$QMAKE_LIBTOOL_LIBDIR
- ltlib_replace.CONFIG = path
- QMAKE_LIBTOOL_INSTALL_REPLACE += ltlib_replace
-}
-
-contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
-DEFINES *= QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS
-DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code
-DEFINES *= QT_USE_QSTRINGBUILDER
-DEFINES *= QT_DEPRECATED_WARNINGS
-
-win32 {
- # On Windows, due to the way DLLs work, we need to export all functions,
- # including the inlines
- DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x040800
-} else {
- # On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API
- DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x050000
-}
-
-TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) # Do this towards the end
diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf
deleted file mode 100644
index 7ee1a956f4..0000000000
--- a/mkspecs/features/qt_module_headers.prf
+++ /dev/null
@@ -1,312 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-load(qt_build_paths)
-
-!build_pass:git_build {
- qtPrepareTool(QMAKE_SYNCQT, syncqt, , system)
- minimal_syncqt {
- QMAKE_SYNCQT += -minimal $$QMAKE_SYNCQT_OPTIONS
- } else {
- qtConfig(private_tests): \ # -developer-build
- QMAKE_SYNCQT += -check-includes
- }
- for(mod, MODULE_INCNAME): \
- QMAKE_SYNCQT += -module $$mod
- QMAKE_SYNCQT += \
- -version $$VERSION -outdir $$system_quote($$MODULE_BASE_OUTDIR) \
- -builddir $$system_quote($$REAL_MODULE_BASE_OUTDIR) $$MODULE_SYNCQT_DIR
- !silent: message($$QMAKE_SYNCQT)
- system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
-
- !minimal_syncqt {
- include-distclean.commands = \
- $$QMAKE_DEL_TREE $$shell_quote($$shell_path($$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME))
- QMAKE_EXTRA_TARGETS += include-distclean
- DISTCLEAN_DEPS += include-distclean
- }
-}
-
-# Pre-generated headers in the source tree (tar-ball) and
-# - shadow build or
-# - non-shadow non-prefix build of a module which is not qtbase
-# (because the build-time generated headers all end up in qtbase).
-!git_build: \
- if(!equals(_PRO_FILE_PWD_, $$OUT_PWD) \
- |if(!prefix_build:!equals(MODULE_BASE_INDIR, $$[QT_HOST_PREFIX]))): \
- CONFIG += split_incpath
-
-# To avoid stuffing the code with repetetive conditionals,
-# we parametrize the names of the variables we assign to.
-
-# Internal modules have no private part - they *are* private.
-!internal_module: \
- prv = _PRIVATE
-
-# When doing a framework build with a prefix, the module needs to point
-# into the frameworks' Headers dirs directly, as no shared include/ dir
-# is installed.
-# However, during the build, it needs to point into the shared include/
-# dir, as the framework doesn't even exist yet. For bootstrapped modules
-# which borrow headers from "proper" modules, this situation persists
-# even beyond the module's own build. The implication of this is that
-# qmake might never use a framework's headers in a non-prefix build,
-# as there is no separate set of .pri files for users outside Qt.
-# Borrowing is assumed to happen from modules which, in a framework build,
-# actually are frameworks.
-prefix_build:module_frameworks: \
- fwd = _FWD
-# When using a split include path during the build, the installed module's
-# include path is also structurally different from that in the build dir.
-prefix_build:split_incpath: \
- sfwd = _FWD
-
-ibase = \$\$QT_MODULE_INCLUDE_BASE
-MODULE$${fwd}_INCLUDES = $$ibase
-split_incpath {
- bibase = $$val_escape(MODULE_BASE_OUTDIR)/include
- MODULE$${sfwd}_INCLUDES += $$bibase
-}
-for(mod, MODULE_INCNAME) {
- mibase = $$ibase/$$mod
- MODULE$${fwd}_INCLUDES += $$mibase
- MODULE$${fwd}$${prv}_INCLUDES += $$mibase/$$VERSION $$mibase/$$VERSION/$$mod
- split_incpath {
- mbibase = $$bibase/$$mod
- MODULE$${sfwd}_INCLUDES += $$mbibase
- generated_privates: \
- MODULE$${sfwd}$${prv}_INCLUDES += $$mbibase/$$VERSION $$mbibase/$$VERSION/$$mod
- }
- prefix_build:module_frameworks {
- mfbase = \$\$QT_MODULE_LIB_BASE/$${mod}.framework/Headers
- MODULE_INCLUDES += $$mfbase
- MODULE$${prv}_INCLUDES += $$mfbase/$$VERSION $$mfbase/$$VERSION/$$mod
- }
-}
-MODULE_INCLUDES += $$MODULE_AUX_INCLUDES
-MODULE_PRIVATE_INCLUDES += $$MODULE_PRIVATE_AUX_INCLUDES
-
-minimal_syncqt: return()
-
-defineTest(syncQtResolve) {
- out =
- for (f, SYNCQT.$$1): \
- out += $$absolute_path($$f, $$2)
- SYNCQT.$$1 = $$out
- export(SYNCQT.$$1)
-}
-
-#load up the headers info
-git_build: \
- INC_PATH = $$MODULE_BASE_OUTDIR
-else: \
- INC_PATH = $$MODULE_BASE_INDIR
-include($$INC_PATH/include/$$MODULE_INCNAME/headers.pri, "", true)
-syncQtResolve(HEADER_FILES, $$_PRO_FILE_PWD_)
-syncQtResolve(PRIVATE_HEADER_FILES, $$_PRO_FILE_PWD_)
-syncQtResolve(QPA_HEADER_FILES, $$_PRO_FILE_PWD_)
-syncQtResolve(GENERATED_HEADER_FILES, $$INC_PATH/include/$$MODULE_INCNAME)
-!lib_bundle: \ # Headers are embedded into the bundle, so don't install them separately.
- CONFIG += qt_install_headers
-
-alien_syncqt: return()
-
-MODULE_INC_OUTDIR = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME
-
-isEmpty(MODULE_CFG_FILE): MODULE_CFG_FILE = qt$${MODULE}-config
-exists($$OUT_PWD/$${MODULE_CFG_FILE}.h) {
- fwd_rel = $$relative_path($$OUT_PWD, $$REAL_MODULE_BASE_OUTDIR)
- SYNCQT.INJECTIONS += \
- $$fwd_rel/$${MODULE_CFG_FILE}.h:$${MODULE_CFG_FILE}.h \
- $$fwd_rel/$${MODULE_CFG_FILE}_p.h:$$MODULE_VERSION/$$MODULE_INCNAME/private/$${MODULE_CFG_FILE}_p.h
-}
-
-for (injection, SYNCQT.INJECTIONS) {
- injects = $$split(injection, :)
- dst_hdr = $$absolute_path($$member(injects, 0), $$REAL_MODULE_BASE_OUTDIR)
- ofwd_hdr = $$member(injects, 1)
- fwd_hdr = $$replace(ofwd_hdr, ^\\^, )
- MAIN_FWD = $$MODULE_INC_OUTDIR/$$fwd_hdr
- MAIN_FWD_CONT = '$${LITERAL_HASH}include "$$relative_path($$dst_hdr, $$dirname(MAIN_FWD))"'
- write_file($$MAIN_FWD, MAIN_FWD_CONT)|error()
- equals(fwd_hdr, ofwd_hdr): touch($$MAIN_FWD, $$dst_hdr)
- !git_build: QMAKE_DISTCLEAN += $$MAIN_FWD
- !contains(ofwd_hdr, .*/private/.*): \
- SYNCQT.INJECTED_HEADER_FILES += $$dst_hdr
- else: \
- SYNCQT.INJECTED_PRIVATE_HEADER_FILES += $$dst_hdr
- injects = $$member(injects, 2, -1)
- for (inject, injects) {
- CLASS_FWD = $$MODULE_INC_OUTDIR/$$inject
- CLASS_FWD_CONT = '$${LITERAL_HASH}include "$$fwd_hdr"'
- write_file($$CLASS_FWD, CLASS_FWD_CONT)|error()
- touch($$CLASS_FWD, $$MAIN_FWD)
- !git_build: QMAKE_DISTCLEAN += $$CLASS_FWD
- SYNCQT.INJECTED_HEADER_FILES += $$CLASS_FWD
- }
-}
-
-autogen_warning = \
- "/* This file was generated by qmake with the info from <root>/$$relative_path($$_PRO_FILE_, $$MODULE_BASE_INDIR). */"
-
-# Create a module master depends header
-MODULE_MASTER_DEPS_HEADER = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$${MODULE_INCNAME}Depends
-!build_pass {
- MODULE_MASTER_DEPS_HEADER_CONT = $$autogen_warning
- MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}ifdef __cplusplus /* create empty PCH in C mode */"
- for(dep, MODULE_DEPENDS) {
- depname = $$eval(QT.$${dep}.master_header)
- isEmpty(depname): \
- depname = $$eval(QT.$${dep}.name)
- MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}include <$$depname/$$depname>"
- }
- MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}endif"
- write_file($$MODULE_MASTER_DEPS_HEADER, MODULE_MASTER_DEPS_HEADER_CONT)|error()
- !git_build: QMAKE_DISTCLEAN += $$MODULE_MASTER_DEPS_HEADER
-}
-SYNCQT.HEADER_FILES += $$MODULE_MASTER_DEPS_HEADER
-
-# Automatically enable precompiled headers for Qt modules with more than 2 sources
-combined_SOURCES = $$SOURCES $$OBJECTIVE_SOURCES
-count(combined_SOURCES, 2, >) {
- # except for Gcc/Windows: Larger precompiled headers crash cc1plus.exe
- # (e.g. with i686-4.8.2-release-posix-dwarf-rt_v3-rev3)
- !if(gcc:equals(QMAKE_HOST.os, Windows)):!equals(TEMPLATE, aux) {
- !defined(PRECOMPILED_HEADER, "var"): PRECOMPILED_HEADER = $$MODULE_MASTER_DEPS_HEADER
- }
-} else {
- CONFIG -= precompile_header
-}
-unset(combined_SOURCES)
-
-headersclean:!internal_module {
- # Make sure that the header compiles with our strict options
- hcleanDEFS = -DQT_NO_CAST_TO_ASCII=1 \
- -DQT_NO_CAST_FROM_ASCII=1 \
- -UQT_RESTRICTED_CAST_FROM_ASCII \
- -DQT_STRICT_ITERATORS \
- -DQT_NO_URL_CAST_FROM_STRING=1 \
- -DQT_NO_CAST_FROM_BYTEARRAY=1 \
- -DQT_NO_KEYWORDS=1 \
- -DQT_USE_QSTRINGBUILDER \
- -DQT_USE_FAST_OPERATOR_PLUS \
- -Dsignals=int \
- -Dslots=int \
- -Demit=public: \
- -Dforeach=public: \
- -Dforever=public:
-
- gcc:!rim_qcc {
- # Turn on some extra warnings not found in -Wall -Wextra.
- # Common to GCC, Clang and ICC (and other compilers that masquerade as GCC):
- hcleanFLAGS = -Wall -Wextra -Werror \
- -Woverloaded-virtual -Wshadow -Wundef -Wfloat-equal \
- -Wnon-virtual-dtor -Wpointer-arith -Wformat-security \
- -Wno-long-long -Wno-variadic-macros -pedantic-errors
-
- intel_icc {
- # these warnings are disabled because explicit constructors with zero or
- # multiple arguments are permitted in C++11:
- # 2304: non-explicit constructor with single argument may cause implicit type conversion
- # 2305: declaration of 'explicit' constructor without a single argument is redundant
- hcleanFLAGS += -wd2304,2305
- greaterThan(QT_ICC_MAJOR_VERSION, 13) {
- # ICC 14+ has a bug with -Wshadow, emitting it for cases where there's no shadowing
- # (issue ID 0000698329, task DPD200245740)
- hcleanFLAGS -= -Wshadow
- }
- } else {
- # options accepted by GCC and Clang
- hcleanFLAGS += -Wchar-subscripts -Wold-style-cast
-
- !contains(QT_ARCH, arm):!contains(QT_ARCH, mips): \
- hcleanFLAGS += -Wcast-align
-
- clang_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}
- versionAtLeast(clang_ver, 3.8): hcleanFLAGS += -Wdouble-promotion
-
- !clang {
- # options accepted only by GCC
-
- gcc_ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION}
- versionAtLeast(gcc_ver, 4.5): hcleanFLAGS += -Wdouble-promotion
- versionAtLeast(gcc_ver, 4.9): hcleanFLAGS += -Wfloat-conversion
- # GCC 9 has a lot of false positives relating to this, so disable completely
- greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-deprecated-copy
- # GCC 9 introduced this
- greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-redundant-move
- # GCC 9 introduced this
- greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-format-overflow
- # GCC 9 introduced this
- greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-init-list-lifetime
-
- c++11 {
- # only enabled for actual c++11 builds due to
- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52806
- hcleanFLAGS += -Wzero-as-null-pointer-constant
- }
- }
- }
-
- # Use strict mode C++11 or C++98, with no GNU extensions (see -pedantic-errors above).
- # The module might set CONFIG += c++11, but it might also change QMAKE_CXXFLAGS_CXX11
- # or the module (or the mkspec) can set the C++11 flag on QMAKE_CXXFLAGS
- # (or QMAKE_CXXFLAGS_{RELEASE,DEBUG} but that's unlikely).
- c++11:contains(QMAKE_CXXFLAGS_CXX11, -std=gnu++11) {
- hcleanFLAGS += -std=c++11
- } else: contains(QMAKE_CXXFLAGS, -std=gnu++11) {
- hcleanFLAGS += -std=c++11
- } else: c++11:contains(QMAKE_CXXFLAGS_CXX11, -std=gnu++0x) {
- hcleanFLAGS += -std=c++0x
- } else: contains(QMAKE_CXXFLAGS, -std=gnu++0x) {
- hcleanFLAGS += -std=c++0x
- } else: !c++11:!contains(QMAKE_CXXFLAGS, -std=c++0x):!contains(QMAKE_CXXFLAGS, -std=c++11) {
- hcleanFLAGS += -std=c++98
- }
-
- hcleanCOMMAND = $(CXX) -c $(CXXFLAGS) $$hcleanFLAGS $(INCPATH) $$hcleanDEFS -xc++ ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- } else: msvc:!intel_icl {
- # 4180: qualifier applied to function type has no meaning; ignored
- # 4458: declaration of 'identifier' hides class member
- # -Za enables strict standards behavior, but we can't add it because
- # <windows.h> and <GL.h> violate the standards.
- hcleanFLAGS = -WX -W3 -wd4180 -wd4458
-
- # MSVC 2015 (compiler version 19.0):
- # 4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc
- greaterThan(QMAKE_MSC_VER, 18): hcleanFLAGS += -wd4577
-
- hcleanCOMMAND = $(CXX) -c $(CXXFLAGS) $$hcleanFLAGS $(INCPATH) $$hcleanDEFS -FI${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT} \
- $$[QT_INSTALL_DATA/src]/mkspecs/features/data/dummy.cpp
- }
-
- !isEmpty(hcleanCOMMAND):if(!qtConfig(debug_and_release)|CONFIG(release, debug|release)) {
- CLEAN_HEADERS =
- for (h, SYNCQT.CLEAN_HEADER_FILES) {
- hh = $$split(h, :)
- hr = $$member(hh, 1)
- isEmpty(hr)|qtConfig($$hr): \
- CLEAN_HEADERS += $$member(hh, 0)
- }
- CLEAN_HEADERS -= $$HEADERSCLEAN_EXCLUDE
- header_check.dependency_type = TYPE_C
- header_check.CONFIG += no_link
- header_check.output = ${QMAKE_VAR_OBJECTS_DIR}header_${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- header_check.input = CLEAN_HEADERS
- header_check.variable_out = PRE_TARGETDEPS
- header_check.name = headercheck ${QMAKE_FILE_IN}
- header_check.commands = $$hcleanCOMMAND
- QMAKE_EXTRA_COMPILERS += header_check
- }
- unset(hcleanCOMMAND)
- unset(hcleanFLAGS)
- unset(hcleanDEFS)
-}
diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf
deleted file mode 100644
index e892f83432..0000000000
--- a/mkspecs/features/qt_module_pris.prf
+++ /dev/null
@@ -1,226 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-load(qt_build_paths)
-force_independent|split_incpath: \
- CONFIG += need_fwd_pri
-mod_work_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules
-need_fwd_pri: \
- mod_inst_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst
-else: \
- mod_inst_pfx = $$mod_work_pfx
-!internal_module {
- MODULE_ID = $$MODULE
- mods_to_load = $$MODULE
- !no_private_module {
- MODULE_PRIVATE_PRI = $$mod_inst_pfx/qt_lib_$${MODULE}_private.pri
- mods_to_load += $${MODULE}_private
- }
-} else {
- MODULE_ID = $${MODULE}_private
- mods_to_load = $${MODULE}_private
-}
-need_fwd_pri: \
- pris_to_load = $$MODULE_ID
-else: \
- pris_to_load = $$mods_to_load
-MODULE_PRI = $$mod_inst_pfx/qt_lib_$${MODULE_ID}.pri
-MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
-
-defineReplace(qtGetFeaturesForModule) {
- enabled = $$unique(QT.$${1}.enabled_features)
- disabled = $$unique(QT.$${1}.disabled_features)
- result = \
- "QT.$${1}.enabled_features =$$join(enabled, " ", " ")" \
- "QT.$${1}.disabled_features =$$join(disabled, " ", " ")"
- return($$result)
-}
-
-defineReplace(qtGetExportsForModule) {
- result =
- for (var, QT.$${1}.exports): \
- result += "$$var = $$val_escape($$var)"
- return($$result)
-}
-
-defineReplace(qtExportLibsForModule) {
- result =
- for (lib, QT.$${1}.libraries) {
- NAME = $$upper($$lib)
- vars = \
- QMAKE_DEPENDS_$${NAME}_CC QMAKE_DEPENDS_$${NAME}_LD \
- QMAKE_LIBS_$$NAME QMAKE_LIBS_$${NAME}_DEBUG QMAKE_LIBS_$${NAME}_RELEASE \
- QMAKE_DEFINES_$$NAME QMAKE_INCDIR_$$NAME
- for (var, vars) {
- expvar = $$var
- expvar ~= s/^QMAKE_/QMAKE_EXPORT_/
- defined($$expvar, var):equals($$expvar, -): next()
- !defined($$expvar, var): expvar = $$var
- defined($$expvar, var): \
- result += "$$var = $$val_escape($$expvar)"
- }
- }
- return($$result)
-}
-
-!build_pass {
-
- # Create a module .pri file
- host_build: \
- module_libs = "\$\$QT_MODULE_HOST_LIB_BASE"
- else: \
- module_libs = "\$\$QT_MODULE_LIB_BASE"
- # In addition to the library's private deps, the private module's deps
- # are logically runtime deps of the public module.
- runtime_deps = $$QT_PRIVATE $$QT_FOR_PRIVATE
- !isEmpty(runtime_deps): \
- module_rundep = "QT.$${MODULE_ID}.run_depends = $$replace(runtime_deps, -private$, _private)"
- else: \
- module_rundep =
- module_build_type = v2
- static: \
- module_build_type += staticlib
- lib_bundle: \
- module_build_type += lib_bundle
- module_frameworks: \
- MODULE_FRAMEWORKS = " \$\$QT_MODULE_LIB_BASE"
- internal_module: \
- module_build_type += internal_module
- ltcg: \
- module_build_type += ltcg
- module_module =
- !equals(TEMPLATE, aux) {
- module_module = $$TARGET$$QT_LIBINFIX
- !lib_bundle: module_module ~= s,^Qt,Qt$$QT_MAJOR_VERSION,
- }
- !isEmpty(MODULE_CONFIG): \
- module_config = "QT.$${MODULE_ID}.CONFIG = $$MODULE_CONFIG"
- else: \
- module_config =
- !isEmpty(MODULE_PLUGIN_TYPES): \
- module_plugtypes = "QT.$${MODULE_ID}.plugin_types = $$replace(MODULE_PLUGIN_TYPES, /[^.]+\\.[^.]+$, )"
- else: \
- module_plugtypes =
- !isEmpty(MODULE_MASTER_HEADER): \
- module_master = "QT.$${MODULE_ID}.master_header = $$MODULE_MASTER_HEADER"
- else: \
- module_master =
- MODULE_PRI_CONT = \
- "QT.$${MODULE_ID}.VERSION = $${VERSION}" \
- "" \
- "QT.$${MODULE_ID}.name = $$TARGET" \
- "QT.$${MODULE_ID}.module = $$module_module" \
- "QT.$${MODULE_ID}.libs = $$module_libs" \
- $$module_master \
- "QT.$${MODULE_ID}.includes = $$MODULE_INCLUDES" \
- "QT.$${MODULE_ID}.frameworks =$$MODULE_FRAMEWORKS"
- !host_build: MODULE_PRI_CONT += \
- "QT.$${MODULE_ID}.bins = \$\$QT_MODULE_BIN_BASE" \
- $$module_plugtypes
- MODULE_PRI_CONT += \
- "QT.$${MODULE_ID}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
- $$module_rundep \
- "QT.$${MODULE_ID}.uses =$$join(QMAKE_USE, " ", " ")" \
- "QT.$${MODULE_ID}.module_config =$$join(module_build_type, " ", " ")" \
- $$module_config \
- "QT.$${MODULE_ID}.DEFINES = $$val_escape(MODULE_DEFINES)" \
- $$qtGetFeaturesForModule($$MODULE_ID) \
- $$qtGetExportsForModule($$MODULE_ID) \
- "QT_CONFIG +=$$join(QT.$${MODULE_ID}.QT_CONFIG, " ", " ")" \
- "" \
- "QT_MODULES += $$MODULE"
- winrt: MODULE_PRI_CONT += \
- "QT.$${MODULE_ID}.winrt_capabilities =$$join(MODULE_WINRT_CAPABILITIES, " ", " ")" \
- "QT.$${MODULE_ID}.winrt_capabilities_device =$$join(MODULE_WINRT_CAPABILITIES_DEVICE, " ", " ")"
- write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
- !internal_module:!no_private_module {
- module_build_type += internal_module
- private_deps = $$QT
- private_deps -= $$MODULE_DEPENDS
- private_deps += $$MODULE $$QT_FOR_PRIVATE
- private_deps ~= s,-private$,_private,g
- MODULE_PRIVATE_PRI_CONT = \
- "QT.$${MODULE}_private.VERSION = $${VERSION}" \
- "" \
- "QT.$${MODULE}_private.name = $${TARGET}" \ # Same name as base module
- "QT.$${MODULE}_private.module =" \
- "QT.$${MODULE}_private.libs = $$module_libs" \
- "QT.$${MODULE}_private.includes = $$MODULE_PRIVATE_INCLUDES" \
- "QT.$${MODULE}_private.frameworks =" \
- "QT.$${MODULE}_private.depends = $$private_deps" \
- "QT.$${MODULE}_private.uses =$$join(QMAKE_USE_FOR_PRIVATE, " ", " ")" \
- "QT.$${MODULE}_private.module_config =$$join(module_build_type, " ", " ")" \
- $$qtGetFeaturesForModule($${MODULE}_private) \
- "" \
- $$qtExportLibsForModule($${MODULE}_private)
- write_file($$MODULE_PRIVATE_PRI, MODULE_PRIVATE_PRI_CONT)|error()
- }
- MODULE_PRI_FILES = $$MODULE_PRI $$MODULE_PRIVATE_PRI
-
- need_fwd_pri {
-
- !git_build: \
- MODULE_BASE_INCDIR = $$MODULE_BASE_INDIR
- else: \
- MODULE_BASE_INCDIR = $$MODULE_BASE_OUTDIR
-
- # Create a forwarding module .pri file
- MODULE_FWD_PRI_CONT = \
- "QT_MODULE_BIN_BASE = $$val_escape(MODULE_BASE_OUTDIR)/bin" \
- "QT_MODULE_INCLUDE_BASE = $$val_escape(MODULE_BASE_INCDIR)/include" \
- "QT_MODULE_LIB_BASE = $$val_escape(MODULE_BASE_OUTDIR)/lib" \
- "QT_MODULE_HOST_LIB_BASE = $$val_escape(MODULE_BASE_OUTDIR)/lib" \
- "include($$val_escape(MODULE_PRI))" \
- "QT.$${MODULE_ID}.priority = 1"
- !internal_module:!no_private_module: MODULE_FWD_PRI_CONT += \
- "include($$val_escape(MODULE_PRIVATE_PRI))" \
- "QT.$${MODULE}_private.priority = 1"
- !isEmpty(MODULE_FWD_INCLUDES) {
- !lib_bundle: \
- pls = +
- MODULE_FWD_PRI_CONT += \
- "QT.$${MODULE_ID}.includes $$pls= $$MODULE_FWD_INCLUDES"
- !internal_module: \
- MODULE_FWD_PRI_CONT += \
- "QT.$${MODULE}_private.includes $$pls= $$MODULE_FWD_PRIVATE_INCLUDES"
- }
- write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error()
- touch($$MODULE_FWD_PRI, $$MODULE_PRI)
- MODULE_PRI_FILES += $$MODULE_FWD_PRI
-
- } else {
-
- # This is needed for the direct include() below. Mirrors qt_config.prf
- QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS]
- QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS]
- QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS]
- QT_MODULE_HOST_LIB_BASE = $$[QT_HOST_LIBS]
-
- }
-
- # Then, inject the new module into the current cache state
- !contains(QMAKE_INTERNAL_INCLUDED_FILES, $$MODULE_PRI): \ # before the actual include()!
- cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, MODULE_PRI_FILES)
- for(pri, pris_to_load): \
- include($$mod_work_pfx/qt_lib_$${pri}.pri)
- for(mod, mods_to_load) {
- for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
- name module depends run_depends plugin_types module_config CONFIG DEFINES \
- priority includes bins libs frameworks \
- winrt_capabilities winrt_capabilities_device \
- )):defined(QT.$${mod}.$$var, var):cache(QT.$${mod}.$$var, transient)
- }
- cache(QT_MODULES, transient)
-
-} # !build_pass
-
-# Schedule the regular .pri file for installation
-CONFIG += qt_install_module
diff --git a/mkspecs/features/qt_parts.prf b/mkspecs/features/qt_parts.prf
deleted file mode 100644
index 4598031769..0000000000
--- a/mkspecs/features/qt_parts.prf
+++ /dev/null
@@ -1,84 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-# Ensure that each module has a .qmake.cache when properly qmake'd.
-cache()
-
-load(qt_configure)
-
-load(qt_build_config)
-
-TEMPLATE = subdirs
-
-bp = $$eval($$upper($$TARGET)_BUILD_PARTS)
-!isEmpty(bp): QT_BUILD_PARTS = $$bp
-
-exists($$_PRO_FILE_PWD_/src/src.pro) {
- sub_src.subdir = src
- sub_src.target = sub-src
- SUBDIRS += sub_src
-
- exists($$_PRO_FILE_PWD_/tools/tools.pro) {
- sub_tools.subdir = tools
- sub_tools.target = sub-tools
- sub_tools.depends = sub_src
- # conditional treatment happens on a case-by-case basis
- SUBDIRS += sub_tools
- }
-}
-
-exists($$_PRO_FILE_PWD_/examples/examples.pro) {
- sub_examples.subdir = examples
- sub_examples.target = sub-examples
- contains(SUBDIRS, sub_src): sub_examples.depends = sub_src
- contains(SUBDIRS, sub_tools): sub_examples.depends += sub_tools
- !contains(QT_BUILD_PARTS, examples): sub_examples.CONFIG = no_default_target no_default_install
- SUBDIRS += sub_examples
-}
-
-exists($$_PRO_FILE_PWD_/tests/tests.pro) {
- sub_tests.subdir = tests
- sub_tests.target = sub-tests
- contains(SUBDIRS, sub_src): sub_tests.depends = sub_src # The tests may have a run-time only dependency on other parts
- contains(SUBDIRS, sub_tools): sub_tests.depends += sub_tools
- sub_tests.CONFIG = no_default_install
- !contains(QT_BUILD_PARTS, tests) {
- sub_tests.CONFIG += no_default_target
- } else: !uikit {
- # Make sure these are there in case we need them
- sub_tools.CONFIG -= no_default_target
- sub_examples.CONFIG -= no_default_target
- sub_demos.CONFIG -= no_default_target
- }
- SUBDIRS += sub_tests
-}
-
-QT_BUILD_PARTS -= libs tools examples tests
-!isEmpty(QT_BUILD_PARTS): warning("Unknown build part(s): $$QT_BUILD_PARTS")
-
-QMAKE_DISTCLEAN += \
- .qmake.cache \
- config.cache \
- config.log \
- mkspecs/modules/*.pri \
- mkspecs/modules-inst/*.pri
-
-tests = $$files($$_PRO_FILE_PWD_/config.tests/*.pro, true)
-testdirs =
-for (t, tests): \
- testdirs += $$relative_path($$dirname(t), $$_PRO_FILE_PWD_)
-testdirs = $$unique(testdirs)
-for (td, testdirs) {
- t = $$basename(td)-distclean
- $${t}.commands = -$$QMAKE_CD $$shell_path($$td) && $(MAKE) distclean
- QMAKE_EXTRA_TARGETS += $$t
- DISTCLEAN_DEPS += $$t
-}
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
deleted file mode 100644
index 40528a65e2..0000000000
--- a/mkspecs/features/qt_plugin.prf
+++ /dev/null
@@ -1,103 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-load(qt_build_paths)
-
-isEmpty(PLUGIN_TYPE): error("PLUGIN_TYPE (plugins/ subdirectory) needs to be defined.")
-
-TEMPLATE = lib
-CONFIG += plugin
-DESTDIR = $$MODULE_BASE_OUTDIR/plugins/$$PLUGIN_TYPE
-
-win32:CONFIG(shared, static|shared) {
- # Embed a VERSIONINFO resource into the plugin's DLL.
- isEmpty(VERSION): VERSION = $$QT_VERSION
- CONFIG += skip_target_version_ext
-}
-
-tool_plugin {
- !build_pass:qtConfig(debug_and_release): CONFIG += release
-} else:if(win32|mac):!macx-xcode {
- qtConfig(debug_and_release): CONFIG += debug_and_release
- qtConfig(build_all): CONFIG += build_all
-}
-
-CONFIG += relative_qt_rpath # Qt's plugins should be relocatable
-
-# Qt libraries should only use Application Extension safe APIs
-darwin:!no_app_extension_api_only: CONFIG += app_extension_api_only
-
-isEmpty(MODULE): MODULE = $$basename(TARGET)
-
-CONFIG(static, static|shared)|prefix_build {
- mod_work_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules
- force_independent: \
- mod_inst_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst
- else: \
- mod_inst_pfx = $$mod_work_pfx
- MODULE_PRI = $$mod_inst_pfx/qt_plugin_$${MODULE}.pri
- MODULE_FWD_PRI = $$mod_work_pfx/qt_plugin_$${MODULE}.pri
-
- !build_pass {
- qt_plugin_deps = $$QT $$QT_PRIVATE
- qt_plugin_deps ~= s,-private$,_private,g
-
- MODULE_PRI_CONT = \
- "QT_PLUGIN.$${MODULE}.TYPE = $$PLUGIN_TYPE" \
- "QT_PLUGIN.$${MODULE}.EXTENDS =$$join(PLUGIN_EXTENDS, " ", " ")" \
- "QT_PLUGIN.$${MODULE}.DEPENDS = $$qt_plugin_deps" \
- "QT_PLUGIN.$${MODULE}.CLASS_NAME = $$PLUGIN_CLASS_NAME" \
- "QT_PLUGINS += $$MODULE"
- write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
- MODULE_PRI_FILES = $$MODULE_PRI
-
- force_independent {
-
- # Create a forwarding module .pri file
- MODULE_FWD_PRI_CONT = \
- "QT_PLUGIN.$${MODULE}.PATH = $$MODULE_BASE_OUTDIR/plugins" \
- "include($$MODULE_PRI)"
- write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error()
- touch($$MODULE_FWD_PRI, $$MODULE_PRI)
- MODULE_PRI_FILES += $$MODULE_FWD_PRI
-
- }
-
- # Then, inject the new module into the current cache state
- !contains(QMAKE_INTERNAL_INCLUDED_FILES, $$MODULE_FWD_PRI): \ # before the actual include()!
- cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, MODULE_PRI_FILES)
- include($$MODULE_FWD_PRI)
- for(var, $$list(TYPE EXTENDS CLASS_NAME PATH)): \
- defined(QT_PLUGIN.$${MODULE}.$$var, var): \
- cache(QT_PLUGIN.$${MODULE}.$$var, transient)
- cache(QT_PLUGINS, transient)
- }
-
- CONFIG(static, static|shared) {
- pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
- pritarget.files = $$MODULE_PRI
- INSTALLS += pritarget
- }
-}
-
-target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
-INSTALLS += target
-
-TARGET = $$qt5LibraryTarget($$TARGET)
-
-CONFIG += create_cmake
-
-DEFINES *= QT_DEPRECATED_WARNINGS
-
-load(qt_targets)
-load(qt_common)
-
-QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
diff --git a/mkspecs/features/qt_prefix_build_check.prf b/mkspecs/features/qt_prefix_build_check.prf
deleted file mode 100644
index 3f98847de9..0000000000
--- a/mkspecs/features/qt_prefix_build_check.prf
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-defineTest(qtIsPrefixBuild) {
- prefixdir = $$1
- # qtbase non-prefix build?
- exists($$prefixdir/.qmake.cache): \
- return(false)
- # top-level non-prefix build?
- contains(prefixdir, .*/qtbase):exists($$dirname(prefixdir)/.qmake.super): \
- return(false)
- return(true)
-}
diff --git a/mkspecs/features/qt_targets.prf b/mkspecs/features/qt_targets.prf
deleted file mode 100644
index b3c289a90b..0000000000
--- a/mkspecs/features/qt_targets.prf
+++ /dev/null
@@ -1,4 +0,0 @@
-QMAKE_TARGET_COMPANY = The Qt Company Ltd.
-isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
-isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ Application Development Framework
-QMAKE_TARGET_COPYRIGHT = Copyright (C) 2019 The Qt Company Ltd.
diff --git a/mkspecs/features/qt_test_helper.prf b/mkspecs/features/qt_test_helper.prf
deleted file mode 100644
index 86b65dd884..0000000000
--- a/mkspecs/features/qt_test_helper.prf
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-# If an auto test needs a helper application, this helper should
-# be put into the same directory as the test itself. This common
-# folder should be the test's "main directory" or a "debug" or "release"
-# subfolder inside this main directory if debug_and_release is enabled.
-# Additionally the helper's executable is suffixed with "_helper" to
-# avoid name clashes with its folder.
-
-CONFIG += cmdline
-
-debug_and_release {
- CONFIG(debug, debug|release) {
- TARGET = ../../debug/$${TARGET}_helper
- } else {
- TARGET = ../../release/$${TARGET}_helper
- }
-} else {
- TARGET = ../$${TARGET}_helper
-}
-
-parentFolder = $$dirname(_PRO_FILE_PWD_)
-testFolder = $$basename(parentFolder)
-target.path = $$[QT_INSTALL_TESTS]/$$testFolder
-INSTALLS += target
diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
deleted file mode 100644
index a8d589f0fa..0000000000
--- a/mkspecs/features/qt_tool.prf
+++ /dev/null
@@ -1,78 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-CONFIG += no_launch_target
-load(qt_app)
-
-CONFIG += console
-DEFINES *= QT_USE_QSTRINGBUILDER
-
-# If we are doing a prefix build, create a "module" pri which enables
-# qtPrepareTool() to work with the non-installed build.
-# Non-bootstrapped tools always need this because of the environment setup.
-!build_pass:if(!host_build|!force_bootstrap|force_independent|!isEmpty(HOST_QT_TOOLS)) {
- isEmpty(MODULE):MODULE = $$TARGET
-
- load(qt_build_paths)
-
- TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri
-
- vars = binary depends
-
- !host_build|isEmpty(HOST_QT_TOOLS) {
- load(resolve_target)
-
- !host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, _private)
-
- !isEmpty(QT_TOOL_ENV) {
- vars += envvars
- module_var_names =
- module_var_sets =
- for(var, QT_TOOL_ENV) {
- vars += env.$${var}.name env.$${var}.value
- module_var_names += QT_TOOL.$${MODULE}.env.$${var}
- module_var_sets += \
- "QT_TOOL.$${MODULE}.env.$${var}.name = $$val_escape($${var}.name)" \
- "QT_TOOL.$${MODULE}.env.$${var}.value = $$val_escape($${var}.value)"
- }
- module_envvars = \
- "QT_TOOL.$${MODULE}.envvars = $$module_var_names" \
- $$module_var_sets
- } else {
- module_envvars =
- }
-
- bin = $$system_path($$QMAKE_RESOLVED_TARGET)
- } else {
- bin = $${HOST_QT_TOOLS}/$${TARGET}
- equals(QMAKE_HOST.os, Windows): bin = $${bin}.exe
- bin = $$system_path($$bin)
- }
-
- TOOL_PRI_CONT = \
- "QT_TOOL.$${MODULE}.binary = $$val_escape(bin)" \
- "QT_TOOL.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
- $$module_envvars
- write_file($$TOOL_PRI, TOOL_PRI_CONT)|error()
-
- # Then, inject the new tool into the current cache state
- !contains(QMAKE_INTERNAL_INCLUDED_FILES, $$TOOL_PRI) { # before the actual include()!
- added = $$TOOL_PRI
- cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added)
- unset(added)
- }
- include($$TOOL_PRI)
- for(var, vars): \
- cache(QT_TOOL.$${MODULE}.$$var, transient)
-
-}
-# The variable is re-used by qtPrepareTool(), and we really don't want that.
-unset(QT_TOOL_ENV)
diff --git a/mkspecs/features/qt_tracepoints.prf b/mkspecs/features/qt_tracepoints.prf
deleted file mode 100644
index d1b45a47cb..0000000000
--- a/mkspecs/features/qt_tracepoints.prf
+++ /dev/null
@@ -1,54 +0,0 @@
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-qtPrepareTool(QMAKE_TRACEGEN, tracegen)
-
-isEmpty(TRACEGEN_DIR): TRACEGEN_DIR = .
-
-PROVIDER_NAME = qt$$lower($$MODULE)
-INCLUDEPATH += $$absolute_path($$TRACEGEN_DIR, $$OUT_PWD)
-HEADER_PATH = $$OUT_PWD/$$TRACEGEN_DIR/$${PROVIDER_NAME}_tracepoints_p$${first(QMAKE_EXT_H)}
-
-!force_bootstrap:if(qtConfig(lttng)|qtConfig(etw)) {
- SOURCE_PATH = $$OUT_PWD/$$TRACEGEN_DIR/$${PROVIDER_NAME}_tracepoints$${first(QMAKE_EXT_CPP)}
-
- isEmpty(BUILDS)|build_pass {
- impl_file_contents = \
- "$${LITERAL_HASH}define TRACEPOINT_CREATE_PROBES" \
- "$${LITERAL_HASH}define TRACEPOINT_DEFINE" \
- "$${LITERAL_HASH}include \"$${HEADER_PATH}\""
-
- write_file($$SOURCE_PATH, impl_file_contents)|error()
- }
-
- GENERATED_SOURCES += $$SOURCE_PATH
-
- tracegen.input = TRACEPOINT_PROVIDER
- tracegen.output = $$HEADER_PATH
- tracegen.variable_out = HEADERS
- tracegen.depends += $$QMAKE_TRACEGEN_EXE
- tracegen.CONFIG = target_predeps
-
- qtConfig(lttng) {
- tracegen.commands = $$QMAKE_TRACEGEN lttng ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
- QMAKE_USE_PRIVATE += lttng-ust
- } else {
- tracegen.commands = $$QMAKE_TRACEGEN etw ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
- }
-
- QMAKE_EXTRA_COMPILERS += tracegen
-
- DEFINES += Q_TRACEPOINT
-} else {
- isEmpty(BUILDS)|build_pass {
- header_file_contents = "$${LITERAL_HASH}include <private/qtrace_p.h>"
- write_file($$HEADER_PATH, header_file_contents)|error()
- }
-}
diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf
index a9fe0d76d6..73a8a61a9c 100644
--- a/mkspecs/features/resolve_target.prf
+++ b/mkspecs/features/resolve_target.prf
@@ -36,7 +36,11 @@ win32 {
plugin_target = $$QMAKE_PLUGIN_BUNDLE_NAME
else: \
plugin_target = $$TARGET
- QMAKE_RESOLVED_BUNDLE = $${QMAKE_RESOLVED_TARGET}$${plugin_target}.plugin
+ isEmpty(QMAKE_BUNDLE_EXTENSION): \
+ plugin_ext = .plugin
+ else: \
+ plugin_ext = $$QMAKE_BUNDLE_EXTENSION
+ QMAKE_RESOLVED_BUNDLE = $${QMAKE_RESOLVED_TARGET}$${plugin_target}$${plugin_ext}
!shallow_bundle: \
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/Contents/MacOS/$${TARGET}
else: \
@@ -46,11 +50,16 @@ win32 {
framework_target = $$QMAKE_FRAMEWORK_BUNDLE_NAME
else: \
framework_target = $$TARGET
- QMAKE_RESOLVED_BUNDLE = $${QMAKE_RESOLVED_TARGET}$${framework_target}.framework
+ isEmpty(QMAKE_BUNDLE_EXTENSION): \
+ framework_ext = .framework
+ else: \
+ framework_ext = $$QMAKE_BUNDLE_EXTENSION
+ QMAKE_RESOLVED_BUNDLE = $${QMAKE_RESOLVED_TARGET}$${framework_target}$${framework_ext}
!shallow_bundle {
- TEMP_VERSION = $$section(VERSION, ., 0, 0)
- isEmpty(TEMP_VERSION):TEMP_VERSION = A
- QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/Versions/$${TEMP_VERSION}/$${TARGET}
+ framework_version = $$QMAKE_FRAMEWORK_VERSION
+ isEmpty(framework_version):framework_version = $$section(VERSION, ., 0, 0)
+ isEmpty(framework_version):framework_version = A
+ QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/Versions/$${framework_version}/$${TARGET}
} else {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/$${TARGET}
}
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index fa8ff1fb58..ab9761a83c 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -1,116 +1,19 @@
-qtPrepareTool(QMAKE_RCC, rcc, _DEP)
+qtPrepareLibExecTool(QMAKE_RCC, rcc, _DEP)
-isEmpty(RCC_DIR):RCC_DIR = .
isEmpty(QMAKE_MOD_RCC):QMAKE_MOD_RCC = qrc
!contains(QMAKE_RESOURCE_FLAGS, -root):!isEmpty(QMAKE_RESOURCE_ROOT):QMAKE_RESOURCE_FLAGS += -root $$QMAKE_RESOURCE_ROOT
!contains(QMAKE_RESOURCE_FLAGS, -name): QMAKE_RESOURCE_FLAGS += -name ${QMAKE_FILE_BASE}
+!qtConfig(zstd): QMAKE_RESOURCE_FLAGS += --no-zstd
-# http://www.w3.org/TR/xml/#syntax
-defineReplace(xml_escape) {
- 1 ~= s,&,&amp;,
- 1 ~= s,\',&apos;,
- 1 ~= s,\",&quot;,
- 1 ~= s,<,&lt;,
- 1 ~= s,>,&gt;,
- return($$1)
-}
-
-RESOURCES += qmake_immediate
-for(resource, RESOURCES) {
- # Regular case of user qrc file
- contains(resource, ".*\\.qrc$"): \
- next()
-
- # Fallback for stand-alone files/directories
- !defined($${resource}.files, var) {
- !equals(resource, qmake_immediate) {
- !exists($$absolute_path($$resource, $$_PRO_FILE_PWD_)): \
- warning("Failure to find: $$resource")
- qmake_immediate.files += $$resource
- OTHER_FILES *= $$resource
- }
- RESOURCES -= $$resource
- next()
- }
-
- resource_file = $$absolute_path($$RCC_DIR/qmake_$${resource}.qrc, $$OUT_PWD)
-
- isEmpty(BUILDS)|build_pass {
- # Collection of files, generate qrc file
- prefix = $$eval($${resource}.prefix)
- isEmpty(prefix): \
- prefix = "/"
-
- resource_file_content = \
- "<!DOCTYPE RCC><RCC version=\"1.0\">" \
- "<qresource prefix=\"$$xml_escape($$prefix)\">"
-
- abs_base = $$absolute_path($$eval($${resource}.base), $$_PRO_FILE_PWD_)
-
- for(file, $${resource}.files) {
- abs_path = $$absolute_path($$file, $$_PRO_FILE_PWD_)
- files = $$files($$abs_path/*, true)
- isEmpty(files): \
- files = $$abs_path
- for (file, files) {
- exists($$file/*): next() # exclude directories
- alias = $$relative_path($$file, $$abs_base)
- resource_file_content += \
- "<file alias=\"$$xml_escape($$alias)\">$$xml_escape($$file)</file>"
- OTHER_FILES *= $$file
- }
- }
-
- resource_file_content += \
- "</qresource>" \
- "</RCC>"
-
- !write_file($$resource_file, resource_file_content): \
- error()
- }
-
- RESOURCES -= $$resource
- RESOURCES += $$resource_file
-}
-
-!isEmpty(RESOURCES):contains(TEMPLATE, .*lib):plugin:static {
- pluginBaseName = $$basename(TARGET)
- pluginName = $$lower($$replace(pluginBaseName, [-], _))
- resource_init_function = $${pluginName}_plugin_resource_init
- DEFINES += "QT_PLUGIN_RESOURCE_INIT_FUNCTION=$$resource_init_function"
- RESOURCE_INIT_CPP = $$OUT_PWD/$${pluginName}_plugin_resources.cpp
-
- GENERATED_SOURCES += $$RESOURCE_INIT_CPP
- QMAKE_DISTCLEAN += $$RESOURCE_INIT_CPP
-
- isEmpty(BUILDS)|build_pass {
- RESOURCE_INIT_CONT = \
- "// This file is autogenerated by qmake. It contains a function that" \
- "// references all resources the plugin includes and the function is" \
- "// referenced by Qt_(MOC_)EXPORT_PLUGIN to ensure the inclusion in" \
- "// the statically linked plugin." \
- "$${LITERAL_HASH}include <QtCore/qglobal.h>" \
- "void $${resource_init_function}() " \
- "{" \
-
- for (resource, RESOURCES) {
- resource_name = $$section($$list($$basename(resource)), ., 0, 0)
- resource_name = $$replace(resource_name, [^a-zA-Z0-9_], _)
- RESOURCE_INIT_CONT += " Q_INIT_RESOURCE($$resource_name);"
- }
-
- RESOURCE_INIT_CONT += \
- "}"
-
- write_file($$RESOURCE_INIT_CPP, RESOURCE_INIT_CONT)|error()
- }
-}
+load(resources_functions)
+qtFlattenResources()
+qtEnsurePluginResourcesCpp()
rcc.input = RESOURCES
rcc.name = RCC ${QMAKE_FILE_IN}
rcc.depend_command = $$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
-rcc.CONFIG += add_inputs_as_makefile_deps dep_lines
+rcc.CONFIG += add_inputs_as_makefile_deps dep_lines remove_no_exist
!resources_big|ltcg|macx-xcode|wasm|contains(TEMPLATE, "vc.*") {
diff --git a/mkspecs/features/resources_functions.prf b/mkspecs/features/resources_functions.prf
new file mode 100644
index 0000000000..b525f482ca
--- /dev/null
+++ b/mkspecs/features/resources_functions.prf
@@ -0,0 +1,139 @@
+# http://www.w3.org/TR/xml/#syntax
+defineReplace(xml_escape) {
+ 1 ~= s,&,&amp;,
+ 1 ~= s,\',&apos;,
+ 1 ~= s,\",&quot;,
+ 1 ~= s,<,&lt;,
+ 1 ~= s,>,&gt;,
+ return($$1)
+}
+
+defineTest(qtFlattenResources) {
+ isEmpty(RCC_DIR):RCC_DIR = .
+ immediate = qmake_immediate$$QMAKE_RESOURCES_IMMEDIATE_NR
+ defined(QMAKE_RESOURCES_IMMEDIATE_NR, var): \
+ QMAKE_RESOURCES_IMMEDIATE_NR = $$num_add($$QMAKE_RESOURCES_IMMEDIATE_NR, 1)
+ else: \
+ QMAKE_RESOURCES_IMMEDIATE_NR = 1
+
+ RESOURCES += $$immediate
+ for(resource, RESOURCES) {
+ # Regular case of user qrc file
+ contains(resource, ".*\\.qrc$"): \
+ next()
+
+ # Fallback for stand-alone files/directories
+ !defined($${resource}.files, var) {
+ !equals(resource, $$immediate) {
+ !exists($$absolute_path($$resource, $$_PRO_FILE_PWD_)): \
+ warning("Failure to find: $$resource")
+ $${immediate}.files += $$resource
+ OTHER_FILES *= $$resource
+ }
+ RESOURCES -= $$resource
+ next()
+ }
+
+ RESOURCES -= $$resource
+ isEmpty(BUILDS)|build_pass {
+ resource_file = $$absolute_path($$RCC_DIR/qmake_$${resource}.qrc, $$OUT_PWD)
+ RESOURCES += $$resource_file
+ } else: android {
+ # Android will need a resource file for each architecture make sure it is placed
+ # correctly for other functions that need the right paths for these files
+ for (arch, ANDROID_ABIS) {
+ resource_file = $$absolute_path($$RCC_DIR/$$arch/qmake_$${resource}.qrc, $$OUT_PWD)
+ RESOURCES += $$resource_file
+ }
+ }
+
+ isEmpty(BUILDS)|build_pass {
+ # Collection of files, generate qrc file
+ prefix = $$eval($${resource}.prefix)
+ isEmpty(prefix): \
+ prefix = "/"
+
+ resource_file_content = \
+ "<!DOCTYPE RCC><RCC version=\"1.0\">" \
+ "<qresource prefix=\"$$xml_escape($$prefix)\">"
+
+ abs_base = $$absolute_path($$eval($${resource}.base), $$_PRO_FILE_PWD_)
+
+ for(file, $${resource}.files) {
+ abs_path = $$absolute_path($$file, $$_PRO_FILE_PWD_)
+ files = $$files($$abs_path/*, true)
+ isEmpty(files): \
+ files = $$abs_path
+ for (file, files) {
+ exists($$file/*): next() # exclude directories
+ alias = $$relative_path($$file, $$abs_base)
+
+ # If a resource is added by the build system from outside of $$_PRO_FILE_PWD_
+ # everything except the filename needs to be discarded.
+ subdir = $$find(alias, ^../)
+ if (!isEmpty(subdir)): alias = $$basename(file)
+
+ resource_file_content += \
+ "<file alias=\"$$xml_escape($$alias)\">$$xml_escape($$file)</file>"
+ OTHER_FILES *= $$file
+ }
+ }
+
+ resource_file_content += \
+ "</qresource>" \
+ "</RCC>"
+
+ !write_file($$resource_file, resource_file_content): \
+ error()
+ }
+ }
+ export(RCC_DIR)
+ export(QMAKE_RESOURCES_IMMEDIATE_NR)
+ export(RESOURCES)
+ export(OTHER_FILES)
+ export($${immediate}.files)
+ return(true)
+}
+
+defineTest(qtEnsurePluginResourcesCpp) {
+ contains(DEFINES, QT_PLUGIN_RESOURCE_INIT_FUNCTION=.*): \
+ return(true)
+
+ !isEmpty(RESOURCES):contains(TEMPLATE, .*lib):plugin:static {
+ pluginBaseName = $$basename(TARGET)
+ pluginName = $$lower($$replace(pluginBaseName, [-], _))
+ resource_init_function = $${pluginName}_plugin_resource_init
+ DEFINES += "QT_PLUGIN_RESOURCE_INIT_FUNCTION=$$resource_init_function"
+ RESOURCE_INIT_CPP = $$OUT_PWD/$${pluginName}_plugin_resources.cpp
+
+ GENERATED_SOURCES += $$RESOURCE_INIT_CPP
+ QMAKE_DISTCLEAN += $$RESOURCE_INIT_CPP
+
+ isEmpty(BUILDS)|build_pass {
+ RESOURCE_INIT_CONT = \
+ "// This file is autogenerated by qmake. It contains a function that" \
+ "// references all resources the plugin includes and the function is" \
+ "// referenced by QT_(MOC_)EXPORT_PLUGIN to ensure the inclusion in" \
+ "// the statically linked plugin." \
+ "$${LITERAL_HASH}include <QtCore/qglobal.h>" \
+ "void $${resource_init_function}() " \
+ "{" \
+
+ for (resource, RESOURCES) {
+ resource_name = $$replace($$list($$basename(resource)),\.qrc$, )
+ resource_name = $$replace(resource_name, [^a-zA-Z0-9_], _)
+ RESOURCE_INIT_CONT += " Q_INIT_RESOURCE($$resource_name);"
+ }
+
+ RESOURCE_INIT_CONT += \
+ "}"
+
+ write_file($$RESOURCE_INIT_CPP, RESOURCE_INIT_CONT)|error()
+ }
+
+ export(DEFINES)
+ export(GENERATED_SOURCES)
+ export(QMAKE_DISTCLEAN)
+ }
+ return(true)
+}
diff --git a/mkspecs/features/win32/rtti.prf b/mkspecs/features/rtti.prf
index 6d720d2438..6d720d2438 100644
--- a/mkspecs/features/win32/rtti.prf
+++ b/mkspecs/features/rtti.prf
diff --git a/mkspecs/features/win32/rtti_off.prf b/mkspecs/features/rtti_off.prf
index b520bfa8b7..b520bfa8b7 100644
--- a/mkspecs/features/win32/rtti_off.prf
+++ b/mkspecs/features/rtti_off.prf
diff --git a/mkspecs/features/sanitizer.prf b/mkspecs/features/sanitizer.prf
index 9e7ff0218a..12ca1a17bd 100644
--- a/mkspecs/features/sanitizer.prf
+++ b/mkspecs/features/sanitizer.prf
@@ -1,10 +1,33 @@
# Sanitizer flags
-
sanitize_address {
QMAKE_CFLAGS += $$QMAKE_SANITIZE_ADDRESS_CFLAGS
QMAKE_CXXFLAGS += $$QMAKE_SANITIZE_ADDRESS_CXXFLAGS
QMAKE_LFLAGS += $$QMAKE_SANITIZE_ADDRESS_LFLAGS
+ android {
+ # ARM 32 (armeabi-v7a & arm5) are not supported because Qt must be rebuilt with -marm
+ equals(ANDROID_TARGET_ARCH, arm64-v8a): ANDROID_LIBCLANG_RT_FILE = "libclang_rt.asan-aarch64-android.so"
+ else: equals(ANDROID_TARGET_ARCH, x86): ANDROID_LIBCLANG_RT_FILE = "libclang_rt.asan-i686-android.so"
+ else: equals(ANDROID_TARGET_ARCH, x86_64): ANDROID_LIBCLANG_RT_FILE = "libclang_rt.asan-x86_64-android.so"
+ else: error("ASAN: Unsupported platform $${ANDROID_TARGET_ARCH}")
+
+ ANDROID_LIBCLANG_RT_PATH = $${NDK_LLVM_PATH}/lib64/clang
+ ANDROID_CLANG_RT_VERSIONS = $$files($$ANDROID_LIBCLANG_RT_PATH/*)
+ for (VERSION, ANDROID_CLANG_RT_VERSIONS) {
+ greaterThan(VERSION, $$ANDROID_LIBCLANG_RT_PATH): ANDROID_LIBCLANG_RT_PATH = $$VERSION
+ }
+ ANDROID_LIBCLANG_RT_PATH = "$${ANDROID_LIBCLANG_RT_PATH}/lib/linux/"
+ ANDROID_WRAP_SH_CONTENT = "$$LITERAL_HASH!/system/bin/sh"
+ ANDROID_WRAP_SH_CONTENT += "HERE=\"$(cd \"$(dirname \"$0\")\" && pwd)\""
+ isEmpty(ANDROID_ASAN_OPTIONS): ANDROID_ASAN_OPTIONS = "log_to_syslog=false,allow_user_segv_handler=1"
+ ANDROID_WRAP_SH_CONTENT += "export ASAN_OPTIONS=$${ANDROID_ASAN_OPTIONS}"
+ ANDROID_WRAP_SH_CONTENT += "export LD_PRELOAD=$HERE/$${ANDROID_LIBCLANG_RT_FILE}"
+ ANDROID_WRAP_SH_CONTENT += "exec \"$@\""
+ write_file($$OUT_PWD/android-build/resources/lib/$${ANDROID_TARGET_ARCH}/wrap.sh, ANDROID_WRAP_SH_CONTENT) | error()
+ libclang_rt.path = /libs/$$ANDROID_TARGET_ARCH/
+ libclang_rt.files = "$${ANDROID_LIBCLANG_RT_PATH}/$${ANDROID_LIBCLANG_RT_FILE}"
+ INSTALLS += libclang_rt
+ }
}
sanitize_memory {
@@ -19,6 +42,12 @@ sanitize_thread {
QMAKE_LFLAGS += $$QMAKE_SANITIZE_THREAD_LFLAGS
}
+sanitize_fuzzer_no_link {
+ QMAKE_CFLAGS += $$QMAKE_SANITIZE_FUZZERNL_CFLAGS
+ QMAKE_CXXFLAGS += $$QMAKE_SANITIZE_FUZZERNL_CXXFLAGS
+ QMAKE_LFLAGS += $$QMAKE_SANITIZE_FUZZERNL_LFLAGS
+}
+
sanitize_undefined {
QMAKE_CFLAGS += $$QMAKE_SANITIZE_UNDEFINED_CFLAGS
QMAKE_CXXFLAGS += $$QMAKE_SANITIZE_UNDEFINED_CXXFLAGS
diff --git a/mkspecs/features/simd.prf b/mkspecs/features/simd.prf
index a0b40fcf11..8e041297d2 100644
--- a/mkspecs/features/simd.prf
+++ b/mkspecs/features/simd.prf
@@ -124,6 +124,7 @@ addSimdCompiler(sse4_1)
addSimdCompiler(sse4_2)
addSimdCompiler(aesni)
addSimdCompiler(shani)
+addSimdCompiler(vaes)
addSimdCompiler(avx)
addSimdCompiler(avx2)
addSimdCompiler(avx512f)
@@ -133,10 +134,15 @@ addSimdCompiler(avx512pf)
addSimdCompiler(avx512dq)
addSimdCompiler(avx512bw)
addSimdCompiler(avx512vl)
+addSimdCompiler(avx512vnni)
addSimdCompiler(avx512ifma)
addSimdCompiler(avx512vbmi)
+addSimdCompiler(avx512vbmi2)
+addSimdCompiler(avx512bitalg)
+addSimdCompiler(avx512vpopcntd)
addSimdCompiler(f16c)
addSimdCompiler(rdrnd)
+addSimdCompiler(rdseed)
addSimdCompiler(neon)
addSimdCompiler(mips_dsp)
addSimdCompiler(mips_dspr2)
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf
index b8102c26b5..ca9bfb55f8 100644
--- a/mkspecs/features/testcase.prf
+++ b/mkspecs/features/testcase.prf
@@ -9,6 +9,9 @@ testcase_exceptions: CONFIG += exceptions
# Set in qt_build_config.prf
testcase_no_bundle: CONFIG -= app_bundle
+# cmdline may have been specified and not processed yet
+cmdline: CONFIG -= app_bundle
+
# Allow testcases to mark themselves as not supporting high-DPI
testcase_lowdpi {
macos {
@@ -16,9 +19,15 @@ testcase_lowdpi {
error("QMAKE_INFO_PLIST already set, can't apply testcase_lowdpi")
QMAKE_INFO_PLIST = $$QMAKESPEC/Info.plist.disable_highdpi
+ # Needs to be bundle so that Launch Services will pick
+ # up and apply the NSHighResolutionCapable=NO state.
+ CONFIG += app_bundle
+
} else {
# TODO: Add support for other platforms if possible
}
+
+ DEFINES += TESTCASE_LOWDPI
}
benchmark: type = benchmark
@@ -52,23 +61,43 @@ debug_and_release:debug_and_release_target {
}
# Allow for a custom test runner script
-$${type}.commands += $(TESTRUNNER)
-unix {
- isEmpty(TEST_TARGET_DIR): TEST_TARGET_DIR = .
-
- app_bundle: \
- $${type}.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
- else: \
- $${type}.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET)
+android: isEmpty($(TESTRUNNER)) {
+ build_pass|single_android_abi {
+ APK_PATH = $$shell_path($$OUT_PWD/android-build/$${TARGET}.apk)
+ qtPrepareTool(ANDROIDTESTRUNNER, androidtestrunner)
+ qtPrepareTool(ANDROIDDEPLOYQT, androiddeployqt)
+ isEmpty(ANDROID_DEPLOYMENT_SETTINGS_FILE): ANDROID_DEPLOYMENT_SETTINGS_FILE = $$OUT_PWD/android-$$TARGET-deployment-settings.json
+ contains(QMAKE_HOST.os, Windows): extension = .exe
+ $${type}.commands = $$ANDROIDTESTRUNNER --path \"$$OUT_PWD/android-build\"
+ $${type}.commands += --adb \"$$shell_path($${ANDROID_SDK_ROOT}$${QMAKE_DIR_SEP}platform-tools$${QMAKE_DIR_SEP}adb$${extension})\"
+ $${type}.commands += --make \"$(MAKE) apk\"
+ $${type}.commands += --apk $$APK_PATH
+ # Allow for custom arguments to tests
+ !catch: $${type}.commands += $(TESTARGS)
+ $${type}.commands += "--"
+ for(import, IMPORTPATH): $${type}.commands *= -import \"assets:/$$basename(_PRO_FILE_PWD_)/$$import\"
+ } else {
+ $${type}.commands = "echo \"Pass\""
+ }
} else {
- # Windows
- !isEmpty(TEST_TARGET_DIR): TEST_TARGET_DIR = $$shell_path($$TEST_TARGET_DIR)$${QMAKE_DIR_SEP}
- $${type}.commands += $${TEST_TARGET_DIR}$(TARGET)
-}
+ $${type}.commands += $(TESTRUNNER)
+
+ unix {
+ isEmpty(TEST_TARGET_DIR): TEST_TARGET_DIR = .
-# Allow for custom arguments to tests
-$${type}.commands += $(TESTARGS)
+ app_bundle: \
+ $${type}.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
+ else: !android: \
+ $${type}.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET)
+ } else {
+ # Windows
+ !isEmpty(TEST_TARGET_DIR): TEST_TARGET_DIR = $$shell_path($$TEST_TARGET_DIR)$${QMAKE_DIR_SEP}
+ $${type}.commands += $${TEST_TARGET_DIR}$(TARGET)
+ }
+ # Allow for custom arguments to tests
+ !catch: $${type}.commands += $(TESTARGS)
+}
!isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD, ^\\./?): \
$${type}.commands = $$QMAKE_CD $$shell_path($$TESTRUN_CWD) && $$eval($${type}.commands)
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
index 03612e5689..13bf7f12ac 100644
--- a/mkspecs/features/toolchain.prf
+++ b/mkspecs/features/toolchain.prf
@@ -153,10 +153,10 @@ msvc {
arch = amd64
else: !equals(arch, arm):!equals(arch, arm64): \ # may be "win32" or undefined
arch = x86
- # Consider only WinRT and ARM64 desktop builds to be cross-builds -
+ # Consider only ARM64 desktop builds to be cross-builds -
# the host is assumed to be Intel and capable of running the target
# executables (so building for x64 on x86 will break).
- winrt|equals(arch, arm64): \
+ equals(arch, arm64): \
CONFIG += msvc_cross
}
@@ -182,6 +182,15 @@ isEmpty($${target_prefix}.INCDIRS) {
# UIKit simulator platforms will see the device SDK's sysroot in
# QMAKE_DEFAULT_*DIRS, because they're handled in a single build pass.
darwin {
+ uikit:!isEmpty(QMAKE_APPLE_DEVICE_ARCHS) {
+ # Clang doesn't automatically pick up the architecture, just because
+ # we're passing the iOS sysroot below, and we will end up building the
+ # test for the host architecture, resulting in linker errors when
+ # linking against the iOS libraries. We work around this by passing
+ # the architecture explicitly.
+ cxx_flags += -arch $$first(QMAKE_APPLE_DEVICE_ARCHS)
+ }
+
uikit:macx-xcode: \
cxx_flags += -isysroot $$sdk_path_device.value
else: \
@@ -193,7 +202,7 @@ isEmpty($${target_prefix}.INCDIRS) {
cxx_flags += $$QMAKE_LFLAGS_SHLIB -o $$QMAKE_SYSTEM_NULL_DEVICE -v
else: darwin:clang: \
# Need to link to pick up library paths
- cxx_flags += $$QMAKE_LFLAGS_SHLIB -o /dev/null -v -Wl,-v
+ cxx_flags += -g0 $$QMAKE_LFLAGS_SHLIB -o /dev/null -v -Wl,-v
else: \
# Just preprocess, might not pick up library paths
cxx_flags += -E -v
@@ -279,9 +288,12 @@ isEmpty($${target_prefix}.INCDIRS) {
}
}
}
- isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \
+ isEmpty(QMAKE_DEFAULT_INCDIRS): \
!integrity: \
- error("failed to parse default search paths from compiler output")
+ error("failed to parse default include paths from compiler output")
+ isEmpty(QMAKE_DEFAULT_LIBDIRS): \
+ !integrity:!darwin: \
+ error("failed to parse default library paths from compiler output")
QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS)
} else: ghs {
cmd = $$QMAKE_CXX $$QMAKE_CXXFLAGS -$${LITERAL_HASH} -o /tmp/fake_output /tmp/fake_input.cpp
@@ -322,9 +334,17 @@ isEmpty($${target_prefix}.INCDIRS) {
error("Mkspec does not specify MSVC_VER. Cannot continue.")
versionAtLeast(MSVC_VER, 15.0) {
dir = $$(VSINSTALLDIR)
- isEmpty(dir): \
- dir = $$read_registry(HKLM, \
- "Software\\Microsoft\\VisualStudio\\SxS\\VS7\\$$MSVC_VER", 32)
+ isEmpty(dir) {
+ version_parts = $$split(MSVC_VER, .)
+ MSVC_NEXT_MAJOR = $$num_add($$first(version_parts), 1)
+ vswhere = "$$getenv(ProgramFiles\(x86\))/Microsoft Visual Studio/Installer/vswhere.exe"
+ !exists($$vswhere): \
+ error("Could not find $$vswhere")
+ vswhere = $$system_quote($$system_path($$vswhere))
+ # -version parameter: A version range for instances to find. 15.0 will get all versions >= 15.0
+ # Example: [15.0,16.0) will find versions 15.*.
+ dir = $$system("$$vswhere -latest -version [$$MSVC_VER,$${MSVC_NEXT_MAJOR}.0] -property installationPath")
+ }
isEmpty(dir): \
error("Failed to find the Visual Studio installation directory.")
cmd += $$system_quote($$dir\\VC\\Auxiliary\\Build\\vcvarsall.bat) $$arch
@@ -337,7 +357,6 @@ isEmpty($${target_prefix}.INCDIRS) {
error("Failed to find the Visual C installation directory.")
cmd += $$system_quote($$dir\\vcvarsall.bat) $$arch
}
- winrt: cmd += store
isEmpty(WINSDK_VER): \
error("Mkspec does not specify WINSDK_VER. Cannot continue.")
@@ -395,7 +414,7 @@ isEmpty($${target_prefix}.INCDIRS) {
QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP)
}
- unix:if(!cross_compile|host_build) {
+ unix:!darwin:if(!cross_compile|host_build) {
isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include
isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib
}
diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf
index 1cedce5ae7..fe9ad4b6c9 100644
--- a/mkspecs/features/uic.prf
+++ b/mkspecs/features/uic.prf
@@ -1,4 +1,4 @@
-qtPrepareTool(QMAKE_UIC, uic, _DEP)
+qtPrepareLibExecTool(QMAKE_UIC, uic, _DEP)
isEmpty(UI_DIR):UI_DIR = .
isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_
@@ -9,7 +9,7 @@ uic.depend_command = $$QMAKE_UIC_DEP -d ${QMAKE_FILE_IN}
uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
uic.input = FORMS
uic.variable_out = GENERATED_FILES
-uic.CONFIG += no_link target_predeps dep_lines
+uic.CONFIG += no_link target_predeps dep_lines dep_existing_only
uic.name = UIC ${QMAKE_FILE_IN}
silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands
QMAKE_EXTRA_COMPILERS += uic
diff --git a/mkspecs/features/uikit/default_post.prf b/mkspecs/features/uikit/default_post.prf
index c1b6f38a6c..a731cd0cbe 100644
--- a/mkspecs/features/uikit/default_post.prf
+++ b/mkspecs/features/uikit/default_post.prf
@@ -28,29 +28,30 @@ macx-xcode {
device_family.value = $$QMAKE_APPLE_TARGETED_DEVICE_FAMILY
QMAKE_MAC_XCODE_SETTINGS += device_family
- ios {
- # Set up default 4-inch iPhone/iPod launch image so that our apps
- # support the full screen resolution of those devices.
- qmake_launch_image = Default-568h@2x.png
- qmake_copy_image.input = $$QMAKESPEC/$$qmake_launch_image
- qmake_copy_image.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$qmake_launch_image
- qmake_copy_image.CONFIG = verbatim
- QMAKE_SUBSTITUTES += qmake_copy_image
- qmake_launch_images.files = $$qmake_copy_image.output
- QMAKE_BUNDLE_DATA += qmake_launch_images
-
- !versionAtLeast(QMAKE_XCODE_VERSION, 6.0) {
- warning("You need to update Xcode to version 6 or newer to fully support iPhone6/6+")
- } else {
- # Set up default LaunchScreen to support iPhone6/6+
- qmake_launch_screen = LaunchScreen.xib
+ equals(TEMPLATE, app):ios {
+ isEmpty(QMAKE_IOS_LAUNCH_SCREEN) {
+ qmake_launch_screen = LaunchScreen.storyboard
qmake_copy_launch_screen.input = $$QMAKESPEC/$$qmake_launch_screen
qmake_copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$qmake_launch_screen
QMAKE_SUBSTITUTES += qmake_copy_launch_screen
qmake_launch_screens.files = $$qmake_copy_launch_screen.output
- QMAKE_BUNDLE_DATA += qmake_launch_screens
+ } else {
+ qmake_launch_screens.files = $$QMAKE_IOS_LAUNCH_SCREEN
}
+ QMAKE_BUNDLE_DATA += qmake_launch_screens
}
+
+ !qtConfig(simulator_and_device) {
+ # Single SDK builds only support the target we built
+ supported_platforms.name = SUPPORTED_PLATFORMS
+ supported_platforms.value = $$QMAKE_MAC_SDK
+ QMAKE_MAC_XCODE_SETTINGS += supported_platforms
+ }
+
+ # In a simulator specific build the device config will set the SDK
+ # to the simulator SDK, but for Xcode we always want the SDKROOT
+ # to be the device SDK.
+ QMAKE_MAC_SDK = $$device.sdk
}
!xcodebuild:equals(TEMPLATE, app):!isEmpty(QMAKE_INFO_PLIST) {
diff --git a/mkspecs/features/uikit/default_pre.prf b/mkspecs/features/uikit/default_pre.prf
index ea6882fbc8..4a7c0820d0 100644
--- a/mkspecs/features/uikit/default_pre.prf
+++ b/mkspecs/features/uikit/default_pre.prf
@@ -7,14 +7,7 @@ $$sim_and_dev|contains(QMAKE_MAC_SDK, ^$${device.sdk}.*): \
$$sim_and_dev|contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \
CONFIG += simulator $${simulator.sdk}
-$$sim_and_dev {
- # For a simulator_and_device build all the config tests
- # are based on the device's ARM SDK, but we know that the simulator
- # is Intel and that we support SSE/SSE2.
- QT_CPU_FEATURES.$$QT_ARCH += sse sse2
- CONFIG += sse sse2
- DEFINES += QT_COMPILER_SUPPORTS_SSE2
-}
+CONFIG += entrypoint
unset(sim_and_dev)
diff --git a/mkspecs/features/uikit/device_destinations.sh b/mkspecs/features/uikit/device_destinations.sh
index 649dd399a7..dbbdc1d005 100755
--- a/mkspecs/features/uikit/device_destinations.sh
+++ b/mkspecs/features/uikit/device_destinations.sh
@@ -1,43 +1,6 @@
#!/bin/bash
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is the build configuration utility of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2016 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
scheme=$1
diff --git a/mkspecs/features/uikit/devices.py b/mkspecs/features/uikit/devices.py
index 0443e838f2..18855be58e 100755
--- a/mkspecs/features/uikit/devices.py
+++ b/mkspecs/features/uikit/devices.py
@@ -1,43 +1,6 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is the build configuration utility of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+#!/usr/bin/env python3
+# Copyright (C) 2017 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
from __future__ import print_function
@@ -46,11 +9,17 @@ import json
import subprocess
from distutils.version import StrictVersion
+def is_available(object):
+ if "isAvailable" in object:
+ return object["isAvailable"] # introduced in Xcode 11
+ else:
+ return "unavailable" not in object["availability"]
+
def is_suitable_runtime(runtimes, runtime_name, platform, min_version):
for runtime in runtimes:
identifier = runtime["identifier"]
if (runtime["name"] == runtime_name or identifier == runtime_name) \
- and "unavailable" not in runtime["availability"] \
+ and is_available(runtime) \
and identifier.startswith("com.apple.CoreSimulator.SimRuntime.{}".format(platform)) \
and StrictVersion(runtime["version"]) >= min_version:
return True
@@ -77,6 +46,6 @@ if __name__ == "__main__":
for runtime_name in device_dict:
if is_suitable_runtime(runtimes, runtime_name, args.platform, args.minimum_deployment_target):
for device in device_dict[runtime_name]:
- if "unavailable" not in device["availability"] \
+ if is_available(device) \
and (args.state is None or device["state"].lower() in args.state):
print(device["udid"])
diff --git a/mkspecs/features/uikit/gc_binaries.prf b/mkspecs/features/uikit/gc_binaries.prf
index c4f7445951..aa27e69054 100644
--- a/mkspecs/features/uikit/gc_binaries.prf
+++ b/mkspecs/features/uikit/gc_binaries.prf
@@ -1,2 +1,6 @@
# bitcode (release mode) is incompatible with splitting sections.
-!bitcode|!release: load(gc_binaries)
+# We have to explicitly exclude Xcode, as that supports both debug
+# and release builds in the same project. Xcode already has a settting
+# for dead code stripping which is enabled by default, so we'll still
+# strip any libraries build with split sections.
+!bitcode|if(!macx-xcode:!release): load(gc_binaries)
diff --git a/mkspecs/features/uikit/qt.prf b/mkspecs/features/uikit/qt.prf
deleted file mode 100644
index 4475c137dc..0000000000
--- a/mkspecs/features/uikit/qt.prf
+++ /dev/null
@@ -1,33 +0,0 @@
-
-qt_depends = $$resolve_depends(QT, "QT.")
-!watchos:equals(TEMPLATE, app):contains(qt_depends, gui(-private)?) {
- LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/platforms
-
- lib_name = qios
- lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/lib$${lib_name}$$qtPlatformTargetSuffix()
- LIBS += -l$${lib_name}$$qtPlatformTargetSuffix() $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS)
-
- !bitcode {
- # By marking qt_registerPlatformPlugin as undefined, we ensure that
- # the plugin.o translation unit is considered for inclusion in
- # the final binary, which in turn ensures that the plugin's
- # static initializer is included and run.
- QMAKE_LFLAGS += -u _qt_registerPlatformPlugin
-
- # We do link and dependency resolution for the platform plugin
- # manually, since we know we always need the plugin, so we don't
- # need to generate an import for it.
- QTPLUGIN.platforms = -
- }
-
- !no_main_wrapper {
- # The LC_MAIN load command available in iOS 6.0 and above allows dyld to
- # directly call the entrypoint instead of going through _start in crt.o.
- # Passing -e to the linker changes the entrypoint from _main to our custom
- # wrapper that calls UIApplicationMain and dispatches back to main() once
- # the application has started up and is ready to initialize QApplication.
- QMAKE_LFLAGS += -Wl,-e,_qt_main_wrapper
- }
-}
-
-load(qt)
diff --git a/mkspecs/features/uikit/qt_parts.prf b/mkspecs/features/uikit/qt_parts.prf
deleted file mode 100644
index 81814a62b0..0000000000
--- a/mkspecs/features/uikit/qt_parts.prf
+++ /dev/null
@@ -1,5 +0,0 @@
-
-# Disable tests for anything but qtbase for now
-!equals(TARGET, qtbase): QT_BUILD_PARTS -= tests
-
-load(qt_parts)
diff --git a/mkspecs/features/uikit/xcodebuild.mk b/mkspecs/features/uikit/xcodebuild.mk
index 0c8d99f4b8..4416240cf2 100644
--- a/mkspecs/features/uikit/xcodebuild.mk
+++ b/mkspecs/features/uikit/xcodebuild.mk
@@ -27,8 +27,8 @@ distclean: clean_all
$(EXPORT_SUBTARGETS): % : %-build
# Generic targets
-%_first: $(firstword $(call targets, %)) ;
-%_all: $(call targets, %) ;
+%_first: $(EXPORT_PRE_TARGETDEPS) $(firstword $(call targets, %)) ;
+%_all: $(EXPORT_PRE_TARGETDEPS) $(call targets, %) ;
# Actions
%-build: ACTION = build
@@ -58,7 +58,7 @@ debug-%: CONFIGURATION = Debug
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
-# Test and build (device) destinations
+# Test device destinations
ifneq ($(filter check%,$(MAKECMDGOALS)),)
ifeq ($(DEVICES),)
$(info Enumerating test destinations (you may override this by setting DEVICES explicitly), please wait...)
@@ -72,10 +72,10 @@ endif
%-device: DEVICES = $(HARDWARE_DEVICES)
GENERIC_DEVICE_DESTINATION := $(EXPORT_GENERIC_DEVICE_DESTINATION)
-GENERIC_SIMULATOR_DESTINATION := "id=$(shell $(MAKEFILE_DIR)devices.py $(EXPORT_DEVICE_FILTER) | tail -n 1)"
+GENERIC_SIMULATOR_DESTINATION := $(EXPORT_GENERIC_SIMULATOR_DESTINATION)
-%-simulator: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_SIMULATOR_DESTINATION))
-%-device: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_DEVICE_DESTINATION))
+%-simulator: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)","$(GENERIC_SIMULATOR_DESTINATION)")
+%-device: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)","$(GENERIC_DEVICE_DESTINATION)")
XCODE_VERSION_MAJOR := $(shell xcodebuild -version | grep Xcode | sed -e 's/Xcode //' | sed -e 's/\..*//')
@@ -83,6 +83,10 @@ ifeq ($(shell test $(XCODE_VERSION_MAJOR) -gt 7; echo $$?),0)
XCODEBUILD_FLAGS += $(shell echo "$(MAKEFLAGS)" | sed -e 's/\([^ ]*\).*/\1/' | grep -qv 's' || echo -quiet)
endif
+ifeq ($(shell test $(XCODE_VERSION_MAJOR) -ge 9; echo $$?),0)
+ XCODEBUILD_FLAGS += -allowProvisioningUpdates
+endif
+
# Xcodebuild
DESTINATION_MESSAGE = "Running $(call tolower,$(CONFIGURATION)) $(ACTION) \
diff --git a/mkspecs/features/uikit/xcodebuild.prf b/mkspecs/features/uikit/xcodebuild.prf
index 7a6b2acfc2..ddf606cda4 100644
--- a/mkspecs/features/uikit/xcodebuild.prf
+++ b/mkspecs/features/uikit/xcodebuild.prf
@@ -29,6 +29,8 @@ cmd = "$$QMAKE_QMAKE $$system_quote($$_PRO_FILE_) -spec macx-xcode $$args"
debug(1, "Generating Xcode project in $$OUT_PWD using '$$cmd'")
system("$$QMAKE_CD $$system_quote($$OUT_PWD) && $$cmd")
+QMAKE_EXTRA_VARIABLES += PRE_TARGETDEPS
+
# Subtargets
for(build, BUILDS): \
@@ -51,7 +53,13 @@ watchos {
DEVICE_FILTER = --platform watchOS --minimum-deployment-target $$QMAKE_WATCHOS_DEPLOYMENT_TARGET
GENERIC_DEVICE_DESTINATION = "generic/platform=watchOS"
}
-QMAKE_EXTRA_VARIABLES += DEVICE_SDK SIMULATOR_SDK DEVICE_FILTER GENERIC_DEVICE_DESTINATION
+GENERIC_SIMULATOR_DESTINATION = "$$GENERIC_DEVICE_DESTINATION Simulator"
+
+QMAKE_EXTRA_VARIABLES += \
+ DEVICE_SDK SIMULATOR_SDK \
+ DEVICE_FILTER \
+ GENERIC_DEVICE_DESTINATION \
+ GENERIC_SIMULATOR_DESTINATION
QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/xcodebuild.mk)
diff --git a/mkspecs/features/unix/no_direct_extern_access.prf b/mkspecs/features/unix/no_direct_extern_access.prf
new file mode 100644
index 0000000000..2b7b3c8539
--- /dev/null
+++ b/mkspecs/features/unix/no_direct_extern_access.prf
@@ -0,0 +1,7 @@
+clang {
+ QMAKE_CFLAGS += -fno-direct-access-external-data
+ QMAKE_CXXFLAGS += -fno-direct-access-external-data
+} else {
+ QMAKE_CFLAGS += -mno-direct-extern-access
+ QMAKE_CXXFLAGS += -mno-direct-extern-access
+}
diff --git a/mkspecs/features/unsupported/testserver.prf b/mkspecs/features/unsupported/testserver.prf
new file mode 100644
index 0000000000..bca88ea2d8
--- /dev/null
+++ b/mkspecs/features/unsupported/testserver.prf
@@ -0,0 +1,231 @@
+# Integrating docker-based test servers into Qt Test framework
+#
+# This file adds support for docker-based test servers built by testcase
+# projects that need them. To enable this feature, any automated test can
+# include testserver.pri in its project file. This instructs qmake to insert
+# additional targets into the generated Makefile. The 'check' target then brings
+# up test servers before running the testcase, and shuts them down afterwards.
+#
+# TESTSERVER_COMPOSE_FILE
+# - Contains the path of docker-compose file
+# This configuration file defines the services used for autotests. It tells the
+# docker engine how to build up the docker images and containers. In qtbase, a
+# shared docker-compose file is located in the tests folder.
+# Example: TESTSERVER_COMPOSE_FILE = \
+# $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml
+#
+# The user must run the provisioning scripts in advance before attempting to
+# build the test servers. The docker_testserver.sh script is used to build up
+# the docker images into the docker-cache. It handles the immutable parts of the
+# server installation that rarely need adjustment, such as downloading packages.
+# Example: qt5/coin/provisioning/.../testserver/docker_testserver.sh
+#
+# QT_TEST_SERVER_LIST
+# - A list of test servers to bring up for this testcase
+# These test servers should be defined in $$TESTSERVER_COMPOSE_FILE. Each
+# testcase can define the test servers it depends on.
+# Example: QT_TEST_SERVER_LIST = apache2 squid vsftpd ftp-proxy danted
+#
+# Pre-processor defines needed for the application:
+# QT_TEST_SERVER
+# - A preprocessor macro used for testcase to change testing parameters at
+# compile time
+# This macro is predefined for docker-based test servers and is passed as a
+# compiler option (-DQT_TEST_SERVER). The testcase can then check whether
+# docker-based servers are in use and change the testing parameters, such as
+# host name or port number, at compile time. An example can be found in
+# network-settings.h.
+#
+# Example:
+# #if defined(QT_TEST_SERVER)
+# Change the testing parameters at compile time
+# #endif
+#
+# QT_TEST_SERVER_DOMAIN
+# - A preprocessor macro that holds the server domain name
+# Provided for the helper functions in network-settings.h. Use function
+# serverDomainName() in your application instead.
+#
+# Additional make targets:
+# 1. check_network - A renamed target from the check target of testcase feature.
+# 2. testserver_clean - Clean up server containers/images and tidy away related
+# files.
+
+# The docker test server should only be integrated in the leaf Makefile.
+# If debug_and_release option is in use, skip the meta-Makefile except for
+# Makefile.Debug and Makefile.Release.
+debug_and_release:!build_pass: return()
+
+DOCKER_ENABLED = 1
+
+equals(QMAKE_HOST.os, Darwin) {
+ DOCKER_ENABLED = 0
+ message("Not using docker network test server on macOS, see QTQAINFRA-2717 and QTQAINFRA-2750")
+}
+
+TESTSERVER_VERSION = ""
+
+equals(DOCKER_ENABLED, 1) {
+ TESTSERVER_VERSION = $$system(docker-compose --version)
+}
+
+isEmpty(TESTSERVER_VERSION) {
+ # Make check with server "qt-test-server.qt-test-net" as a fallback
+} else {
+ # Make check with docker test servers
+ equals(QMAKE_HOST.os, Linux) {
+ # For the platform supporting docker bridge network, each container is
+ # assigned a unique hostname and connected to the same network domain
+ # to communicate with the others.
+ DEFINES += QT_TEST_SERVER_NAME
+ DNSDOMAIN = test-net.qt.local
+ } else {
+ # For the others, the containers are deployed into a virtual machine
+ # using the host network. All the containers share the same hostname of
+ # the virtual machine, and they are connected to the same network domain.
+ # NOTE: In Windows, Apple Bonjour only works within a single local domain.
+ DNSDOMAIN = local
+ }
+
+ equals(QMAKE_HOST.os, Darwin) {
+ # There is no docker bridge on macOS. It is impossible to ping a container.
+ # Docker docs recommends using port mapping to connect to a container;
+ # but it causes a port conflict if the user is running a service that
+ # binds the same port on the host. An alternative solution is to deploy
+ # the docker environment into VirtualBox using docker-machine.
+ isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
+ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-host-network.yml
+
+ # The connection configuration for the target machine
+ MACHINE_CONFIG = $(shell docker-machine config qt-test-server)
+
+ # The environment variables passed to the docker-compose file
+ TEST_ENV = 'MACHINE_IP=$(shell docker-machine ip qt-test-server)'
+ TEST_ENV += 'HOST_NAME=qt-test-server'
+ TEST_ENV += 'TEST_DOMAIN=$$DNSDOMAIN'
+ TEST_ENV += 'SHARED_DATA=$$PWD/../data/testserver'
+ TEST_ENV += 'SHARED_SERVICE=host-network'
+ TEST_CMD = env
+ } else:equals(QMAKE_HOST.os, Windows) {
+ # There is no docker bridge on Windows. It is impossible to ping a container.
+ # Use docker-machine to deploy the docker environment into VirtualBox.
+ isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
+ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-host-network.yml
+
+ # The connection configuration for the target machine
+ MACHINE_CONFIG = (docker-machine config qt-test-server)
+
+ # The environment variables passed to the docker-compose file
+ TEST_ENV = '\$\$env:MACHINE_IP = docker-machine ip qt-test-server;'
+ TEST_ENV += '\$\$env:HOST_NAME = $$shell_quote(\"qt-test-server\");'
+ TEST_ENV += '\$\$env:TEST_DOMAIN = $$shell_quote(\"$$DNSDOMAIN\");'
+ TEST_ENV += '\$\$env:SHARED_DATA = $$shell_quote(\"$$PWD/../data/testserver\");'
+ TEST_ENV += '\$\$env:SHARED_SERVICE = $$shell_quote(\"host-network\");'
+
+ # Docker-compose CLI environment variables:
+ # Enable path conversion from Windows-style to Unix-style in volume definitions.
+ TEST_ENV += '\$\$env:COMPOSE_CONVERT_WINDOWS_PATHS = $$shell_quote(\"true\");'
+
+ TEST_CMD = 'PowerShell -noprofile'
+ CONFIG += PowerShell
+ } else {
+ isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
+ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-bridge-network.yml
+ # The environment variables passed to the docker-compose file
+ TEST_ENV = 'TEST_DOMAIN=$$DNSDOMAIN'
+ TEST_ENV += 'SHARED_DATA=$$PWD/../data/testserver'
+ TEST_ENV += 'SHARED_SERVICE=bridge-network'
+ TEST_CMD = env
+ }
+
+ # If $$TESTSERVER_COMPOSE_FILE defined by platform doesn't exist, the default
+ # docker-compose.yml is used as a fallback.
+ !exists($$TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
+ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml
+ !exists($$TESTSERVER_COMPOSE_FILE): error("Invalid TESTSERVER_COMPOSE_FILE specified")
+
+
+ # The domain name is relevant to https keycert (qnetworkreply/crts/qt-test-net-cacert.pem).
+ DEFINES += QT_TEST_SERVER QT_TEST_SERVER_DOMAIN=$$shell_quote(\"$${DNSDOMAIN}\")
+
+ # Ensure that the docker-compose file is provided. It is a configuration
+ # file which is mandatory for all docker-compose commands. You can get more
+ # detail from the description of TESTSERVER_COMPOSE_FILE above. There is
+ # also an example showing how to configure it manually.
+ FILE_PRETEST_MSG = "Project variable 'TESTSERVER_COMPOSE_FILE' is not set"
+ PowerShell {
+ testserver_pretest.commands = echo $$TESTSERVER_VERSION &&
+ testserver_pretest.commands += \
+ $$TEST_CMD if ([String]::IsNullOrEmpty($$shell_quote(\"$$TESTSERVER_COMPOSE_FILE\"))) \
+ {Write-Error $$shell_quote(\"$$FILE_PRETEST_MSG\")} &&
+ } else {
+ testserver_pretest.commands = $(info "testserver:" $$TESTSERVER_VERSION)
+ testserver_pretest.commands += $(if $$TESTSERVER_COMPOSE_FILE,,$(error $$FILE_PRETEST_MSG))
+ }
+
+ # Make sure docker-machine is both created and running. The docker_machine
+ # script is used to deploy the docker environment into VirtualBox.
+ # Example: qt5/coin/provisioning/common/shared/testserver/docker_machine.sh
+ !isEmpty(MACHINE_CONFIG) {
+ MACHINE_LIST_CMD = docker-machine ls -q --filter "Name=^qt-test-server\$\$"
+ MACHINE_LIST_MSG = "Docker machine qt-test-server not found"
+ PowerShell {
+ testserver_pretest.commands += $$TEST_CMD if (!($$MACHINE_LIST_CMD)) \
+ {Write-Error $$shell_quote(\"$$MACHINE_LIST_MSG\")} &&
+ } else {
+ testserver_pretest.commands += \
+ $(if $(shell $$MACHINE_LIST_CMD),,$(error $$MACHINE_LIST_MSG))
+ }
+
+ MACHINE_STATE_CMD = \
+ docker-machine ls -q --filter "State=Running" --filter "Name=^qt-test-server\$\$"
+ MACHINE_START_CMD = docker-machine start qt-test-server
+ MACHINE_RECERT = docker-machine regenerate-certs -f qt-test-server
+ PowerShell {
+ testserver_pretest.commands += \
+ $$TEST_CMD if (!($$MACHINE_STATE_CMD)) {$$MACHINE_START_CMD; $$MACHINE_RECERT} &&
+ } else {
+ testserver_pretest.commands += \
+ $(if $(shell $$MACHINE_STATE_CMD),,\
+ $(shell $$MACHINE_START_CMD > /dev/null && $$MACHINE_RECERT > /dev/null))
+ }
+ }
+
+ # Before starting the test servers, it requires the user to run the setup
+ # script (coin/provisioning/.../testserver/docker_testserver.sh) in advance.
+ IMAGE_PRETEST_CMD = docker $$MACHINE_CONFIG images -aq "qt-test-server-*"
+ IMAGE_PRETEST_MSG = "Docker image qt-test-server-* not found"
+ PowerShell {
+ testserver_pretest.commands += $$TEST_CMD if (!($$IMAGE_PRETEST_CMD)) \
+ {Write-Error $$shell_quote(\"$$IMAGE_PRETEST_MSG\")}
+ } else {
+ testserver_pretest.commands += \
+ $(if $(shell $$IMAGE_PRETEST_CMD),,$(error $$IMAGE_PRETEST_MSG))
+ }
+
+ # Rename the check target of testcase feature
+ check.target = check_network
+ testserver_test.target = check
+
+ # Pretesting test servers environment
+ testserver_test.depends = testserver_pretest
+
+ # Bring up test servers and make sure the services are ready.
+ !isEmpty(TEST_CMD): testserver_test.commands = $$TEST_CMD $$TEST_ENV
+ testserver_test.commands += docker-compose $$MACHINE_CONFIG -f $$TESTSERVER_COMPOSE_FILE up \
+ --build -d --force-recreate --timeout 1 $${QT_TEST_SERVER_LIST} &&
+
+ # Check test cases with docker-based test servers.
+ testserver_test.commands += $(MAKE) -f $(MAKEFILE) check_network &&
+
+ # Stop and remove test servers after testing.
+ !isEmpty(TEST_CMD): testserver_test.commands += $$TEST_CMD $$TEST_ENV
+ testserver_test.commands += docker-compose $$MACHINE_CONFIG -f $$TESTSERVER_COMPOSE_FILE down \
+ --timeout 1
+
+ # Destroy test servers and tidy away related files.
+ testserver_clean.commands = docker-compose $$MACHINE_CONFIG -f $$TESTSERVER_COMPOSE_FILE down \
+ --rmi all
+
+ QMAKE_EXTRA_TARGETS += testserver_pretest testserver_test testserver_clean
+}
diff --git a/mkspecs/features/wasm/default_pre.prf b/mkspecs/features/wasm/default_pre.prf
new file mode 100644
index 0000000000..d092149b32
--- /dev/null
+++ b/mkspecs/features/wasm/default_pre.prf
@@ -0,0 +1,2 @@
+load(emcc_ver)
+load(default_pre)
diff --git a/mkspecs/features/wasm/emcc_ver.prf b/mkspecs/features/wasm/emcc_ver.prf
new file mode 100644
index 0000000000..11a2408a9b
--- /dev/null
+++ b/mkspecs/features/wasm/emcc_ver.prf
@@ -0,0 +1,25 @@
+defineReplace(qtEmccRecommendedVersion) {
+ return (3.1.50)
+}
+
+defineReplace(qtSystemEmccVersion) {
+ EMCC = $$system("emcc -v 2>&1", lines)
+ EMCC_LINE = $$find(EMCC, "^.*\b(emcc)\b.*$")
+ E_VERSION = $$section(EMCC_LINE, " ", 9,9)
+ return ($${E_VERSION})
+}
+
+defineTest(qtConfTest_emccVersion) {
+
+ REQ_VERSION = $$qtEmccRecommendedVersion()
+ EMCC_VERSION = $$qtSystemEmccVersion()
+
+ !defined(QT_EMCC_VERSION, var):!equals(EMCC_VERSION, $${REQ_VERSION}) {
+ warning ("You should use the recommended Emscripten version $$REQ_VERSION with this Qt. You have $${EMCC_VERSION} ")
+ }
+ contains(TEMPLATE, .*app) {
+ !equals(QT_EMCC_VERSION, $$EMCC_VERSION) {
+ warning("This Qt was built with Emscripten version $${QT_EMCC_VERSION}. You have $${EMCC_VERSION}. The difference may cause issues.")
+ }
+ }
+}
diff --git a/mkspecs/features/wasm/wasm.prf b/mkspecs/features/wasm/wasm.prf
index 13ac43443d..c1a1a3a73e 100644
--- a/mkspecs/features/wasm/wasm.prf
+++ b/mkspecs/features/wasm/wasm.prf
@@ -1,7 +1,84 @@
+QT_FOR_CONFIG += core-private
+
# DESTDIR will be empty if not set in the app .pro file; make sure it has a value
isEmpty(DESTDIR): DESTDIR = $$OUT_PWD
+exists($$QMAKE_QT_CONFIG) {
+## this may be subject to change
+
+ ## qmake puts a space if done otherwise
+ !isEmpty(QT_WASM_EXTRA_EXPORTED_METHODS): {
+ EXPORTED_METHODS = UTF16ToString,stringToUTF16,JSEvents,specialHTMLTargets,FS,callMain,$$QT_WASM_EXTRA_EXPORTED_METHODS
+ } else {
+ EXPORTED_METHODS = UTF16ToString,stringToUTF16,JSEvents,specialHTMLTargets,FS,callMain
+ }
+ EMCC_LFLAGS += -s EXPORTED_RUNTIME_METHODS=$$EXPORTED_METHODS
+
+ !isEmpty(QT_WASM_EXPORT_NAME): {
+ EXPORT_NAME = $$QT_WASM_EXPORT_NAME
+ } else {
+ TARGET_SANITIZED = $$replace(TARGET, [^a-zA-Z0-9_], _)
+ EXPORT_NAME = $${TARGET_SANITIZED}_entry
+ }
+
+ EMCC_LFLAGS += -s EXPORT_NAME=$$EXPORT_NAME
+
+ qtConfig(thread) {
+
+ EMCC_LFLAGS += -pthread
+ EMCC_CFLAGS += -pthread
+
+ # Create worker threads at startup. This is supposed to be an optimization,
+ # however exceeding the pool size has been obesverved to hang the application.
+ POOL_SIZE = 4
+ !isEmpty(QT_WASM_PTHREAD_POOL_SIZE) {
+ POOL_SIZE = $$QT_WASM_PTHREAD_POOL_SIZE
+ }
+
+ message("Setting PTHREAD_POOL_SIZE to" $$POOL_SIZE)
+ EMCC_LFLAGS += -s PTHREAD_POOL_SIZE=$$POOL_SIZE
+ }
+
+ # Set memory options
+ EMCC_LFLAGS += -sALLOW_MEMORY_GROWTH
+ isEmpty(QT_WASM_INITIAL_MEMORY) {
+ INITIAL_MEMORY = 50MB # emscripten default is 16MB, we need slightly more
+ } else {
+ INITIAL_MEMORY = $$QT_WASM_INITIAL_MEMORY
+ }
+ EMCC_LFLAGS += -s INITIAL_MEMORY=$$INITIAL_MEMORY
+ isEmpty(QT_WASM_MAXIMUM_MEMORY) {
+ MAXIMUM_MEMORY = 4GB # 32-bit max
+ } else {
+ MAXIMUM_MEMORY = $$QT_WASM_MAXIMUM_MEMORY
+ }
+ EMCC_LFLAGS += -s MAXIMUM_MEMORY=$$MAXIMUM_MEMORY
+
+ qtConfig(sse2) {
+ QMAKE_CFLAGS += -O2 -msimd128 -msse -msse2
+ QMAKE_CXXFLAGS += -O2 -msimd128 -msse -msse2
+ QMAKE_LFLAGS += -msimd128 -msse -msse2
+ QMAKE_LFLAGS_DEBUG += -msimd128 -msse -msse2
+ }
+
+ qtConfig(shared) {
+ contains(TEMPLATE, .*app) {
+ EMCC_MODULE_FLAGS = -s MAIN_MODULE=1
+ }
+ contains(TEMPLATE, .*lib):!static: {
+ EMCC_MODULE_FLAGS = -s SIDE_MODULE=1
+ }
+ EMCC_CFLAGS += $$EMCC_MODULE_FLAGS
+ EMCC_LFLAGS += $$EMCC_MODULE_FLAGS
+ }
+
+ QMAKE_LFLAGS += $$EMCC_LFLAGS
+ QMAKE_LFLAGS_DEBUG += $$EMCC_LFLAGS
+ QMAKE_CFLAGS += $$EMCC_CFLAGS
+ QMAKE_CXXFLAGS += $$EMCC_CFLAGS
+}
+
# Create js and wasm files for applications
contains(TEMPLATE, .*app) {
TARGET_BASE = $${TARGET}
@@ -30,11 +107,16 @@ contains(TEMPLATE, .*app) {
WASM_PLUGIN_PATH = $$PWD/../../../src/plugins/platforms/wasm
}
+ PRELOAD = ""
+ shared {
+ PRELOAD = "preload:\ ['qt_plugins.json',\ 'qt_qml_imports.json'],"
+ }
+
# Copy/Generate main .html file (e.g. myapp.html) from the webassembly_shell.html by
# replacing the app name placeholder with the actual app name.
apphtml.name = application main html file
apphtml.output = $$DESTDIR/$$TARGET_HTML
- apphtml.commands = sed -e s/APPNAME/$$TARGET_BASE/g $$WASM_PLUGIN_PATH/wasm_shell.html > $$DESTDIR/$$TARGET_HTML
+ apphtml.commands = $$QMAKE_STREAM_EDITOR -e s/@APPNAME@/$$TARGET_BASE/g -e s/@APPEXPORTNAME@/$$EXPORT_NAME/g -e s/@PRELOAD@/$$PRELOAD/g $$WASM_PLUGIN_PATH/wasm_shell.html > $$DESTDIR/$$TARGET_HTML
apphtml.input = $$WASM_PLUGIN_PATH/wasm_shell.html
apphtml.depends = $$apphtml.input
QMAKE_EXTRA_COMPILERS += apphtml
@@ -72,6 +154,22 @@ contains(TEMPLATE, .*app) {
}
}
+qtConfTest_emccVersion()
+
+CONFIG(debug):!isEmpty(QT_WASM_SOURCE_MAP) {
+
+ EMCC_VERSION = $$qtSystemEmccVersion()
+
+ QMAKE_LFLAGS += -gsource-map
+ # Pass --source-map-base on the linker line. This informs the
+ # browser where to find the source files when debugging.
+ WASM_SOURCE_MAP_BASE = http://localhost:8000/
+ !isEmpty(QT_WASM_SOURCE_MAP_BASE):\
+ WASM_SOURCE_MAP_BASE = $$QT_WASM_SOURCE_MAP_BASE
+ QMAKE_LFLAGS += --source-map-base $$WASM_SOURCE_MAP_BASE
+}
+
+
# Creates the stand-alone version of the library from bitcode
!static:contains(TEMPLATE, .*lib): {
load(resolve_target)
diff --git a/mkspecs/features/wayland-scanner.prf b/mkspecs/features/wayland-scanner.prf
index 2360917a3b..08b3103f28 100644
--- a/mkspecs/features/wayland-scanner.prf
+++ b/mkspecs/features/wayland-scanner.prf
@@ -22,7 +22,7 @@ wayland_server_header.name = wayland ${QMAKE_FILE_BASE}
wayland_server_header.input = WAYLANDSERVERSOURCES WAYLANDSERVERSOURCES_SYSTEM
wayland_server_header.variable_out = HEADERS
wayland_server_header.output = wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
-wayland_server_header.commands = $$QMAKE_WAYLAND_SCANNER server-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+wayland_server_header.commands = $$QMAKE_WAYLAND_SCANNER --strict --include-core-only server-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
silent:wayland_server_header.commands = @echo Wayland server header ${QMAKE_FILE_IN} && $$wayland_server_header.commands
QMAKE_EXTRA_COMPILERS += wayland_server_header
@@ -30,7 +30,7 @@ wayland_client_header.name = wayland ${QMAKE_FILE_BASE}
wayland_client_header.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
wayland_client_header.variable_out = HEADERS
wayland_client_header.output = wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
-wayland_client_header.commands = $$QMAKE_WAYLAND_SCANNER client-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+wayland_client_header.commands = $$QMAKE_WAYLAND_SCANNER --strict --include-core-only client-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
silent:wayland_client_header.commands = @echo Wayland client header ${QMAKE_FILE_IN} && $$wayland_client_header.commands
QMAKE_EXTRA_COMPILERS += wayland_client_header
@@ -38,11 +38,11 @@ wayland_code.name = wayland ${QMAKE_FILE_BASE}
wayland_code.input = WAYLANDCLIENTSOURCES WAYLANDSERVERSOURCES
wayland_code.variable_out = SOURCES
wayland_code.output = wayland-${QMAKE_FILE_BASE}-protocol.c
-wayland_code.commands = $$QMAKE_WAYLAND_SCANNER code < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+wayland_code.commands = $$QMAKE_WAYLAND_SCANNER --strict --include-core-only public-code < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
silent:wayland_code.commands = @echo Wayland code header ${QMAKE_FILE_IN} && $$wayland_code.commands
QMAKE_EXTRA_COMPILERS += wayland_code
-qtPrepareTool(QMAKE_QTWAYLANDSCANNER, qtwaylandscanner)
+qtPrepareLibExecTool(QMAKE_QTWAYLANDSCANNER, qtwaylandscanner)
qtwayland_client_header.name = qtwayland ${QMAKE_FILE_BASE}
qtwayland_client_header.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
diff --git a/mkspecs/features/win32/default_pre.prf b/mkspecs/features/win32/default_pre.prf
index 4bd1653aee..be8e20130f 100644
--- a/mkspecs/features/win32/default_pre.prf
+++ b/mkspecs/features/win32/default_pre.prf
@@ -1,2 +1,2 @@
-CONFIG = windows $$CONFIG
+CONFIG = windows $$CONFIG entrypoint
load(default_pre)
diff --git a/mkspecs/features/win32/dumpcpp.prf b/mkspecs/features/win32/dumpcpp.prf
index c8cb0dd24b..589d700e4e 100644
--- a/mkspecs/features/win32/dumpcpp.prf
+++ b/mkspecs/features/win32/dumpcpp.prf
@@ -22,15 +22,15 @@ dumpcpp_impl.depends += ${QMAKE_FILE_BASE}.h
QMAKE_EXTRA_COMPILERS += dumpcpp_impl
-# Create dependencies from every object file to our generated header files.
-if(isEmpty(BUILDS)|build_pass):have_target:!contains(TEMPLATE, vc.*) {
+# Call dumpcpp the first time if the files do not exist to help find dependencies
+!build_pass:have_target:!contains(TEMPLATE, vc.*) {
for(tlb, TYPELIBS) {
- hdr = $$basename(tlb)
- hdr = $$section(hdr, ., 0, -2).h
- TYPELIB_HEADERS += $$hdr
+ tlbCopy = $$replace(tlb, \", )
+ hdr = $$basename(tlbCopy)
+ hdr = $$section(hdr, ., 0, -2)
+ tmp_command = $$QMAKE_DUMPCPP $$system_quote($$absolute_path($$tlbCopy, $$_PRO_FILE_PWD_)) \
+ -o $$system_quote($$OUT_PWD/$$hdr)
+ qaxcontainer_compat: tmp_command += -compat
+ !exists($$OUT_PWD/$${hdr}.h): system($$tmp_command)
}
-
- objtgt.target = $(OBJECTS)
- objtgt.depends += $$TYPELIB_HEADERS
- QMAKE_EXTRA_TARGETS += objtgt
}
diff --git a/mkspecs/features/win32/idcidl.prf b/mkspecs/features/win32/idcidl.prf
index 922ae3f99e..67d3cf0cb0 100644
--- a/mkspecs/features/win32/idcidl.prf
+++ b/mkspecs/features/win32/idcidl.prf
@@ -3,8 +3,7 @@ build_pass:console {
warning("Remove 'console' from your CONFIG.")
}
-# Do not link qtmain.lib
-QMAKE_LIBS_QT_ENTRY =
+CONFIG -= entrypoint
ACTIVEQT_VERSION = $$VERSION
isEmpty(ACTIVEQT_VERSION):ACTIVEQT_VERSION = 1.0
diff --git a/mkspecs/features/win32/opengl.prf b/mkspecs/features/win32/opengl.prf
index f21848f941..a4aca843ea 100644
--- a/mkspecs/features/win32/opengl.prf
+++ b/mkspecs/features/win32/opengl.prf
@@ -1,39 +1,6 @@
QT_FOR_CONFIG += gui
-defineTest(prependOpenGlLib) {
- path = $$QT.core.libs/$$QMAKE_PREFIX_STATICLIB$$1
- ext = .$$QMAKE_EXTENSION_STATICLIB
- QMAKE_LIBS_OPENGL_ES2 = $${path}$${ext} $$QMAKE_LIBS_OPENGL_ES2
- QMAKE_LIBS_OPENGL_ES2_DEBUG = $${path}d$${ext} $$QMAKE_LIBS_OPENGL_ES2_DEBUG
- export(QMAKE_LIBS_OPENGL_ES2)
- export(QMAKE_LIBS_OPENGL_ES2_DEBUG)
-}
-
-qtConfig(opengles2) {
- # Depending on the configuration we use libQtANGLE or libEGL and libGLESv2
- qtConfig(combined-angle-lib) {
- prependOpenGlLib($$LIBQTANGLE_NAME)
- } else {
- prependOpenGlLib($$LIBGLESV2_NAME)
- prependOpenGlLib($$LIBEGL_NAME)
- }
-# For Desktop, use the ANGLE library location passed on from configure.
- INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
- CONFIG(debug, debug|release) {
- QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_DEBUG
- qtConfig(angle) {
- LIBS += $$QMAKE_LIBS_OPENGL_ES2_DEBUG
- } else {
- LIBS += $$QMAKE_LIBS_OPENGL_ES2
- }
- } else {
- LIBS += $$QMAKE_LIBS_OPENGL_ES2
- QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_RELEASE
- }
- qtConfig(static): DEFINES += GL_APICALL= EGLAPI=
-} else {
- !qtConfig(dynamicgl) {
- QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
- QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL
- }
+!qtConfig(dynamicgl) {
+ QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL
}
diff --git a/mkspecs/features/win32/qt_dll.prf b/mkspecs/features/win32/qt_dll.prf
deleted file mode 100644
index f03c0c08c1..0000000000
--- a/mkspecs/features/win32/qt_dll.prf
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG *= qt
diff --git a/mkspecs/features/win32/separate_debug_info.prf b/mkspecs/features/win32/separate_debug_info.prf
index 2838020f01..8550fdda15 100644
--- a/mkspecs/features/win32/separate_debug_info.prf
+++ b/mkspecs/features/win32/separate_debug_info.prf
@@ -13,6 +13,10 @@ have_target:!static:!isEmpty(QMAKE_OBJCOPY) {
QMAKE_POST_LINK = $$copy_debug_info && $$strip_debug_info && $$link_debug_info $$QMAKE_POST_LINK
silent:QMAKE_POST_LINK = @echo creating $@.debug && $$QMAKE_POST_LINK
- target.targets += $$QMAKE_TARGET_DEBUG_INFO
+ contains(TEMPLATE, lib$):!plugin {
+ dlltarget.targets += $$QMAKE_TARGET_DEBUG_INFO
+ } else {
+ target.targets += $$QMAKE_TARGET_DEBUG_INFO
+ }
QMAKE_DISTCLEAN += $$QMAKE_TARGET_DEBUG_INFO
}
diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
index 272170d428..66ef21f2de 100644
--- a/mkspecs/features/win32/windows.prf
+++ b/mkspecs/features/win32/windows.prf
@@ -2,15 +2,4 @@ CONFIG -= console
QMAKE_LFLAGS += $$QMAKE_LFLAGS_WINDOWS
contains(TEMPLATE, ".*app") {
QMAKE_LFLAGS += $$QMAKE_LFLAGS_EXE
- mingw:DEFINES += QT_NEEDS_QMAIN
-
- qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
- isEqual(entryLib, -lqtmain) {
- lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB
- PRE_TARGETDEPS += $$lib
- QMAKE_LIBS += $$lib
- } else {
- QMAKE_LIBS += $${entryLib}
- }
- }
}
diff --git a/mkspecs/features/win32/windows_vulkan_sdk.prf b/mkspecs/features/win32/windows_vulkan_sdk.prf
index 2aebbd3b25..a3c6a7427d 100644
--- a/mkspecs/features/win32/windows_vulkan_sdk.prf
+++ b/mkspecs/features/win32/windows_vulkan_sdk.prf
@@ -3,6 +3,11 @@ isEmpty(QMAKE_INCDIR_VULKAN) {
# headers are found out-of-the-box on typical Windows setups.
QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)/include
+ # Do not add default include paths as that can knock std headers
+ # out of their stride due to their usage of #include_next.
+ contains(QMAKE_DEFAULT_INCDIRS, $$re_escape($$QMAKE_INCDIR_VULKAN)): \
+ QMAKE_INCDIR_VULKAN =
+
# Do not export the include dir but resolve it on every qmake call.
QMAKE_EXPORT_INCDIR_VULKAN = -
}
diff --git a/mkspecs/features/winrt/console.prf b/mkspecs/features/winrt/console.prf
deleted file mode 100644
index c4afe5b96e..0000000000
--- a/mkspecs/features/winrt/console.prf
+++ /dev/null
@@ -1,5 +0,0 @@
-# This is an empty prf file to overwrite the win32 version.
-# On Windows RT all applications need to be windows applications
-# and also link to winmain. Inside winmain we create the launch
-# arguments and also initialize the UI.
-
diff --git a/mkspecs/features/winrt/default_pre.prf b/mkspecs/features/winrt/default_pre.prf
deleted file mode 100644
index 966d24f091..0000000000
--- a/mkspecs/features/winrt/default_pre.prf
+++ /dev/null
@@ -1,14 +0,0 @@
-# Note that the order is important - ucrt(d) has to be first.
-# Otherwise, the linker might use malloc from a different library,
-# but free_dbg() from the runtime, causing an assertion failure
-# due to deleting an item from a different heap.
-# vcruntime(d) is necessary when we don't link to any libraries
-# which would pull it in transitively.
-CONFIG(debug, debug|release): \
- QMAKE_LIBS = ucrtd.lib vcruntimed.lib $$QMAKE_LIBS
-else: \
- QMAKE_LIBS = ucrt.lib vcruntime.lib $$QMAKE_LIBS
-
-equals(TEMPLATE, "vcapp"):!static: CONFIG += windeployqt
-
-load(default_pre)
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
deleted file mode 100644
index 143b884dbf..0000000000
--- a/mkspecs/features/winrt/package_manifest.prf
+++ /dev/null
@@ -1,196 +0,0 @@
-# This performs basic variable replacement on the contents of the WinRT manifest template, as
-# specified by WINRT_MANIFEST. The resulting manifest file is written to the output directory.
-# While the most common options are covered by the default template, the developer is expected
-# to make an application-level copy of the template in order to customize the manifest further.
-# Afterwards, they can override the default template by assigning their template to WINRT_MANIFEST.
-#
-# All subkeys in WINRT_MANIFEST will be replaced if defined/found, so new variables can be easily
-# added.
-
-# 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).
-# - Visual Studio requires a design-mode manifest in the same location as the vcproj.
-!isEmpty(WINRT_MANIFEST): \
- if(build_pass:equals(TEMPLATE, "app"))| \
- if(!build_pass:equals(TEMPLATE, "vcapp")) {
-
- manifest_file.input = $$WINRT_MANIFEST
-
- contains(TEMPLATE, "vc.*") {
- BUILD_DIR = $$OUT_PWD
- } else {
- load(resolve_target)
- BUILD_DIR = $$dirname(QMAKE_RESOLVED_TARGET)
- }
-
- contains(TEMPLATE, "vc.*"): \
- manifest_file.output = $$BUILD_DIR/Package.appxmanifest
- else: \
- manifest_file.output = $$BUILD_DIR/AppxManifest.xml
-
- !contains(WINRT_MANIFEST.CONFIG, "verbatim") {
- # Provide the C-runtime dependency
- equals(TEMPLATE, "app") {
- VCLIBS = Microsoft.VCLibs.$$replace(MSVC_VER, \\., ).00
- CONFIG(debug, debug|release): \
- VCLIBS = $${VCLIBS}.Debug
- else: \
- VCLIBS = $${VCLIBS}
- # VS 2017 still uses vclibs 140
- contains(MSVC_VER, "15.0"): VCLIBS = $$replace(VCLIBS, 150, 140)
- VCLIBS = "$${VCLIBS}\" MinVersion=\"14.0.0.0\" Publisher=\"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
- WINRT_MANIFEST.dependencies += $$VCLIBS
- }
-
- # Provide default values for required variables
- isEmpty(WINRT_MANIFEST.target): WINRT_MANIFEST.target = $$TARGET
- isEmpty(WINRT_MANIFEST.identity) {
- # Reuse the existing UUID if possible
- UUID_CACHE = $$OUT_PWD/.qmake.winrt_uuid_$$TARGET
- exists($$UUID_CACHE) {
- include($$UUID_CACHE)
- } else {
- WINRT_UUID = $$system(uuidgen)
- isEmpty(WINRT_UUID): error("Unable to generate a UUID. Make sure uuidgen is in your PATH.")
- WINRT_UUID = "WINRT_MANIFEST.identity = $$WINRT_UUID"
- write_file($$UUID_CACHE, WINRT_UUID)|error("Unable to write the UUID cache; aborting.")
- eval($$WINRT_UUID)
- }
- }
- isEmpty(WINRT_MANIFEST.name): WINRT_MANIFEST.name = $$TARGET
- isEmpty(WINRT_MANIFEST.architecture): WINRT_MANIFEST.architecture = $$VCPROJ_ARCH
- isEmpty(WINRT_MANIFEST.version): WINRT_MANIFEST.version = 1.0.0.0
- isEmpty(WINRT_MANIFEST.publisher): WINRT_MANIFEST.publisher = Default publisher display name
- isEmpty(WINRT_MANIFEST.publisherid): WINRT_MANIFEST.publisherid = CN=$$(USERNAME)
- isEmpty(WINRT_MANIFEST.phone_product_id): WINRT_MANIFEST.phone_product_id = $$WINRT_MANIFEST.identity
- isEmpty(WINRT_MANIFEST.phone_publisher_id): WINRT_MANIFEST.phone_publisher_id = 00000000-0000-0000-0000-000000000000
- isEmpty(WINRT_MANIFEST.description): WINRT_MANIFEST.description = Default package description
- 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|*-msvc2017 {
- 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) "
-
- VS_XML_NAMESPACE = "m2"
- WINRT_MANIFEST.rotation_preference = $$unique(WINRT_MANIFEST.rotation_preference)
- !isEmpty(WINRT_MANIFEST.rotation_preference) {
- MANIFEST_ROTATION += "<$${VS_XML_NAMESPACE}:InitialRotationPreference>"
- for(ROTATION, WINRT_MANIFEST.rotation_preference): \
- MANIFEST_ROTATION += " <$${VS_XML_NAMESPACE}:Rotation Preference=\"$$ROTATION\" />"
- MANIFEST_ROTATION += "</$${VS_XML_NAMESPACE}:InitialRotationPreference>"
-
- WINRT_MANIFEST.rotation_preference = $$join(MANIFEST_ROTATION, $$INDENT, $$INDENT)
- }
-
- INDENT = "$$escape_expand(\\r\\n) "
-
- # All Windows 10 applications need to have internetClient.
- WINRT_MANIFEST.capabilities += internetClient
-
- contains(WINRT_MANIFEST.capabilities, defaults) {
- WINRT_MANIFEST.capabilities -= defaults
- WINRT_MANIFEST.capabilities += $$WINRT_MANIFEST.capabilities_default
- }
-
- contains(WINRT_MANIFEST.capabilities_device, defaults) {
- WINRT_MANIFEST.capabilities_device -= defaults
- WINRT_MANIFEST.capabilities_device += $$WINRT_MANIFEST.capabilities_device_default
- }
-
- UAP_CAPABILITIES += \
- appointments \
- blockedChatMessages \
- chat \
- contacts \
- enterpriseAuthentication \
- # internetClient is special, as it needs to be written without namespace
- #internetClient \
- musicLibrary \
- objects3D \
- phoneCall \
- picturesLibrary \
- removableStorage \
- sharedUserCertificates \
- userAccountInformation \
- videosLibrary \
- voipCall
-
- UAP3_CAPABILITIES += backgroundMediaPlayback remoteSystem userNotificationListener
-
- # Capabilities are given as a string list and may change with the configuration (network, sensors, etc.)
- WINRT_MANIFEST.capabilities = $$unique(WINRT_MANIFEST.capabilities)
- WINRT_MANIFEST.capabilities_device = $$unique(WINRT_MANIFEST.capabilities_device)
- !isEmpty(WINRT_MANIFEST.capabilities)|!isEmpty(WINRT_MANIFEST.capabilities_device) {
- MANIFEST_CAPABILITIES += "<Capabilities>"
- for (CAPABILITY, WINRT_MANIFEST.capabilities) {
- contains(UAP_CAPABILITIES, $$CAPABILITY): \
- MANIFEST_CAPABILITIES += " <uap:Capability Name=\"$$CAPABILITY\" />"
- else:contains(UAP3_CAPABILITIES, $$CAPABILITY): \
- MANIFEST_CAPABILITIES += " <uap3:Capability Name=\"$$CAPABILITY\" />"
- else: \
- MANIFEST_CAPABILITIES += " <Capability Name=\"$$CAPABILITY\" />"
- }
- for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \
- MANIFEST_CAPABILITIES += " <DeviceCapability Name=\"$$CAPABILITY\" />"
- MANIFEST_CAPABILITIES += "</Capabilities>"
-
- WINRT_MANIFEST.capabilities = $$join(MANIFEST_CAPABILITIES, $$INDENT, $$INDENT)
- }
-
- # Dependencies are given as a string list. The CRT dependency is added automatically above.
- # For MSVC2015/2017 the dependencies are added in conjunction with TargetDeviceFamily
- # Due to the hard coded dependency on "Windows.Universal" the <Dependencies> tag
- # is already inside the MSVC2015 manifest.
- WINRT_MANIFEST.dependencies = $$unique(WINRT_MANIFEST.dependencies)
- !isEmpty(WINRT_MANIFEST.dependencies) {
- for(DEPENDENCY, WINRT_MANIFEST.dependencies): \
- MANIFEST_DEPENDENCIES += " <PackageDependency Name=\"$$DEPENDENCY\" />"
-
- WINRT_MANIFEST.dependencies = $$join(MANIFEST_DEPENDENCIES, $$INDENT, $$INDENT)
- }
-
- # Provide default icons where needed
- isEmpty(WINRT_ASSETS_PATH): WINRT_ASSETS_PATH = $$[QT_HOST_DATA/get]/mkspecs/common/winrt_winphone/assets
- TEMPLATE_CONTENTS = $$cat($$WINRT_MANIFEST, lines)
- ICONS_FOUND = $$find(TEMPLATE_CONTENTS, \\\$\\\$\\{WINRT_MANIFEST\\.(logo|tile)_)
- ICONS_FOUND ~= s/.*\\\$\\\$\\{WINRT_MANIFEST\\.((logo|tile)_[^\}]+)\\}.*/\\1/g
- for (ICON_NAME, ICONS_FOUND) {
- ICON_FILE = $$eval(WINRT_MANIFEST.$$ICON_NAME)
- isEmpty(ICON_FILE) {
- equals(ICON_NAME, "logo_310x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_wide)
- else: equals(ICON_NAME, "logo_150x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_large)
- # Windows Phone specifics
- else: equals(ICON_NAME, "logo_480x800"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash)
- else: equals(ICON_NAME, "logo_71x71"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium)
- else: equals(ICON_NAME, "logo_44x44"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small)
- # Windows RT specifics
- else: equals(ICON_NAME, "logo_620x300"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash)
- else: equals(ICON_NAME, "logo_70x70"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium)
- else: equals(ICON_NAME, "logo_30x30"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small)
- }
- isEmpty(ICON_FILE): ICON_FILE = $$WINRT_ASSETS_PATH/$${ICON_NAME}.png
- icon_$${ICON_NAME}.input = $$ICON_FILE
- icon_$${ICON_NAME}.output = $$BUILD_DIR/assets/$$basename(ICON_FILE)
- icon_$${ICON_NAME}.CONFIG = verbatim
- QMAKE_SUBSTITUTES += icon_$${ICON_NAME}
- WINRT_MANIFEST.$${ICON_NAME} = assets/$$basename(ICON_FILE)
- }
-
- !contains(TEMPLATE, "vc.*") {
- winrt_manifest_install.files = $$manifest_file.output
- winrt_manifest_install.path = $$target.path
- winrt_assets_install.files = $$BUILD_DIR/assets/*
- winrt_assets_install.path = $$target.path/assets
- INSTALLS += winrt_manifest_install winrt_assets_install
- }
- } else {
- manifest_file.CONFIG += verbatim
- }
-
- QMAKE_SUBSTITUTES += manifest_file
-}
diff --git a/mkspecs/features/yacc.prf b/mkspecs/features/yacc.prf
index 618f0668c2..8acb9bc4bd 100644
--- a/mkspecs/features/yacc.prf
+++ b/mkspecs/features/yacc.prf
@@ -2,32 +2,49 @@
# Yacc extra-compiler for handling files specified in the YACCSOURCES variable
#
-{
- yacc_decl.name = Yacc header
- yacc_decl.input = YACCSOURCES
- yacc_decl.variable_out = GENERATED_FILES
+isEmpty(YACC_DIR): YACC_DIR = .
+defineReplace(yaccCommands) {
+ input = $$relative_path($$absolute_path($$1, $$OUT_PWD), $$OUT_PWD/$$YACC_DIR)
+ input_base = $$basename(1)
+ input_base ~= s/\.[^.]*$//
+ hpp_output = $$2
+ cpp_output = $$hpp_output
+ cpp_output ~= s/$$re_escape($$first(QMAKE_EXT_H))$/$$first(QMAKE_EXT_CPP)/
isEmpty(QMAKE_YACCFLAGS_MANGLE) {
- QMAKE_YACCFLAGS_MANGLE = -p ${QMAKE_FILE_BASE} -b ${QMAKE_FILE_BASE}
- QMAKE_YACC_HEADER = ${QMAKE_FILE_BASE}.tab.h
- QMAKE_YACC_SOURCE = ${QMAKE_FILE_BASE}.tab.c
+ QMAKE_YACCFLAGS_MANGLE = -p $${input_base} -b $${input_base}
+ QMAKE_YACC_HEADER = $${input_base}.tab.h
+ QMAKE_YACC_SOURCE = $${input_base}.tab.c
} else {
- QMAKE_YACCFLAGS_MANGLE ~= s/\\$base/${QMAKE_FILE_BASE}/g #backwards compat
- QMAKE_YACC_HEADER ~= s/\\$base/${QMAKE_FILE_BASE}/g
- QMAKE_YACC_SOURCE ~= s/\\$base/${QMAKE_FILE_BASE}/g
+ QMAKE_YACCFLAGS_MANGLE ~= s/\\$base/$${input_base}/g #backwards compat
+ QMAKE_YACC_HEADER ~= s/\\$base/$${input_base}/g
+ QMAKE_YACC_SOURCE ~= s/\\$base/$${input_base}/g
}
QMAKE_YACCDECLFLAGS = $$QMAKE_YACCFLAGS
- !yacc_no_name_mangle:QMAKE_YACCDECLFLAGS += $$QMAKE_YACCFLAGS_MANGLE
+ !yacc_no_name_mangle: QMAKE_YACCDECLFLAGS += $$QMAKE_YACCFLAGS_MANGLE
- yacc_decl.commands = \
- -$(DEL_FILE) $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_H)} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_CPP)}$$escape_expand(\\n\\t) \
- $$QMAKE_YACC $$QMAKE_YACCDECLFLAGS ${QMAKE_FILE_IN}$$escape_expand(\\n\\t) \
- $(MOVE) $${QMAKE_YACC_HEADER} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_H)}$$escape_expand(\\n\\t) \
- $(MOVE) $${QMAKE_YACC_SOURCE} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_CPP)}$$escape_expand(\\n\\t)
- yacc_decl.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_H)}
+ !equals(YACC_DIR, .): yacc_call = cd $$YACC_DIR &&
+ yacc_call += $$QMAKE_YACC $$QMAKE_YACCDECLFLAGS $${input}
+
+ commands = \
+ -$(DEL_FILE) $${hpp_output} $${cpp_output}$$escape_expand(\\n\\t) \
+ $${yacc_call}$$escape_expand(\\n\\t) \
+ $(MOVE) $$shell_path($${YACC_DIR}/$${QMAKE_YACC_HEADER}) $${hpp_output}$$escape_expand(\\n\\t) \
+ $(MOVE) $$shell_path($${YACC_DIR}/$${QMAKE_YACC_SOURCE}) $${cpp_output}$$escape_expand(\\n\\t)
+
+ silent: commands = @echo Yacc $$1 && $$commands
+ return($$commands)
+}
- silent:yacc_decl.commands = @echo Yacc ${QMAKE_FILE_IN} && $$yacc_decl.commands
+yacc_output_base = $${YACC_DIR}/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}
+
+{
+ yacc_decl.name = Yacc header
+ yacc_decl.input = YACCSOURCES
+ yacc_decl.variable_out = GENERATED_FILES
+ yacc_decl.commands = ${QMAKE_FUNC_yaccCommands}
+ yacc_decl.output = $${yacc_output_base}$$first(QMAKE_EXT_H)
QMAKE_EXTRA_COMPILERS += yacc_decl
}
@@ -37,7 +54,9 @@
yacc_impl.variable_out = GENERATED_SOURCES
yacc_impl.dependency_type = TYPE_C
yacc_impl.commands = $$escape_expand(\\n) # We don't want any commands where, but if command is empty no rules are created
- yacc_impl.depends += $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_H)} # Make sure we depend on the step above
- yacc_impl.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_CPP)} # Faked output from this step, output really created in step above
+ yacc_impl.depends += $${yacc_output_base}$$first(QMAKE_EXT_H) # Make sure we depend on the step above
+ yacc_impl.output = $${yacc_output_base}$$first(QMAKE_EXT_CPP) # Faked output from this step, output really created in step above
QMAKE_EXTRA_COMPILERS += yacc_impl
}
+
+unset(yacc_output_base)
diff --git a/mkspecs/freebsd-clang/qplatformdefs.h b/mkspecs/freebsd-clang/qplatformdefs.h
index 0e3fd6b2b8..03b54e9f8f 100644
--- a/mkspecs/freebsd-clang/qplatformdefs.h
+++ b/mkspecs/freebsd-clang/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/freebsd-g++/qplatformdefs.h b/mkspecs/freebsd-g++/qplatformdefs.h
index 0e3fd6b2b8..03b54e9f8f 100644
--- a/mkspecs/freebsd-g++/qplatformdefs.h
+++ b/mkspecs/freebsd-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/haiku-g++/qplatformdefs.h b/mkspecs/haiku-g++/qplatformdefs.h
index 21636c031e..9a28326e06 100644
--- a/mkspecs/haiku-g++/qplatformdefs.h
+++ b/mkspecs/haiku-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Tobias Koenig <tobias.koenig@kdab.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Tobias Koenig <tobias.koenig@kdab.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/hpuxi-g++-64/qplatformdefs.h b/mkspecs/hpuxi-g++-64/qplatformdefs.h
index 816fd0de6c..45893f59b0 100644
--- a/mkspecs/hpuxi-g++-64/qplatformdefs.h
+++ b/mkspecs/hpuxi-g++-64/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/hurd-g++/qplatformdefs.h b/mkspecs/hurd-g++/qplatformdefs.h
index b1887aae7f..28bc44b7ec 100644
--- a/mkspecs/hurd-g++/qplatformdefs.h
+++ b/mkspecs/hurd-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
@@ -78,6 +42,7 @@
#include <sys/wait.h>
#include <netinet/in.h>
+#define QT_USE_XOPEN_LFS_EXTENSIONS
#include "../common/posix/qplatformdefs.h"
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
diff --git a/mkspecs/integrity-armv7-imx6/qplatformdefs.h b/mkspecs/integrity-armv7-imx6/qplatformdefs.h
index 1942139851..0dcf51bb3a 100644
--- a/mkspecs/integrity-armv7-imx6/qplatformdefs.h
+++ b/mkspecs/integrity-armv7-imx6/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Green Hills Software. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2015 Green Hills Software. All rights reserved.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/integrity-armv7/qplatformdefs.h b/mkspecs/integrity-armv7/qplatformdefs.h
index 1942139851..0dcf51bb3a 100644
--- a/mkspecs/integrity-armv7/qplatformdefs.h
+++ b/mkspecs/integrity-armv7/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Green Hills Software. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2015 Green Hills Software. All rights reserved.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/integrity-armv8-rcar/qplatformdefs.h b/mkspecs/integrity-armv8-rcar/qplatformdefs.h
index a743326346..0dcf51bb3a 100644
--- a/mkspecs/integrity-armv8-rcar/qplatformdefs.h
+++ b/mkspecs/integrity-armv8-rcar/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Green Hills Software. All rights reserved.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2015 Green Hills Software. All rights reserved.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/integrity-x86/qplatformdefs.h b/mkspecs/integrity-x86/qplatformdefs.h
index 1942139851..0dcf51bb3a 100644
--- a/mkspecs/integrity-x86/qplatformdefs.h
+++ b/mkspecs/integrity-x86/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Green Hills Software. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2015 Green Hills Software. All rights reserved.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/linux-aarch64-gnu-g++/qplatformdefs.h b/mkspecs/linux-aarch64-gnu-g++/qplatformdefs.h
index 2697a75e44..39874ce807 100644
--- a/mkspecs/linux-aarch64-gnu-g++/qplatformdefs.h
+++ b/mkspecs/linux-aarch64-gnu-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/linux-arm-gnueabi-g++/qplatformdefs.h b/mkspecs/linux-arm-gnueabi-g++/qplatformdefs.h
index aedffeb1ef..5500cdec05 100644
--- a/mkspecs/linux-arm-gnueabi-g++/qplatformdefs.h
+++ b/mkspecs/linux-arm-gnueabi-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/linux-clang-32/qmake.conf b/mkspecs/linux-clang-32/qmake.conf
new file mode 100644
index 0000000000..de872e7431
--- /dev/null
+++ b/mkspecs/linux-clang-32/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for linux-clang
+#
+
+MAKEFILE_GENERATOR = UNIX
+CONFIG += incremental
+
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/linux.conf)
+
+QMAKE_CFLAGS = -m32
+QMAKE_LFLAGS = -m32
+
+include(../common/gcc-base-unix.conf)
+include(../common/clang.conf)
+
+QMAKE_LFLAGS += -ccc-gcc-name g++
+
+load(qt_config)
diff --git a/mkspecs/linux-clang-32/qplatformdefs.h b/mkspecs/linux-clang-32/qplatformdefs.h
new file mode 100644
index 0000000000..a63b4932a0
--- /dev/null
+++ b/mkspecs/linux-clang-32/qplatformdefs.h
@@ -0,0 +1,4 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "../linux-clang/qplatformdefs.h"
diff --git a/mkspecs/linux-clang-libc++-32/qmake.conf b/mkspecs/linux-clang-libc++-32/qmake.conf
new file mode 100644
index 0000000000..f4c006d383
--- /dev/null
+++ b/mkspecs/linux-clang-libc++-32/qmake.conf
@@ -0,0 +1,10 @@
+#
+# qmake configuration for linux-clang and libc++
+#
+
+include(../linux-clang-32/qmake.conf)
+
+QMAKE_CXXFLAGS += -stdlib=libc++
+QMAKE_LFLAGS += -stdlib=libc++
+
+load(qt_config)
diff --git a/mkspecs/linux-clang-libc++-32/qplatformdefs.h b/mkspecs/linux-clang-libc++-32/qplatformdefs.h
new file mode 100644
index 0000000000..a63b4932a0
--- /dev/null
+++ b/mkspecs/linux-clang-libc++-32/qplatformdefs.h
@@ -0,0 +1,4 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "../linux-clang/qplatformdefs.h"
diff --git a/mkspecs/linux-clang-libc++/qplatformdefs.h b/mkspecs/linux-clang-libc++/qplatformdefs.h
index 8f5ce17858..a63b4932a0 100644
--- a/mkspecs/linux-clang-libc++/qplatformdefs.h
+++ b/mkspecs/linux-clang-libc++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../linux-clang/qplatformdefs.h"
diff --git a/mkspecs/linux-clang/qplatformdefs.h b/mkspecs/linux-clang/qplatformdefs.h
index a818d973f0..fe03beefd1 100644
--- a/mkspecs/linux-clang/qplatformdefs.h
+++ b/mkspecs/linux-clang/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
@@ -79,14 +43,6 @@
#define QT_USE_XOPEN_LFS_EXTENSIONS
#include "../common/posix/qplatformdefs.h"
-#undef QT_SOCKLEN_T
-
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
diff --git a/mkspecs/linux-g++-32/qplatformdefs.h b/mkspecs/linux-g++-32/qplatformdefs.h
index aedffeb1ef..5500cdec05 100644
--- a/mkspecs/linux-g++-32/qplatformdefs.h
+++ b/mkspecs/linux-g++-32/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/linux-g++-64/qplatformdefs.h b/mkspecs/linux-g++-64/qplatformdefs.h
index aedffeb1ef..5500cdec05 100644
--- a/mkspecs/linux-g++-64/qplatformdefs.h
+++ b/mkspecs/linux-g++-64/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
index 13523f0702..e376f1865a 100644
--- a/mkspecs/linux-g++/qplatformdefs.h
+++ b/mkspecs/linux-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
@@ -79,14 +43,6 @@
#define QT_USE_XOPEN_LFS_EXTENSIONS
#include "../common/posix/qplatformdefs.h"
-#undef QT_SOCKLEN_T
-
-#if defined(__GLIBC__) && (__GLIBC__ < 2)
-#define QT_SOCKLEN_T int
-#else
-#define QT_SOCKLEN_T socklen_t
-#endif
-
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
diff --git a/mkspecs/linux-icc-32/qplatformdefs.h b/mkspecs/linux-icc-32/qplatformdefs.h
index aedffeb1ef..5500cdec05 100644
--- a/mkspecs/linux-icc-32/qplatformdefs.h
+++ b/mkspecs/linux-icc-32/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/linux-icc-64/qplatformdefs.h b/mkspecs/linux-icc-64/qplatformdefs.h
index aedffeb1ef..5500cdec05 100644
--- a/mkspecs/linux-icc-64/qplatformdefs.h
+++ b/mkspecs/linux-icc-64/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/linux-icc-k1om/qplatformdefs.h b/mkspecs/linux-icc-k1om/qplatformdefs.h
index 33a3bf0e1c..fc63bc387b 100644
--- a/mkspecs/linux-icc-k1om/qplatformdefs.h
+++ b/mkspecs/linux-icc-k1om/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../linux-icc/qplatformdefs.h"
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index 75a601b1f1..09f897d093 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -9,7 +9,6 @@ include(../common/icc-base-unix.conf)
# modifications to icc-base-unix.conf
QMAKE_CFLAGS_YACC =
-QMAKE_CFLAGS_ISYSTEM = -isystem
QMAKE_CFLAGS_THREAD = -D_REENTRANT
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
diff --git a/mkspecs/linux-icc/qplatformdefs.h b/mkspecs/linux-icc/qplatformdefs.h
index aedffeb1ef..5500cdec05 100644
--- a/mkspecs/linux-icc/qplatformdefs.h
+++ b/mkspecs/linux-icc/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/linux-llvm/qplatformdefs.h b/mkspecs/linux-llvm/qplatformdefs.h
index dc750ab1ef..2d1ab8a7c4 100644
--- a/mkspecs/linux-llvm/qplatformdefs.h
+++ b/mkspecs/linux-llvm/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
@@ -80,14 +44,6 @@
#define QT_USE_XOPEN_LFS_EXTENSIONS
#include "../common/posix/qplatformdefs.h"
-#undef QT_SOCKLEN_T
-
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
diff --git a/mkspecs/linux-lsb-g++/qplatformdefs.h b/mkspecs/linux-lsb-g++/qplatformdefs.h
index 4c4e53da2a..e1c9fcfefd 100644
--- a/mkspecs/linux-lsb-g++/qplatformdefs.h
+++ b/mkspecs/linux-lsb-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
@@ -85,16 +49,9 @@
#include "../common/posix/qplatformdefs.h"
#undef QT_OPEN_LARGEFILE
-#undef QT_SOCKLEN_T
#define QT_OPEN_LARGEFILE 0
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
#ifndef SIOCGIFBRDADDR
# define SIOCGIFBRDADDR 0x8919
#endif
diff --git a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h
index 4339ea2b23..4ccf402ca5 100644
--- a/mkspecs/lynxos-g++/qplatformdefs.h
+++ b/mkspecs/lynxos-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
@@ -72,14 +36,6 @@
#include "../common/posix/qplatformdefs.h"
-#undef QT_SOCKLEN_T
-
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
diff --git a/mkspecs/macx-clang/Info.plist.app b/mkspecs/macx-clang/Info.plist.app
index 4d64a77704..e37d8975f8 100644
--- a/mkspecs/macx-clang/Info.plist.app
+++ b/mkspecs/macx-clang/Info.plist.app
@@ -4,8 +4,6 @@
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
<key>CFBundleIconFile</key>
<string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string>
<key>CFBundleIdentifier</key>
@@ -22,5 +20,9 @@
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleAllowMixedLocalizations</key>
+ <true/>
</dict>
</plist>
diff --git a/mkspecs/macx-clang/Info.plist.lib b/mkspecs/macx-clang/Info.plist.lib
index ce28365500..34752ec40d 100644
--- a/mkspecs/macx-clang/Info.plist.lib
+++ b/mkspecs/macx-clang/Info.plist.lib
@@ -4,8 +4,6 @@
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
diff --git a/mkspecs/macx-clang/qmake.conf b/mkspecs/macx-clang/qmake.conf
index 464f327ac4..0cf1f31b60 100644
--- a/mkspecs/macx-clang/qmake.conf
+++ b/mkspecs/macx-clang/qmake.conf
@@ -7,7 +7,7 @@
# configure \
# -pkg-config \
# -fontconfig -system-freetype \
-# -system-xcb -no-opengl
+# -xcb -no-opengl
#
# Ensure that pkg-config is properly configured, or that
# PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/opt/X11/share/pkgconfig
diff --git a/mkspecs/macx-clang/qplatformdefs.h b/mkspecs/macx-clang/qplatformdefs.h
index 063491dd90..67ed995fa7 100644
--- a/mkspecs/macx-clang/qplatformdefs.h
+++ b/mkspecs/macx-clang/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/macx-g++/Info.plist.app b/mkspecs/macx-g++/Info.plist.app
index 4d64a77704..fa592af089 100644
--- a/mkspecs/macx-g++/Info.plist.app
+++ b/mkspecs/macx-g++/Info.plist.app
@@ -4,8 +4,6 @@
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
<key>CFBundleIconFile</key>
<string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string>
<key>CFBundleIdentifier</key>
diff --git a/mkspecs/macx-g++/Info.plist.lib b/mkspecs/macx-g++/Info.plist.lib
index ce28365500..34752ec40d 100644
--- a/mkspecs/macx-g++/Info.plist.lib
+++ b/mkspecs/macx-g++/Info.plist.lib
@@ -4,8 +4,6 @@
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
diff --git a/mkspecs/macx-g++/qplatformdefs.h b/mkspecs/macx-g++/qplatformdefs.h
index 063491dd90..67ed995fa7 100644
--- a/mkspecs/macx-g++/qplatformdefs.h
+++ b/mkspecs/macx-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/macx-icc/Info.plist.app b/mkspecs/macx-icc/Info.plist.app
index 4d64a77704..fa592af089 100644
--- a/mkspecs/macx-icc/Info.plist.app
+++ b/mkspecs/macx-icc/Info.plist.app
@@ -4,8 +4,6 @@
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
<key>CFBundleIconFile</key>
<string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string>
<key>CFBundleIdentifier</key>
diff --git a/mkspecs/macx-icc/Info.plist.lib b/mkspecs/macx-icc/Info.plist.lib
index ce28365500..34752ec40d 100644
--- a/mkspecs/macx-icc/Info.plist.lib
+++ b/mkspecs/macx-icc/Info.plist.lib
@@ -4,8 +4,6 @@
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
diff --git a/mkspecs/macx-icc/qplatformdefs.h b/mkspecs/macx-icc/qplatformdefs.h
index 063491dd90..67ed995fa7 100644
--- a/mkspecs/macx-icc/qplatformdefs.h
+++ b/mkspecs/macx-icc/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/macx-ios-clang/Default-568h@2x.png b/mkspecs/macx-ios-clang/Default-568h@2x.png
deleted file mode 100644
index 0891b7aabf..0000000000
--- a/mkspecs/macx-ios-clang/Default-568h@2x.png
+++ /dev/null
Binary files differ
diff --git a/mkspecs/macx-ios-clang/Info.plist.app b/mkspecs/macx-ios-clang/Info.plist.app
index 1acbf9d768..56c1e1900c 100644
--- a/mkspecs/macx-ios-clang/Info.plist.app
+++ b/mkspecs/macx-ios-clang/Info.plist.app
@@ -2,40 +2,50 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>CFBundleDisplayName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
- <key>CFBundleIconFile</key>
- <string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string>
- <key>CFBundleIdentifier</key>
- <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>${QMAKE_SHORT_VERSION}</string>
- <key>CFBundleSignature</key>
- <string>${QMAKE_PKGINFO_TYPEINFO}</string>
- <key>CFBundleVersion</key>
- <string>${QMAKE_FULL_VERSION}</string>
- <key>LSRequiresIPhoneOS</key>
- <true/>
- <key>MinimumOSVersion</key>
- <string>${IPHONEOS_DEPLOYMENT_TARGET}</string>
- <key>NOTE</key>
- <string>This file was generated by Qt/QMake.</string>
- <key>UILaunchStoryboardName</key>
- <string>LaunchScreen</string>
- <key>UISupportedInterfaceOrientations</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+
+ <key>CFBundleIconFile</key>
+ <string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string>
+
+ <key>CFBundleIdentifier</key>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
+
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+
+ <key>CFBundleShortVersionString</key>
+ <string>${QMAKE_SHORT_VERSION}</string>
+
+ <key>CFBundleVersion</key>
+ <string>${QMAKE_FULL_VERSION}</string>
+
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+
+ <key>NOTE</key>
+ <string>This file was generated by Qt/QMake.</string>
+
+ <key>UILaunchStoryboardName</key>
+ <string>${IOS_LAUNCH_SCREEN}</string>
+
+ <key>CFBundleDevelopmentRegion</key>
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
+ <key>CFBundleAllowMixedLocalizations</key>
+ <true/>
+
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
</dict>
</plist>
diff --git a/mkspecs/macx-ios-clang/Info.plist.lib b/mkspecs/macx-ios-clang/Info.plist.lib
index ce28365500..34752ec40d 100644
--- a/mkspecs/macx-ios-clang/Info.plist.lib
+++ b/mkspecs/macx-ios-clang/Info.plist.lib
@@ -4,8 +4,6 @@
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
diff --git a/mkspecs/macx-ios-clang/LaunchScreen.storyboard b/mkspecs/macx-ios-clang/LaunchScreen.storyboard
new file mode 100644
index 0000000000..7d8d9a3405
--- /dev/null
+++ b/mkspecs/macx-ios-clang/LaunchScreen.storyboard
@@ -0,0 +1,48 @@
+<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
+<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13142\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">
+ <dependencies>
+ <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"12042\"/>
+ <capability name=\"Constraints with non-1.0 multipliers\" minToolsVersion=\"5.1\"/>
+ <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>
+ <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>
+ </dependencies>
+ <scenes>
+ <!--View Controller-->
+ <scene sceneID=\"EHf-IW-A2E\">
+ <objects>
+ <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">
+ <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">
+ <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>
+ <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>
+ <subviews>
+ <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"obG-Y5-kRd\">
+ <rect key=\"frame\" x=\"0.0\" y=\"626.5\" width=\"375\" height=\"20.5\"/>
+ <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>
+ <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>
+ <nil key=\"highlightedColor\"/>
+ </label>
+ <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"$$TARGET\" textAlignment=\"center\" lineBreakMode=\"middleTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"18\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GJd-Yh-RWb\">
+ <rect key=\"frame\" x=\"0.0\" y=\"202\" width=\"375\" height=\"43\"/>
+ <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"36\"/>
+ <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>
+ <nil key=\"highlightedColor\"/>
+ </label>
+ </subviews>
+ <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>
+ <constraints>
+ <constraint firstItem=\"Bcu-3y-fUS\" firstAttribute=\"centerX\" secondItem=\"obG-Y5-kRd\" secondAttribute=\"centerX\" id=\"5cz-MP-9tL\"/>
+ <constraint firstItem=\"Bcu-3y-fUS\" firstAttribute=\"centerX\" secondItem=\"GJd-Yh-RWb\" secondAttribute=\"centerX\" id=\"Q3B-4B-g5h\"/>
+ <constraint firstItem=\"obG-Y5-kRd\" firstAttribute=\"leading\" secondItem=\"Bcu-3y-fUS\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"SfN-ll-jLj\"/>
+ <constraint firstAttribute=\"bottom\" secondItem=\"obG-Y5-kRd\" secondAttribute=\"bottom\" constant=\"20\" id=\"Y44-ml-fuU\"/>
+ <constraint firstItem=\"GJd-Yh-RWb\" firstAttribute=\"centerY\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"bottom\" multiplier=\"1/3\" constant=\"1\" id=\"moa-c2-u7t\"/>
+ <constraint firstItem=\"GJd-Yh-RWb\" firstAttribute=\"leading\" secondItem=\"Bcu-3y-fUS\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"x7j-FC-K8j\"/>
+ </constraints>
+ <viewLayoutGuide key=\"safeArea\" id=\"Bcu-3y-fUS\"/>
+ </view>
+ </viewController>
+ <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>
+ </objects>
+ <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>
+ </scene>
+ </scenes>
+</document>
diff --git a/mkspecs/macx-ios-clang/LaunchScreen.xib b/mkspecs/macx-ios-clang/LaunchScreen.xib
deleted file mode 100644
index d28c06b375..0000000000
--- a/mkspecs/macx-ios-clang/LaunchScreen.xib
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
-<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"6250\" systemVersion=\"14A343f\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\">
- <dependencies>
- <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"6244\"/>
- <capability name=\"Constraints with non-1.0 multipliers\" minToolsVersion=\"5.1\"/>
- </dependencies>
- <objects>
- <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File\'s Owner\"/>
- <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>
- <view contentMode=\"scaleToFill\" id=\"iN0-l3-epB\">
- <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"480\"/>
- <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>
- <subviews>
- <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" misplaced=\"YES\" text=\"\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8ie-xW-0ye\">
- <rect key=\"frame\" x=\"20\" y=\"439\" width=\"441\" height=\"21\"/>
- <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>
- <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>
- <nil key=\"highlightedColor\"/>
- <variation key=\"widthClass=compact\">
- <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"11\"/>
- </variation>
- </label>
- <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"$$TARGET\"
- textAlignment=\"center\" lineBreakMode=\"middleTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"18\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"kId-c2-rCX\">
- <rect key=\"frame\" x=\"20\" y=\"140\" width=\"441\" height=\"43\"/>
- <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"36\"/>
- <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>
- <nil key=\"highlightedColor\"/>
- </label>
- </subviews>
- <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>
- <constraints>
- <constraint firstItem=\"kId-c2-rCX\" firstAttribute=\"centerY\" secondItem=\"iN0-l3-epB\" secondAttribute=\"bottom\" multiplier=\"1/3\" constant=\"1\" id=\"Kid-kn-2rF\"/>
- <constraint firstAttribute=\"centerX\" secondItem=\"kId-c2-rCX\" secondAttribute=\"centerX\" id=\"Koa-jz-hwk\"/>
- <constraint firstAttribute=\"bottom\" secondItem=\"8ie-xW-0ye\" secondAttribute=\"bottom\" constant=\"20\" id=\"Kzo-t9-V3l\"/>
- <constraint firstItem=\"8ie-xW-0ye\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"MfP-vx-nX0\"/>
- <constraint firstAttribute=\"centerX\" secondItem=\"8ie-xW-0ye\" secondAttribute=\"centerX\" id=\"ZEH-qu-HZ9\"/>
- <constraint firstItem=\"kId-c2-rCX\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"fvb-Df-36g\"/>
- </constraints>
- <nil key=\"simulatedStatusBarMetrics\"/>
- <freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>
- <point key=\"canvasLocation\" x=\"404\" y=\"445\"/>
- </view>
- </objects>
-</document>
diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf
deleted file mode 100644
index 2ed96fc5c7..0000000000
--- a/mkspecs/macx-ios-clang/features/default_post.prf
+++ /dev/null
@@ -1,9 +0,0 @@
-load(default_post)
-
-!xcodebuild:equals(TEMPLATE, app):!isEmpty(QMAKE_INFO_PLIST) {
- # Only link in photo library support if Info.plist contains
- # NSPhotoLibraryUsageDescription. Otherwise it will be rejected from AppStore.
- plist_path = $$absolute_path($$QMAKE_INFO_PLIST, $$_PRO_FILE_PWD_)
- system("/usr/libexec/PlistBuddy -c 'Print NSPhotoLibraryUsageDescription' $$system_quote($$plist_path) &>/dev/null"): \
- QTPLUGIN += qiosnsphotolibrarysupport
-}
diff --git a/mkspecs/macx-ios-clang/qmake.conf b/mkspecs/macx-ios-clang/qmake.conf
index 88e96ef32e..0c20dd2a5b 100644
--- a/mkspecs/macx-ios-clang/qmake.conf
+++ b/mkspecs/macx-ios-clang/qmake.conf
@@ -2,8 +2,6 @@
# qmake configuration for macx-ios-clang
#
-QMAKE_IOS_DEPLOYMENT_TARGET = 11.0
-
# Universal target (iPhone and iPad)
QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 1,2
diff --git a/mkspecs/macx-ios-clang/qplatformdefs.h b/mkspecs/macx-ios-clang/qplatformdefs.h
index 4b085095a8..3c0fa239cb 100644
--- a/mkspecs/macx-ios-clang/qplatformdefs.h
+++ b/mkspecs/macx-ios-clang/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/macx-tvos-clang/qplatformdefs.h b/mkspecs/macx-tvos-clang/qplatformdefs.h
deleted file mode 100644
index f49d2d493c..0000000000
--- a/mkspecs/macx-tvos-clang/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/macx-visionos-clang/Info.plist.app b/mkspecs/macx-visionos-clang/Info.plist.app
new file mode 100644
index 0000000000..df76305bde
--- /dev/null
+++ b/mkspecs/macx-visionos-clang/Info.plist.app
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+
+ <key>CFBundleIconFile</key>
+ <string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string>
+
+ <key>CFBundleIdentifier</key>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
+
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+
+ <key>CFBundleShortVersionString</key>
+ <string>${QMAKE_SHORT_VERSION}</string>
+
+ <key>CFBundleVersion</key>
+ <string>${QMAKE_FULL_VERSION}</string>
+
+ <key>CFBundleDevelopmentRegion</key>
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
+ <key>CFBundleAllowMixedLocalizations</key>
+ <true/>
+
+ <key>CFBundleSupportedPlatforms</key>
+ <array>
+ <string>XROS</string>
+ </array>
+</dict>
+</plist>
diff --git a/mkspecs/macx-visionos-clang/Info.plist.dSYM.in b/mkspecs/macx-visionos-clang/Info.plist.dSYM.in
new file mode 100644
index 0000000000..a8c8d0d4fb
--- /dev/null
+++ b/mkspecs/macx-visionos-clang/Info.plist.dSYM.in
@@ -0,0 +1,18 @@
+<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+<plist version=\"1.0\">
+ <dict>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.xcode.dsym.$${BUNDLEIDENTIFIER}</string>
+ <key>CFBundlePackageType</key>
+ <string>dSYM</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+!!IF !isEmpty(VERSION)
+ <key>CFBundleShortVersionString</key>
+ <string>$${VER_MAJ}.$${VER_MIN}</string>
+ <key>CFBundleVersion</key>
+ <string>$${VER_MAJ}.$${VER_MIN}.$${VER_PAT}</string>
+!!ENDIF
+ </dict>
+</plist>
diff --git a/mkspecs/macx-tvos-clang/Info.plist.lib b/mkspecs/macx-visionos-clang/Info.plist.lib
index ce28365500..34752ec40d 100644
--- a/mkspecs/macx-tvos-clang/Info.plist.lib
+++ b/mkspecs/macx-visionos-clang/Info.plist.lib
@@ -4,8 +4,6 @@
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
diff --git a/mkspecs/macx-visionos-clang/qmake.conf b/mkspecs/macx-visionos-clang/qmake.conf
new file mode 100644
index 0000000000..35d9268573
--- /dev/null
+++ b/mkspecs/macx-visionos-clang/qmake.conf
@@ -0,0 +1,29 @@
+#
+# qmake configuration for visionOS
+#
+
+QMAKE_PLATFORM += visionos
+QMAKE_MAC_SDK = xros
+
+device.sdk = xros
+device.target = device
+device.dir_affix = $${device.sdk}
+device.CONFIG = $${device.sdk}
+device.deployment_identifier =
+
+simulator.sdk = xrsimulator
+simulator.target = simulator
+simulator.dir_affix = $${simulator.sdk}
+simulator.CONFIG = $${simulator.sdk}
+simulator.deployment_identifier =
+
+QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 7
+
+include(../common/uikit.conf)
+include(../common/gcc-base-mac.conf)
+include(../common/clang.conf)
+include(../common/clang-mac.conf)
+include(../common/uikit/clang.conf)
+include(../common/uikit/qmake.conf)
+
+load(qt_config)
diff --git a/mkspecs/macx-visionos-clang/qplatformdefs.h b/mkspecs/macx-visionos-clang/qplatformdefs.h
new file mode 100644
index 0000000000..3c0fa239cb
--- /dev/null
+++ b/mkspecs/macx-visionos-clang/qplatformdefs.h
@@ -0,0 +1,4 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/macx-watchos-clang/qplatformdefs.h b/mkspecs/macx-watchos-clang/qplatformdefs.h
deleted file mode 100644
index f49d2d493c..0000000000
--- a/mkspecs/macx-watchos-clang/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/macx-xcode/QtTest.plist b/mkspecs/macx-xcode/QtTest.plist
index 41dddb1a53..9ee08217ef 100644
--- a/mkspecs/macx-xcode/QtTest.plist
+++ b/mkspecs/macx-xcode/QtTest.plist
@@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
+ <key>CFBundleAllowMixedLocalizations</key>
+ <true/>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
diff --git a/mkspecs/macx-xcode/WorkspaceSettings.xcsettings b/mkspecs/macx-xcode/WorkspaceSettings.xcsettings
index a3f43a8b38..08de0be8d3 100644
--- a/mkspecs/macx-xcode/WorkspaceSettings.xcsettings
+++ b/mkspecs/macx-xcode/WorkspaceSettings.xcsettings
@@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>BuildSystemType</key>
- <string>Original</string>
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
<false/>
</dict>
diff --git a/mkspecs/macx-xcode/default.xcscheme b/mkspecs/macx-xcode/default.xcscheme
index 170174ed2b..355765e964 100644
--- a/mkspecs/macx-xcode/default.xcscheme
+++ b/mkspecs/macx-xcode/default.xcscheme
@@ -64,6 +64,8 @@
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
disableMainThreadChecker = "YES"
+ enableGPUFrameCaptureMode = "3"
+ enableGPUValidationMode = "1"
debugDocumentVersioning = "NO"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
diff --git a/mkspecs/macx-xcode/qplatformdefs.h b/mkspecs/macx-xcode/qplatformdefs.h
index 063491dd90..67ed995fa7 100644
--- a/mkspecs/macx-xcode/qplatformdefs.h
+++ b/mkspecs/macx-xcode/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/netbsd-g++/qplatformdefs.h b/mkspecs/netbsd-g++/qplatformdefs.h
index 0e3fd6b2b8..03b54e9f8f 100644
--- a/mkspecs/netbsd-g++/qplatformdefs.h
+++ b/mkspecs/netbsd-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/openbsd-g++/qplatformdefs.h b/mkspecs/openbsd-g++/qplatformdefs.h
index 0e3fd6b2b8..03b54e9f8f 100644
--- a/mkspecs/openbsd-g++/qplatformdefs.h
+++ b/mkspecs/openbsd-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/qnx-aarch64le-qcc/qplatformdefs.h b/mkspecs/qnx-aarch64le-qcc/qplatformdefs.h
index 46d9fd2fae..bb644cade4 100644
--- a/mkspecs/qnx-aarch64le-qcc/qplatformdefs.h
+++ b/mkspecs/qnx-aarch64le-qcc/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 QNX Software Systems. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 QNX Software Systems. All rights reserved.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../qnx-armle-v7-qcc/qplatformdefs.h"
diff --git a/mkspecs/qnx-armle-v7-qcc/qplatformdefs.h b/mkspecs/qnx-armle-v7-qcc/qplatformdefs.h
index bbf73a4da9..692fb7e769 100644
--- a/mkspecs/qnx-armle-v7-qcc/qplatformdefs.h
+++ b/mkspecs/qnx-armle-v7-qcc/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 - 2014 BlackBerry Limited. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2012 - 2014 BlackBerry Limited. All rights reserved.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/qnx-x86-64-qcc/qplatformdefs.h b/mkspecs/qnx-x86-64-qcc/qplatformdefs.h
index 991b196218..2da46f449a 100644
--- a/mkspecs/qnx-x86-64-qcc/qplatformdefs.h
+++ b/mkspecs/qnx-x86-64-qcc/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 QNX Software Systems. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 QNX Software Systems. All rights reserved.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../qnx-x86-qcc/qplatformdefs.h"
diff --git a/mkspecs/qnx-x86-qcc/qplatformdefs.h b/mkspecs/qnx-x86-qcc/qplatformdefs.h
index bbf73a4da9..692fb7e769 100644
--- a/mkspecs/qnx-x86-qcc/qplatformdefs.h
+++ b/mkspecs/qnx-x86-qcc/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 - 2014 BlackBerry Limited. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2012 - 2014 BlackBerry Limited. All rights reserved.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-cc-64-stlport/qplatformdefs.h b/mkspecs/solaris-cc-64-stlport/qplatformdefs.h
index cac67a3559..c6643d7468 100644
--- a/mkspecs/solaris-cc-64-stlport/qplatformdefs.h
+++ b/mkspecs/solaris-cc-64-stlport/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../solaris-cc-64/qplatformdefs.h"
diff --git a/mkspecs/solaris-cc-64/qplatformdefs.h b/mkspecs/solaris-cc-64/qplatformdefs.h
index f430664a9e..f274cb7ff7 100644
--- a/mkspecs/solaris-cc-64/qplatformdefs.h
+++ b/mkspecs/solaris-cc-64/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-cc-stlport/qplatformdefs.h b/mkspecs/solaris-cc-stlport/qplatformdefs.h
index 621918425f..182ed644ae 100644
--- a/mkspecs/solaris-cc-stlport/qplatformdefs.h
+++ b/mkspecs/solaris-cc-stlport/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../solaris-cc/qplatformdefs.h"
diff --git a/mkspecs/solaris-cc/qplatformdefs.h b/mkspecs/solaris-cc/qplatformdefs.h
index 8350836deb..558f267065 100644
--- a/mkspecs/solaris-cc/qplatformdefs.h
+++ b/mkspecs/solaris-cc/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-g++-64/qplatformdefs.h b/mkspecs/solaris-g++-64/qplatformdefs.h
index ae559183ff..8c702f8438 100644
--- a/mkspecs/solaris-g++-64/qplatformdefs.h
+++ b/mkspecs/solaris-g++-64/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-g++/qplatformdefs.h b/mkspecs/solaris-g++/qplatformdefs.h
index bd14a86b51..4d77910bf3 100644
--- a/mkspecs/solaris-g++/qplatformdefs.h
+++ b/mkspecs/solaris-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/linux-host-g++/qplatformdefs.h b/mkspecs/unsupported/linux-host-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/unsupported/linux-host-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/linux-host-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/unsupported/linux-scratchbox2-g++/qplatformdefs.h b/mkspecs/unsupported/linux-scratchbox2-g++/qplatformdefs.h
index 6a35ed45d5..0ae4146e6c 100644
--- a/mkspecs/unsupported/linux-scratchbox2-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/linux-scratchbox2-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/macx-tvos-clang/Info.plist.app b/mkspecs/unsupported/macx-tvos-clang/Info.plist.app
index 04aef816c2..e94aeb5b92 100644
--- a/mkspecs/macx-tvos-clang/Info.plist.app
+++ b/mkspecs/unsupported/macx-tvos-clang/Info.plist.app
@@ -4,12 +4,12 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
+ <key>CFBundleAllowMixedLocalizations</key>
+ <true/>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
diff --git a/mkspecs/macx-watchos-clang/Info.plist.lib b/mkspecs/unsupported/macx-tvos-clang/Info.plist.lib
index ce28365500..34752ec40d 100644
--- a/mkspecs/macx-watchos-clang/Info.plist.lib
+++ b/mkspecs/unsupported/macx-tvos-clang/Info.plist.lib
@@ -4,8 +4,6 @@
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
diff --git a/mkspecs/macx-tvos-clang/qmake.conf b/mkspecs/unsupported/macx-tvos-clang/qmake.conf
index 77f6a02f7b..f3bd4ad410 100644
--- a/mkspecs/macx-tvos-clang/qmake.conf
+++ b/mkspecs/unsupported/macx-tvos-clang/qmake.conf
@@ -2,7 +2,7 @@
# qmake configuration for macx-tvos-clang
#
-QMAKE_TVOS_DEPLOYMENT_TARGET = 11.0
+QMAKE_TVOS_DEPLOYMENT_TARGET = 13.0
QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 3
diff --git a/mkspecs/unsupported/macx-tvos-clang/qplatformdefs.h b/mkspecs/unsupported/macx-tvos-clang/qplatformdefs.h
new file mode 100644
index 0000000000..17868302f9
--- /dev/null
+++ b/mkspecs/unsupported/macx-tvos-clang/qplatformdefs.h
@@ -0,0 +1,4 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/macx-watchos-clang/Info.plist.app b/mkspecs/unsupported/macx-watchos-clang/Info.plist.app
index 47f5a58d5e..72c2af30b1 100644
--- a/mkspecs/macx-watchos-clang/Info.plist.app
+++ b/mkspecs/unsupported/macx-watchos-clang/Info.plist.app
@@ -4,12 +4,12 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
+ <key>CFBundleAllowMixedLocalizations</key>
+ <true/>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleName</key>
diff --git a/mkspecs/unsupported/macx-watchos-clang/Info.plist.lib b/mkspecs/unsupported/macx-watchos-clang/Info.plist.lib
new file mode 100644
index 0000000000..34752ec40d
--- /dev/null
+++ b/mkspecs/unsupported/macx-watchos-clang/Info.plist.lib
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>${QMAKE_SHORT_VERSION}</string>
+ <key>CFBundleSignature</key>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
+ <key>CFBundleVersion</key>
+ <string>${QMAKE_FULL_VERSION}</string>
+ <key>NOTE</key>
+ <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-watchos-clang/qmake.conf b/mkspecs/unsupported/macx-watchos-clang/qmake.conf
index 8194261275..ad4be38473 100644
--- a/mkspecs/macx-watchos-clang/qmake.conf
+++ b/mkspecs/unsupported/macx-watchos-clang/qmake.conf
@@ -2,7 +2,7 @@
# qmake configuration for macx-watchos-clang
#
-QMAKE_WATCHOS_DEPLOYMENT_TARGET = 4.0
+QMAKE_WATCHOS_DEPLOYMENT_TARGET = 6.0
QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 4
diff --git a/mkspecs/unsupported/macx-watchos-clang/qplatformdefs.h b/mkspecs/unsupported/macx-watchos-clang/qplatformdefs.h
new file mode 100644
index 0000000000..17868302f9
--- /dev/null
+++ b/mkspecs/unsupported/macx-watchos-clang/qplatformdefs.h
@@ -0,0 +1,4 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/unsupported/nacl-g++/qmake.conf b/mkspecs/unsupported/nacl-g++/qmake.conf
deleted file mode 100644
index 581422fcf1..0000000000
--- a/mkspecs/unsupported/nacl-g++/qmake.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# qmake configuration for building with nacl-g++
-#
-
-include(../../common/linux.conf)
-include(../../common/qws.conf)
-include(../../common/gcc-base-unix.conf)
-include(../../common/g++-unix.conf)
-include(../../common/nacl/nacl-base.conf)
-include(../../common/nacl/g++-nacl32.conf)
-
-
-load(qt_config)
diff --git a/mkspecs/unsupported/nacl-g++/qplatformdefs.h b/mkspecs/unsupported/nacl-g++/qplatformdefs.h
deleted file mode 100644
index fbdb8712a5..0000000000
--- a/mkspecs/unsupported/nacl-g++/qplatformdefs.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
-
-#include "../../common/nacl/qplatformdefs.h"
-#include "../../common/posix/qplatformdefs.h"
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/nacl64-g++/qmake.conf b/mkspecs/unsupported/nacl64-g++/qmake.conf
deleted file mode 100644
index fcef45faec..0000000000
--- a/mkspecs/unsupported/nacl64-g++/qmake.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# qmake configuration for building with nacl-g++
-#
-
-include(../../common/linux.conf)
-include(../../common/qws.conf)
-include(../../common/gcc-base-unix.conf)
-include(../../common/g++-unix.conf)
-include(../../common/nacl/nacl64-base.conf)
-include(../../common/nacl/g++-nacl64.conf)
-
-
-load(qt_config)
diff --git a/mkspecs/unsupported/nacl64-g++/qplatformdefs.h b/mkspecs/unsupported/nacl64-g++/qplatformdefs.h
deleted file mode 100644
index fbdb8712a5..0000000000
--- a/mkspecs/unsupported/nacl64-g++/qplatformdefs.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
-
-#include "../../common/nacl/qplatformdefs.h"
-#include "../../common/posix/qplatformdefs.h"
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/qnx-X11-g++/qplatformdefs.h b/mkspecs/unsupported/qnx-X11-g++/qplatformdefs.h
index e090179f52..166905e037 100644
--- a/mkspecs/unsupported/qnx-X11-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/qnx-X11-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
@@ -96,6 +60,4 @@ inline float strtof(const char *b, char **e)
return float(strtod(b, e));
}
-#define QT_QWS_TEMP_DIR QString::fromLatin1(qgetenv("TMP"))
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h b/mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h
index 4161c37a78..005529054b 100644
--- a/mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h
+++ b/mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../vxworks-simpentium-g++/qplatformdefs.h"
diff --git a/mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h b/mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h
index 4161c37a78..005529054b 100644
--- a/mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../vxworks-simpentium-g++/qplatformdefs.h"
diff --git a/mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h b/mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h
index 4161c37a78..005529054b 100644
--- a/mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h
+++ b/mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../vxworks-simpentium-g++/qplatformdefs.h"
diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
index 7365e53d55..c80518252f 100644
--- a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/vxworks-clang/qplatformdefs.h b/mkspecs/vxworks-clang/qplatformdefs.h
new file mode 100644
index 0000000000..a9fd98e333
--- /dev/null
+++ b/mkspecs/vxworks-clang/qplatformdefs.h
@@ -0,0 +1,9 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+#include "../common/vxworks/qplatformdefs.h"
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/wasm-emscripten-64/qmake.conf b/mkspecs/wasm-emscripten-64/qmake.conf
new file mode 100644
index 0000000000..3e03cbc97a
--- /dev/null
+++ b/mkspecs/wasm-emscripten-64/qmake.conf
@@ -0,0 +1,7 @@
+# qmake configuration for building with emscripten
+
+include(../common/wasm/wasm.conf)
+
+QMAKE_CFLAGS += -s MEMORY64=1
+QMAKE_CXXFLAGS += -s MEMORY64=1
+QMAKE_LFLAGS += -s MEMORY64=1
diff --git a/mkspecs/wasm-emscripten-64/qplatformdefs.h b/mkspecs/wasm-emscripten-64/qplatformdefs.h
new file mode 100644
index 0000000000..5117d876f7
--- /dev/null
+++ b/mkspecs/wasm-emscripten-64/qplatformdefs.h
@@ -0,0 +1,9 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+#include "../common/wasm/qplatformdefs.h"
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/wasm-emscripten/qmake.conf b/mkspecs/wasm-emscripten/qmake.conf
index e7b45d312d..dcbd368695 100644
--- a/mkspecs/wasm-emscripten/qmake.conf
+++ b/mkspecs/wasm-emscripten/qmake.conf
@@ -1,77 +1,3 @@
# qmake configuration for building with emscripten
-MAKEFILE_GENERATOR = UNIX
-QMAKE_PLATFORM = wasm unix
-include(../common/gcc-base.conf)
-include(../common/clang.conf)
-
-EMTERP_FLAGS = \
- -s EMTERPRETIFY=1 \
- -s EMTERPRETIFY_ASYNC=1 \
- -s \"EMTERPRETIFY_FILE=\'data.binary\'\" \
- -s ASSERTIONS=1 \
- --profiling-funcs
-
-EMCC_COMMON_LFLAGS = \
- -s WASM=1 \
- -s FULL_ES2=1 \
- -s ALLOW_MEMORY_GROWTH=1 \
- -s USE_WEBGL2=1 \
- -s NO_EXIT_RUNTIME=0 \
- -s ERROR_ON_UNDEFINED_SYMBOLS=1 \
- --bind \
- -s \"BINARYEN_TRAP_MODE=\'clamp\'\"
-
-# The -s arguments can also be used with release builds,
-# but are here in debug for clarity.
-EMCC_COMMON_LFLAGS_DEBUG = \
- $$EMCC_COMMON_LFLAGS \
- -s ASSERTIONS=2 \
- -s DEMANGLE_SUPPORT=1 \
- # -s LIBRARY_DEBUG=1 \ #print out library calls, verbose
- # -s SYSCALL_DEBUG=1 \ #print out sys calls, verbose
- # -s FS_LOG=1 \ #print out filesystem ops, verbose
- # -s SOCKET_DEBUG \ #print out socket,network data transfer
- -s GL_DEBUG=1
-
-QMAKE_COMPILER += emscripten
-
-QMAKE_CC = emcc
-QMAKE_CXX = em++
-
-# Practical debugging setup:
-# "-g4" preserves function names for stack traces
-# "-Os" produces reasonably sized binaries
-QMAKE_CFLAGS_DEBUG -= -g
-QMAKE_CXXFLAGS_DEBUG -= -g
-QMAKE_CFLAGS_DEBUG += -Os -g4
-QMAKE_CXXFLAGS_DEBUG += -Os -g4
-QMAKE_LFLAGS_DEBUG += -Os -g4
-
-QMAKE_CXXFLAGS_RELEASE -= -O2
-QMAKE_CXXFLAGS_RELEASE += -O3
-QMAKE_CFLAGS_RELEASE -= -O2
-QMAKE_CFLAGS_RELEASE += -O3
-QMAKE_LFLAGS_RELEASE += -O3
-QMAKE_CFLAGS_OPTIMIZE += -O3
-QMAKE_CFLAGS_OPTIMIZE_FULL += -Oz
-
-QMAKE_LINK = $$QMAKE_CXX
-QMAKE_LINK_SHLIB = $$QMAKE_CXX
-QMAKE_LINK_C = $$QMAKE_CC
-QMAKE_LINK_C_SHLIB = $$QMAKE_CC
-
-QMAKE_LIBS_THREAD = $$QMAKE_CFLAGS_THREAD
-
-QMAKE_LFLAGS += $$EMCC_COMMON_LFLAGS
-QMAKE_LFLAGS_DEBUG += $$EMCC_COMMON_LFLAGS_DEBUG
-
-QMAKE_PREFIX_SHLIB = lib
-QMAKE_EXTENSION_SHLIB = so # llvm bitcode, linked to js in post_link
-QMAKE_PREFIX_STATICLIB = lib
-QMAKE_EXTENSION_STATICLIB = a # llvm bitcode
-
-QMAKE_AR = emar cqs
-QMAKE_DISTCLEAN += *.html *.js *.wasm
-
-load(qt_config)
+include(../common/wasm/wasm.conf)
diff --git a/mkspecs/wasm-emscripten/qplatformdefs.h b/mkspecs/wasm-emscripten/qplatformdefs.h
index c1a0d7b1a8..5117d876f7 100644
--- a/mkspecs/wasm-emscripten/qplatformdefs.h
+++ b/mkspecs/wasm-emscripten/qplatformdefs.h
@@ -1,181 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-
-#include <unistd.h>
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-#include <features.h>
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#include <dlfcn.h>
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-#define QT_OPEN_EXCL O_EXCL
-
-// Directory iteration
-#define QT_DIR DIR
-
-#define QT_OPENDIR ::opendir
-#define QT_CLOSEDIR ::closedir
-
-#if defined(QT_LARGEFILE_SUPPORT) \
- && defined(QT_USE_XOPEN_LFS_EXTENSIONS) \
- && !defined(QT_NO_READDIR64)
-#define QT_DIRENT struct dirent64
-#define QT_READDIR ::readdir64
-#define QT_READDIR_R ::readdir64_r
-#else
-#define QT_DIRENT struct dirent
-#define QT_READDIR ::readdir
-#define QT_READDIR_R ::readdir_r
-#endif
-
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T socklen_t
-
-#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-#endif
+#include "../common/wasm/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/win32-arm64-msvc2017/qmake.conf b/mkspecs/win32-arm64-msvc/qmake.conf
index ee10f9cc40..483bfa5e51 100644
--- a/mkspecs/win32-arm64-msvc2017/qmake.conf
+++ b/mkspecs/win32-arm64-msvc/qmake.conf
@@ -1,5 +1,5 @@
#
-# qmake configuration for win32-arm64-msvc2017
+# qmake configuration for win32-arm64-msvc
#
# Written for Microsoft C/C++ Optimizing Compiler targeting arm64.
#
diff --git a/mkspecs/win32-arm64-msvc/qplatformdefs.h b/mkspecs/win32-arm64-msvc/qplatformdefs.h
new file mode 100644
index 0000000000..c7c337a6ba
--- /dev/null
+++ b/mkspecs/win32-arm64-msvc/qplatformdefs.h
@@ -0,0 +1,4 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "../win32-msvc/qplatformdefs.h"
diff --git a/mkspecs/win32-arm64-msvc2017/qplatformdefs.h b/mkspecs/win32-arm64-msvc2017/qplatformdefs.h
deleted file mode 100644
index 8a3afa7630..0000000000
--- a/mkspecs/win32-arm64-msvc2017/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../win32-msvc/qplatformdefs.h"
diff --git a/mkspecs/win32-clang-g++/qmake.conf b/mkspecs/win32-clang-g++/qmake.conf
index 4630ec4602..59d42176f0 100644
--- a/mkspecs/win32-clang-g++/qmake.conf
+++ b/mkspecs/win32-clang-g++/qmake.conf
@@ -24,4 +24,12 @@ QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_LINK = $${CROSS_COMPILE}clang++
QMAKE_LINK_C = $${CROSS_COMPILE}clang
+QMAKE_CFLAGS_LTCG = -flto=thin
+QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
+QMAKE_CFLAGS_LTCG_FATOBJECTS = -flto
+QMAKE_CXXFLAGS_LTCG_FATOBJECTS = $$QMAKE_CFLAGS_LTCG_FATOBJECTS
+QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
+
+QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz
+
load(qt_config)
diff --git a/mkspecs/win32-clang-g++/qplatformdefs.h b/mkspecs/win32-clang-g++/qplatformdefs.h
index 906e724c19..cc83e9920f 100644
--- a/mkspecs/win32-clang-g++/qplatformdefs.h
+++ b/mkspecs/win32-clang-g++/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../win32-g++/qplatformdefs.h"
diff --git a/mkspecs/win32-clang-msvc/qmake.conf b/mkspecs/win32-clang-msvc/qmake.conf
index 4b9cac3e22..be7cdaa396 100644
--- a/mkspecs/win32-clang-msvc/qmake.conf
+++ b/mkspecs/win32-clang-msvc/qmake.conf
@@ -15,6 +15,7 @@ QMAKE_CFLAGS_AVX = -mavx
QMAKE_CFLAGS_AVX2 = -mavx2
QMAKE_CFLAGS_F16C = -mf16c
QMAKE_CFLAGS_RDRND = -mrdrnd
+QMAKE_CFLAGS_RDSEED = -mrdseed
QMAKE_CFLAGS_AVX512F = -mavx512f
QMAKE_CFLAGS_AVX512ER = -mavx512er
QMAKE_CFLAGS_AVX512CD = -mavx512cd
@@ -39,12 +40,19 @@ QMAKE_CXXFLAGS += -Wno-microsoft-enum-value
QMAKE_LINK = lld-link
QMAKE_LIB = llvm-lib /NOLOGO
-QMAKE_CFLAGS_LTCG = -flto
+QMAKE_CXXFLAGS_CXX11 = -std:c++11
+QMAKE_CXXFLAGS_CXX14 = -std:c++14
+QMAKE_CXXFLAGS_CXX1Z = -std:c++17
+QMAKE_CXXFLAGS_CXX2A = -std:c++latest
+
+QMAKE_CFLAGS_LTCG = -flto=thin
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
+QMAKE_CFLAGS_LTCG_FATOBJECTS = -flto
+QMAKE_CXXFLAGS_LTCG_FATOBJECTS = $$QMAKE_CFLAGS_LTCG_FATOBJECTS
# Leave QMAKE_LFLAGS_LTCG empty because lld-link doesn't need any additional parameters
QMAKE_LFLAGS_LTCG =
-# Precompiled headers are not supported yet by clang
-CONFIG -= precompile_header
+QMAKE_CFLAGS_OPTIMIZE_SIZE = /clang:-Oz
+QMAKE_CFLAGS_OPTIMIZE_FULL = /clang:-O3
load(qt_config)
diff --git a/mkspecs/win32-clang-msvc/qplatformdefs.h b/mkspecs/win32-clang-msvc/qplatformdefs.h
index 8a3afa7630..c7c337a6ba 100644
--- a/mkspecs/win32-clang-msvc/qplatformdefs.h
+++ b/mkspecs/win32-clang-msvc/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../win32-msvc/qplatformdefs.h"
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
index 5e9923357f..1987fa77d4 100644
--- a/mkspecs/win32-g++/qmake.conf
+++ b/mkspecs/win32-g++/qmake.conf
@@ -8,6 +8,7 @@
#
include(../common/g++-win32.conf)
+include(../common/windows-desktop.conf)
# modifications to g++-win32.conf
@@ -18,6 +19,7 @@ QMAKE_CFLAGS_WARN_ON += -Wextra
QMAKE_CXX = $${CROSS_COMPILE}g++
QMAKE_CXXFLAGS += -fno-keep-inline-dllexport
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_EXCEPTIONS_ON += -mthreads
QMAKE_LINK = $${CROSS_COMPILE}g++
QMAKE_LINK_C = $${CROSS_COMPILE}gcc
@@ -25,5 +27,6 @@ QMAKE_LINK_C = $${CROSS_COMPILE}gcc
QMAKE_CFLAGS_LTCG = -flto
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
+QMAKE_LFLAGS_EXCEPTIONS_ON += -mthreads
load(qt_config)
diff --git a/mkspecs/win32-g++/qplatformdefs.h b/mkspecs/win32-g++/qplatformdefs.h
index c5a70b1445..b50dd002df 100644
--- a/mkspecs/win32-g++/qplatformdefs.h
+++ b/mkspecs/win32-g++/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
@@ -46,6 +10,8 @@
#endif
#endif
+#include <unistd.h> // Defines _POSIX_THREAD_SAFE_FUNCTIONS and others
+
// Get Qt defines/settings
#include "qglobal.h"
diff --git a/mkspecs/win32-icc-k1om/qplatformdefs.h b/mkspecs/win32-icc-k1om/qplatformdefs.h
index 8a3afa7630..c7c337a6ba 100644
--- a/mkspecs/win32-icc-k1om/qplatformdefs.h
+++ b/mkspecs/win32-icc-k1om/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../win32-msvc/qplatformdefs.h"
diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf
index 3cb0d58824..65d1aa1c7e 100644
--- a/mkspecs/win32-icc/qmake.conf
+++ b/mkspecs/win32-icc/qmake.conf
@@ -22,7 +22,7 @@ QMAKE_CFLAGS_WARN_OFF = -W0
QMAKE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_OPTIMIZE_DEBUG -Zi -MDd
QMAKE_CFLAGS_UTF8_SOURCE = -Qoption,cpp,--unicode_source_kind,UTF-8
QMAKE_CFLAGS_LTCG = -Qipo
-QMAKE_CFLAGS_DISABLE_LTCG = -Qno-ipo
+QMAKE_CFLAGS_DISABLE_LTCG = -Qipo-
QMAKE_CFLAGS_SSE2 = -QxSSE2
QMAKE_CFLAGS_SSE3 = -QxSSE3
@@ -38,9 +38,21 @@ QMAKE_CFLAGS_AVX512PF += -QxMIC-AVX512
QMAKE_CFLAGS_AVX512DQ += -QxCORE-AVX512
QMAKE_CFLAGS_AVX512BW += -QxCORE-AVX512
QMAKE_CFLAGS_AVX512VL += -QxCORE-AVX512
+QMAKE_CFLAGS_AVX512VNNI += -QxCASCADELAKE
+QMAKE_CFLAGS_AVX512IFMA += -QxICELAKE-CLIENT # technically, cannonlake
+QMAKE_CFLAGS_AVX512VBMI += -QxICELAKE-CLIENT # ditto
+QMAKE_CFLAGS_AVX512VBMI2 += QxICELAKE-CLIENT
+QMAKE_CFLAGS_AVX512BITALG += QxICELAKE-CLIENT
+QMAKE_CFLAGS_AVX512POPCNTDQ += QxICELAKE-CLIENT
QMAKE_CFLAGS_F16C = $$QMAKE_CFLAGS_AVX2
+QMAKE_CFLAGS_RDRND = $$QMAKE_CFLAGS_AVX2
+# ICC on Windows lacks the mrdseed compiler option that sets the RDSEED macro
+QMAKE_CFLAGS_RDSEED = -D__RDSEED__=1
+QMAKE_CFLAGS_ARCH_HASWELL = $$QMAKE_CFLAGS_AVX2
+
QMAKE_CFLAGS_AESNI = -QxSSE2
QMAKE_CFLAGS_SHANI = -QxSSE4.2
+QMAKE_CFLAGS_VAES = -QxCORE-AVX512
QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS += -Qprec -Zm200 -Zc:forScope
diff --git a/mkspecs/win32-icc/qplatformdefs.h b/mkspecs/win32-icc/qplatformdefs.h
index 8a3afa7630..c7c337a6ba 100644
--- a/mkspecs/win32-icc/qplatformdefs.h
+++ b/mkspecs/win32-icc/qplatformdefs.h
@@ -1,40 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "../win32-msvc/qplatformdefs.h"
diff --git a/mkspecs/win32-msvc/qplatformdefs.h b/mkspecs/win32-msvc/qplatformdefs.h
index de806985cb..cafbe8eb60 100644
--- a/mkspecs/win32-msvc/qplatformdefs.h
+++ b/mkspecs/win32-msvc/qplatformdefs.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
diff --git a/mkspecs/winrt-arm-msvc2015/qmake.conf b/mkspecs/winrt-arm-msvc2015/qmake.conf
deleted file mode 100644
index bc113d4954..0000000000
--- a/mkspecs/winrt-arm-msvc2015/qmake.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# qmake configuration for winrt-arm-msvc2015
-#
-# Written for Microsoft Visual C++ 2015
-#
-
-include(../common/winrt_winphone/qmake.conf)
-DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__
-
-QMAKE_CFLAGS += -FS
-QMAKE_CXXFLAGS += -FS
-QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib
-
-QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
-
-VCPROJ_ARCH = ARM
-WINSDK_VER = 10.0
-WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
-WINRT_MANIFEST.architecture = arm
diff --git a/mkspecs/winrt-arm-msvc2015/qplatformdefs.h b/mkspecs/winrt-arm-msvc2015/qplatformdefs.h
deleted file mode 100644
index 2a1aef5e88..0000000000
--- a/mkspecs/winrt-arm-msvc2015/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-arm-msvc2017/qmake.conf b/mkspecs/winrt-arm-msvc2017/qmake.conf
deleted file mode 100644
index 1160d5766d..0000000000
--- a/mkspecs/winrt-arm-msvc2017/qmake.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# qmake configuration for winrt-arm-msvc2017
-#
-# Written for Microsoft Visual C++ 2017
-#
-
-include(../common/winrt_winphone/qmake.conf)
-DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__
-
-QMAKE_CFLAGS += -FS
-QMAKE_CXXFLAGS += -FS
-QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib
-
-QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
-
-VCPROJ_ARCH = ARM
-WINSDK_VER = 10.0
-WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
-WINRT_MANIFEST.architecture = arm
diff --git a/mkspecs/winrt-arm-msvc2017/qplatformdefs.h b/mkspecs/winrt-arm-msvc2017/qplatformdefs.h
deleted file mode 100644
index 907834d385..0000000000
--- a/mkspecs/winrt-arm-msvc2017/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-arm-msvc2019/qmake.conf b/mkspecs/winrt-arm-msvc2019/qmake.conf
deleted file mode 100644
index fe30a843eb..0000000000
--- a/mkspecs/winrt-arm-msvc2019/qmake.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# qmake configuration for winrt-arm-msvc2019
-#
-# Written for Microsoft Visual C++ 2019
-#
-
-include(../common/winrt_winphone/qmake.conf)
-DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__
-
-QMAKE_CFLAGS += -FS
-QMAKE_CXXFLAGS += -FS
-QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib
-
-QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
-
-VCPROJ_ARCH = ARM
-WINSDK_VER = 10.0
-WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
-WINRT_MANIFEST.architecture = arm
diff --git a/mkspecs/winrt-arm-msvc2019/qplatformdefs.h b/mkspecs/winrt-arm-msvc2019/qplatformdefs.h
deleted file mode 100644
index 4222bca8e1..0000000000
--- a/mkspecs/winrt-arm-msvc2019/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-arm64-msvc2017/qmake.conf b/mkspecs/winrt-arm64-msvc2017/qmake.conf
deleted file mode 100644
index e53c9ba748..0000000000
--- a/mkspecs/winrt-arm64-msvc2017/qmake.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# qmake configuration for winrt-arm64-msvc2017
-#
-# Written for Microsoft Visual C++ 2017
-#
-
-include(../common/winrt_winphone/qmake.conf)
-DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 arm64 __arm64__ __arm64__
-
-QMAKE_CFLAGS += -FS
-QMAKE_CXXFLAGS += -FS
-QMAKE_LFLAGS += /MACHINE:arm64 /NODEFAULTLIB:kernel32.lib
-
-QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
-
-VCPROJ_ARCH = arm64
-WINSDK_VER = 10.0
-WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
-WINRT_MANIFEST.architecture = arm64
diff --git a/mkspecs/winrt-arm64-msvc2017/qplatformdefs.h b/mkspecs/winrt-arm64-msvc2017/qplatformdefs.h
deleted file mode 100644
index 4222bca8e1..0000000000
--- a/mkspecs/winrt-arm64-msvc2017/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-arm64-msvc2019/qmake.conf b/mkspecs/winrt-arm64-msvc2019/qmake.conf
deleted file mode 100644
index 8c16e93d26..0000000000
--- a/mkspecs/winrt-arm64-msvc2019/qmake.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# qmake configuration for winrt-arm64-msvc2019
-#
-# Written for Microsoft Visual C++ 2019
-#
-
-include(../common/winrt_winphone/qmake.conf)
-DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 arm64 __arm64__ __arm64__
-
-QMAKE_CFLAGS += -FS
-QMAKE_CXXFLAGS += -FS
-QMAKE_LFLAGS += /MACHINE:arm64 /NODEFAULTLIB:kernel32.lib
-
-QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
-
-VCPROJ_ARCH = arm64
-WINSDK_VER = 10.0
-WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
-WINRT_MANIFEST.architecture = arm64
diff --git a/mkspecs/winrt-arm64-msvc2019/qplatformdefs.h b/mkspecs/winrt-arm64-msvc2019/qplatformdefs.h
deleted file mode 100644
index 4222bca8e1..0000000000
--- a/mkspecs/winrt-arm64-msvc2019/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-x64-msvc2015/qmake.conf b/mkspecs/winrt-x64-msvc2015/qmake.conf
deleted file mode 100644
index d1d1eb6513..0000000000
--- a/mkspecs/winrt-x64-msvc2015/qmake.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# qmake configuration for winrt-x64-msvc2015
-#
-# Written for Microsoft Visual C++ 2015
-#
-
-include(../common/winrt_winphone/qmake.conf)
-DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__
-
-QMAKE_CFLAGS += -FS
-QMAKE_CXXFLAGS += -FS
-QMAKE_LFLAGS += /MACHINE:X64 /NODEFAULTLIB:kernel32.lib
-
-QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
-
-VCPROJ_ARCH = x64
-WINSDK_VER = 10.0
-WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
-WINRT_MANIFEST.architecture = x64
diff --git a/mkspecs/winrt-x64-msvc2015/qplatformdefs.h b/mkspecs/winrt-x64-msvc2015/qplatformdefs.h
deleted file mode 100644
index 2a1aef5e88..0000000000
--- a/mkspecs/winrt-x64-msvc2015/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-x64-msvc2017/qmake.conf b/mkspecs/winrt-x64-msvc2017/qmake.conf
deleted file mode 100644
index dce896bd47..0000000000
--- a/mkspecs/winrt-x64-msvc2017/qmake.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# qmake configuration for winrt-x64-msvc2017
-#
-# Written for Microsoft Visual C++ 2017
-#
-
-include(../common/winrt_winphone/qmake.conf)
-DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__
-
-QMAKE_CFLAGS += -FS
-QMAKE_CXXFLAGS += -FS
-QMAKE_LFLAGS += /MACHINE:X64 /NODEFAULTLIB:kernel32.lib
-
-QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
-
-VCPROJ_ARCH = x64
-WINSDK_VER = 10.0
-WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
-WINRT_MANIFEST.architecture = x64
diff --git a/mkspecs/winrt-x64-msvc2017/qplatformdefs.h b/mkspecs/winrt-x64-msvc2017/qplatformdefs.h
deleted file mode 100644
index 2a1aef5e88..0000000000
--- a/mkspecs/winrt-x64-msvc2017/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-x64-msvc2019/qmake.conf b/mkspecs/winrt-x64-msvc2019/qmake.conf
deleted file mode 100644
index 0d3b6d2196..0000000000
--- a/mkspecs/winrt-x64-msvc2019/qmake.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# qmake configuration for winrt-x64-msvc2019
-#
-# Written for Microsoft Visual C++ 2019
-#
-
-include(../common/winrt_winphone/qmake.conf)
-DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__
-
-QMAKE_CFLAGS += -FS
-QMAKE_CXXFLAGS += -FS
-QMAKE_LFLAGS += /MACHINE:X64 /NODEFAULTLIB:kernel32.lib
-
-QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
-
-VCPROJ_ARCH = x64
-WINSDK_VER = 10.0
-WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
-WINRT_MANIFEST.architecture = x64
diff --git a/mkspecs/winrt-x64-msvc2019/qplatformdefs.h b/mkspecs/winrt-x64-msvc2019/qplatformdefs.h
deleted file mode 100644
index 4222bca8e1..0000000000
--- a/mkspecs/winrt-x64-msvc2019/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-x86-msvc2015/qmake.conf b/mkspecs/winrt-x86-msvc2015/qmake.conf
deleted file mode 100644
index 06f059b600..0000000000
--- a/mkspecs/winrt-x86-msvc2015/qmake.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# qmake configuration for winrt-x86-msvc2015
-#
-# Written for Microsoft Visual C++ 2015
-#
-
-include(../common/winrt_winphone/qmake.conf)
-DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__
-
-QMAKE_CFLAGS += -FS
-QMAKE_CXXFLAGS += -FS
-QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 /NODEFAULTLIB:kernel32.lib
-
-QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
-VCPROJ_ARCH = Win32
-WINSDK_VER = 10.0
-WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
-WINRT_MANIFEST.architecture = x86
diff --git a/mkspecs/winrt-x86-msvc2015/qplatformdefs.h b/mkspecs/winrt-x86-msvc2015/qplatformdefs.h
deleted file mode 100644
index 2a1aef5e88..0000000000
--- a/mkspecs/winrt-x86-msvc2015/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-x86-msvc2017/qmake.conf b/mkspecs/winrt-x86-msvc2017/qmake.conf
deleted file mode 100644
index 94fb68f6c0..0000000000
--- a/mkspecs/winrt-x86-msvc2017/qmake.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# qmake configuration for winrt-x86-msvc2017
-#
-# Written for Microsoft Visual C++ 2017
-#
-
-include(../common/winrt_winphone/qmake.conf)
-DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__
-
-QMAKE_CFLAGS += -FS
-QMAKE_CXXFLAGS += -FS
-QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 /NODEFAULTLIB:kernel32.lib
-
-QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
-VCPROJ_ARCH = Win32
-WINSDK_VER = 10.0
-WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
-WINRT_MANIFEST.architecture = x86
diff --git a/mkspecs/winrt-x86-msvc2017/qplatformdefs.h b/mkspecs/winrt-x86-msvc2017/qplatformdefs.h
deleted file mode 100644
index 2a1aef5e88..0000000000
--- a/mkspecs/winrt-x86-msvc2017/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-x86-msvc2019/qmake.conf b/mkspecs/winrt-x86-msvc2019/qmake.conf
deleted file mode 100644
index 8948e20ab1..0000000000
--- a/mkspecs/winrt-x86-msvc2019/qmake.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# qmake configuration for winrt-x86-msvc2019
-#
-# Written for Microsoft Visual C++ 2019
-#
-
-include(../common/winrt_winphone/qmake.conf)
-DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__
-
-QMAKE_CFLAGS += -FS
-QMAKE_CXXFLAGS += -FS
-QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 /NODEFAULTLIB:kernel32.lib
-
-QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
-VCPROJ_ARCH = Win32
-WINSDK_VER = 10.0
-WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
-WINRT_MANIFEST.architecture = x86
diff --git a/mkspecs/winrt-x86-msvc2019/qplatformdefs.h b/mkspecs/winrt-x86-msvc2019/qplatformdefs.h
deleted file mode 100644
index 4222bca8e1..0000000000
--- a/mkspecs/winrt-x86-msvc2019/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/winrt_winphone/qplatformdefs.h"