diff options
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/coverage.prf | 6 | ||||
-rw-r--r-- | mkspecs/features/create_cmake.prf | 6 | ||||
-rw-r--r-- | mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 31 | ||||
-rw-r--r-- | mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in | 22 | ||||
-rw-r--r-- | mkspecs/features/metatypes.prf | 52 | ||||
-rw-r--r-- | mkspecs/features/qml_plugin.prf | 5 | ||||
-rw-r--r-- | mkspecs/features/qt_common.prf | 4 | ||||
-rw-r--r-- | mkspecs/features/sanitizer.prf | 6 | ||||
-rw-r--r-- | mkspecs/features/simd.prf | 6 | ||||
-rw-r--r-- | mkspecs/features/wasm/default_pre.prf | 2 |
10 files changed, 131 insertions, 9 deletions
diff --git a/mkspecs/features/coverage.prf b/mkspecs/features/coverage.prf index b8b37e1b80..5ae746f0b7 100644 --- a/mkspecs/features/coverage.prf +++ b/mkspecs/features/coverage.prf @@ -5,3 +5,9 @@ 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 0e71fd0015..24ed125f12 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -176,7 +176,7 @@ contains(CONFIG, plugin) { list_plugin_extends = for (p, PLUGIN_EXTENDS) { m = $$cmakeModuleName($$p) - list_plugin_extends += Qt5::$$m + list_plugin_extends += Qt::$$m } CMAKE_PLUGIN_EXTENDS = $$join(list_plugin_extends, ";") } @@ -290,6 +290,10 @@ 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}_debug.a diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index 1099a761ce..4c3086a1f6 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -415,6 +415,15 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) !!ENDIF !!ENDIF + + # Add a versionless target, for compatibility with Qt6. + if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::$${CMAKE_MODULE_NAME}) + add_library(Qt::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) + set_target_properties(Qt::$${CMAKE_MODULE_NAME} PROPERTIES + INTERFACE_LINK_LIBRARIES \"Qt5::$${CMAKE_MODULE_NAME}\" + ) + endif() + !!IF !equals(TEMPLATE, aux) !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK) set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1) @@ -429,6 +438,20 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) 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, ";")) + # Qt 6 forward compatible properties. + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} + PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_ENABLED_PUBLIC_FEATURES + $$join(QT.$${MODULE}.enabled_features, ";")) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} + PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_DISABLED_PUBLIC_FEATURES + $$join(QT.$${MODULE}.disabled_features, ";")) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} + PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_ENABLED_PRIVATE_FEATURES + $$join(QT.$${MODULE}_private.enabled_features, ";")) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} + PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_DISABLED_PRIVATE_FEATURES + $$join(QT.$${MODULE}_private.disabled_features, ";")) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\") set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE) @@ -452,6 +475,14 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY INTERFACE_LINK_LIBRARIES Qt5::$${CMAKE_MODULE_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS} ) + + # Add a versionless target, for compatibility with Qt6. + if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::$${CMAKE_MODULE_NAME}Private) + add_library(Qt::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED) + set_target_properties(Qt::$${CMAKE_MODULE_NAME}Private PROPERTIES + INTERFACE_LINK_LIBRARIES \"Qt5::$${CMAKE_MODULE_NAME}Private\" + ) + endif() endif() !!IF !equals(TEMPLATE, aux) diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in index 7b70cfed09..b550a52c60 100644 --- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in +++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in @@ -75,19 +75,30 @@ endif() set(_user_specified_genex \"$<IN_LIST:Qt5::$$CMAKE_PLUGIN_NAME,${_manual_plugins_genex};${_plugin_type_genex}>\" ) +set(_user_specified_genex_versionless + \"$<IN_LIST:Qt::$$CMAKE_PLUGIN_NAME,${_manual_plugins_genex};${_plugin_type_genex}>\" +) string(CONCAT _plugin_genex \"$<$<OR:\" - # Add this plugin if it\'s in the list of manual plugins or plugins for the type + # Add this plugin if it\'s in the list of manually specified plugins or in the list of + # explicitly included plugin types. \"${_user_specified_genex},\" - # Add this plugin if the list of plugins for the type is empty, the PLUGIN_EXTENDS - # is either empty or equal to the module name, and the user hasn\'t blacklisted it + \"${_user_specified_genex_versionless},\" + # Add this plugin if all of the following are true: + # 1) the list of explicitly included plugin types is empty + # 2) the QT_PLUGIN_EXTENDS property for the plugin is empty or equal to the current + # module name + # 3) the user hasn\'t explicitly excluded the plugin. \"$<AND:\" \"$<STREQUAL:${_plugin_type_genex},>,\" \"$<OR:\" - \"$<STREQUAL:$<TARGET_PROPERTY:Qt5::$${CMAKE_PLUGIN_NAME},QT_PLUGIN_EXTENDS>,Qt5::$${CMAKE_MODULE_NAME}>,\" + # FIXME: The value of CMAKE_MODULE_NAME seems to be wrong (e.g for Svg plugin + # it should be Qt::Svg instead of Qt::Gui). + \"$<STREQUAL:$<TARGET_PROPERTY:Qt5::$${CMAKE_PLUGIN_NAME},QT_PLUGIN_EXTENDS>,Qt::$${CMAKE_MODULE_NAME}>,\" \"$<STREQUAL:$<TARGET_PROPERTY:Qt5::$${CMAKE_PLUGIN_NAME},QT_PLUGIN_EXTENDS>,>\" \">,\" - \"$<NOT:$<IN_LIST:Qt5::$${CMAKE_PLUGIN_NAME},${_no_plugins_genex}>>\" + \"$<NOT:$<IN_LIST:Qt5::$${CMAKE_PLUGIN_NAME},${_no_plugins_genex}>>,\" + \"$<NOT:$<IN_LIST:Qt::$${CMAKE_PLUGIN_NAME},${_no_plugins_genex}>>\" \">\" \">:Qt5::$$CMAKE_PLUGIN_NAME>\" ) @@ -100,3 +111,4 @@ set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} APPEND PROPERTY INTERFACE_LINK_LI !!ENDIF set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_TYPE \"$$CMAKE_PLUGIN_TYPE\") set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_EXTENDS \"$$CMAKE_PLUGIN_EXTENDS\") +set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_CLASS_NAME \"$$CMAKE_PLUGIN_NAME\") diff --git a/mkspecs/features/metatypes.prf b/mkspecs/features/metatypes.prf new file mode 100644 index 0000000000..555269fa68 --- /dev/null +++ b/mkspecs/features/metatypes.prf @@ -0,0 +1,52 @@ +qtPrepareTool(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 + +MOC_COLLECT_JSON_OUTPUT = $$lower($$basename(TARGET))_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_LIBS]/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/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index f1c5658b04..1b67435787 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -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 = diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index c24f2c6062..02460a2e0c 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -23,7 +23,6 @@ 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 @@ -58,6 +57,9 @@ contains(TEMPLATE, .*lib) { QMAKE_PRL_INSTALL_REPLACE += qtlibdir_replace } } +contains(TEMPLATE, .*lib)|darwin { + if(!host_build|!cross_compile):qtConfig(reduce_exports): CONFIG += hide_symbols +} # The remainder of this file must not apply to host tools/libraries, # as the host compiler's version and capabilities are not checked. diff --git a/mkspecs/features/sanitizer.prf b/mkspecs/features/sanitizer.prf index c7d72aec80..12ca1a17bd 100644 --- a/mkspecs/features/sanitizer.prf +++ b/mkspecs/features/sanitizer.prf @@ -42,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/wasm/default_pre.prf b/mkspecs/features/wasm/default_pre.prf index 2760889929..d092149b32 100644 --- a/mkspecs/features/wasm/default_pre.prf +++ b/mkspecs/features/wasm/default_pre.prf @@ -1,2 +1,2 @@ -load(default_pre) load(emcc_ver) +load(default_pre) |