diff options
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/common/qcc-base-qnx.conf | 10 | ||||
-rw-r--r-- | mkspecs/features/default_post.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/qml_module.prf | 14 | ||||
-rw-r--r-- | mkspecs/features/qt.prf | 11 | ||||
-rw-r--r-- | mkspecs/features/qt_common.prf | 28 | ||||
-rw-r--r-- | mkspecs/features/testcase.prf | 12 | ||||
-rw-r--r-- | mkspecs/macx-clang/Info.plist.disable_highdpi | 8 |
7 files changed, 66 insertions, 19 deletions
diff --git a/mkspecs/common/qcc-base-qnx.conf b/mkspecs/common/qcc-base-qnx.conf index 148645b4e9..21ce269006 100644 --- a/mkspecs/common/qcc-base-qnx.conf +++ b/mkspecs/common/qcc-base-qnx.conf @@ -42,9 +42,13 @@ QMAKE_INCDIR_POST = $${QNX_DIR}/usr/include $${QNX_DIR}/usr/include/freety QMAKE_LIBDIR_POST = $${QNX_DIR}/$${QNX_CPUDIR}/lib $${QNX_DIR}/$${QNX_CPUDIR}/usr/lib QMAKE_RPATHLINKDIR_POST += $${QNX_DIR}/$${QNX_CPUDIR}/lib $${QNX_DIR}/$${QNX_CPUDIR}/usr/lib -QMAKE_CXXFLAGS_CXX11 = -Wc,-std=gnu++11 -QMAKE_CXXFLAGS_CXX14 = -Wc,-std=gnu++1y -QMAKE_CXXFLAGS_CXX1Z = -Wc,-std=gnu++1z +QMAKE_CXXFLAGS_CXX11 = +QMAKE_CXXFLAGS_CXX14 = +QMAKE_CXXFLAGS_CXX1Z = + +QMAKE_CXXFLAGS_GNUCXX11 = -Wc,-std=gnu++11 +QMAKE_CXXFLAGS_GNUCXX14 = -Wc,-std=gnu++1y +QMAKE_CXXFLAGS_GNUCXX1Z = -Wc,-std=gnu++1z QMAKE_LINK_C = $$QMAKE_CC QMAKE_LINK_C_SHLIB = $$QMAKE_CC diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 9eba5bcf00..5367b17973 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -134,7 +134,7 @@ c++11|c++14|c++1z { isEmpty(QMAKE_CXXFLAGS_GNU$$cxxstd) { strict_c++: QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_STRICTCXX } else { - !strict_c++: cxxstd = GNU$$cxxstd + !strict_c++|isEmpty(QMAKE_CXXFLAGS_$$cxxstd): cxxstd = GNU$$cxxstd } QMAKE_CXXFLAGS += $$eval(QMAKE_CXXFLAGS_$$cxxstd) diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index 4db0040dc5..65212b2abf 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -31,13 +31,17 @@ qml1_target { instbase = $$[QT_INSTALL_QML] } -!qml1_target:static: CONFIG += builtin_resources +!qml1_target:static: \ + CONFIG += builtin_resources +else: \ + CONFIG += install_qml_files builtin_resources { URITARGET = $$replace(URI, "\\.", "_") - # Ensure the QML files are included in the resources. In static builds, - # the QML engine reads also the qmldir file from the resources. - $${URITARGET}.files = $$qmldir_file $$fq_qml_files + # In static builds, the QML engine reads also the qmldir file from the resources. + static: $${URITARGET}.files = $$qmldir_file + # Ensure the QML files are included in the resources. + $${URITARGET}.files += $$fq_qml_files # qt-project.org/imports is the path used for locating imports inside the resources $${URITARGET}.prefix = /qt-project.org/imports/$$TARGETPATH RESOURCES += $${URITARGET} @@ -47,7 +51,7 @@ builtin_resources { qmldir.base = $$_PRO_FILE_PWD_ # Tools need qmldir and plugins.qmltypes always installed on the file system qmldir.files = $$qmldir_file $$fq_aux_qml_files -!builtin_resources: qmldir.files += $$fq_qml_files +install_qml_files: qmldir.files += $$fq_qml_files qmldir.path = $$instbase/$$TARGETPATH INSTALLS += qmldir diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index b57afcf72d..90e318e2a4 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -230,7 +230,16 @@ for(ever) { QMAKE_FRAMEWORKPATH *= $$MODULE_FRAMEWORKS !isEmpty(MODULE_MODULE) { contains(MODULE_CONFIG, lib_bundle) { - LIBS$$var_sfx += -framework $$MODULE_MODULE + framework = $$MODULE_MODULE + qtConfig(debug_and_release):!macx-xcode { + platform_target_suffix = $$qtPlatformTargetSuffix() + !isEmpty(platform_target_suffix): \ + # The -framework linker argument supports a name[,suffix] version, + # where if the suffix is specified the framework is first searched + # for the library with the suffix and then without. + framework = $$framework,$$platform_target_suffix + } + LIBS$$var_sfx += -framework $$framework } else { !isEmpty(MODULE_LIBS_ADD): \ LIBS$$var_sfx += -L$$MODULE_LIBS_ADD diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index f4ae5bde80..93f9a2429d 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -56,17 +56,27 @@ host_build:cross_compile: return() # -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 - # 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. - apple_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION} - darwin:if(versionAtLeast(clang_ver, 5.0)|versionAtLeast(apple_ver, 9.0)): \ + versionAtLeast(clang_ver, 3.6)|versionAtLeast(apple_ver, 6.3): \ + QMAKE_CXXFLAGS_WARN_ON += -Winconsistent-missing-override + + darwin { QMAKE_CXXFLAGS_WARN_ON += \ - -Werror=unguarded-availability \ - -Werror=unguarded-availability-new \ - -Werror=unsupported-availability-guard + -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 introduced -Wdate-time @@ -82,11 +92,11 @@ warnings_are_errors:warning_clean { # 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 + # 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-5.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]")|contains(reg_ver, "[34]\\.|5\\.0") { + contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]|7\\.[0123]|8\\.[0123]|9\\.[012]")|contains(reg_ver, "[34]\\.|5\\.0") { QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR } } else:intel_icc:linux { diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf index 8d51c9d028..3bbaf4575a 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf @@ -9,6 +9,18 @@ testcase_exceptions: CONFIG += exceptions # Set in qt_build_config.prf testcase_no_bundle: CONFIG -= app_bundle +# Allow testcases to mark themselves as not supporting high-DPI +testcase_lowdpi { + macos { + !isEmpty(QMAKE_INFO_PLIST): \ + error("QMAKE_INFO_PLIST already set, can't apply testcase_lowdpi") + + QMAKE_INFO_PLIST = $$QMAKESPEC/Info.plist.disable_highdpi + } else { + # TODO: Add support for other platforms if possible + } +} + benchmark: type = benchmark else: type = check diff --git a/mkspecs/macx-clang/Info.plist.disable_highdpi b/mkspecs/macx-clang/Info.plist.disable_highdpi new file mode 100644 index 0000000000..a9b89888ad --- /dev/null +++ b/mkspecs/macx-clang/Info.plist.disable_highdpi @@ -0,0 +1,8 @@ +<?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>NSHighResolutionCapable</key> + <string>NO</string> +</dict> +</plist> |