diff options
Diffstat (limited to 'src/corelib')
19 files changed, 4224 insertions, 709 deletions
diff --git a/src/corelib/.prev_CMakeLists.txt b/src/corelib/.prev_CMakeLists.txt new file mode 100644 index 0000000000..a6e862e1de --- /dev/null +++ b/src/corelib/.prev_CMakeLists.txt @@ -0,0 +1,1079 @@ +# Generated from corelib.pro. + +##################################################################### +## Core Module: +##################################################################### + +qt_add_module(Core + GENERATE_METATYPES + QMAKE_MODULE_CONFIG moc resources + EXCEPTIONS + SOURCES + ../3rdparty/harfbuzz/src/harfbuzz.h + ../3rdparty/harfbuzz/src/harfbuzz-buffer.c + ../3rdparty/harfbuzz/src/harfbuzz-gdef.c + ../3rdparty/harfbuzz/src/harfbuzz-gpos.c + ../3rdparty/harfbuzz/src/harfbuzz-gsub.c + ../3rdparty/harfbuzz/src/harfbuzz-impl.c + ../3rdparty/harfbuzz/src/harfbuzz-open.c + ../3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp + ../3rdparty/harfbuzz/src/harfbuzz-stream.c + codecs/qtextcodec_p.h + codecs/qutfcodec.cpp codecs/qutfcodec_p.h + global/archdetect.cpp + global/qcompilerdetection.h + global/qendian.cpp global/qendian.h global/qendian_p.h + global/qflags.h + global/qfloat16.cpp global/qfloat16.h + global/qglobal.cpp global/qglobal.h + global/qglobalstatic.h + global/qhooks.cpp global/qhooks_p.h + global/qisenum.h + global/qlibraryinfo.cpp global/qlibraryinfo.h + global/qlogging.cpp global/qlogging.h + global/qmalloc.cpp + global/qmemory_p.h + global/qnamespace.h + global/qnumeric.cpp global/qnumeric.h global/qnumeric_p.h + global/qoperatingsystemversion.cpp global/qoperatingsystemversion.h global/qoperatingsystemversion_p.h + global/qprocessordetection.h + global/qrandom.cpp global/qrandom.h global/qrandom_p.h + global/qsysinfo.h + global/qsystemdetection.h + global/qtypeinfo.h + global/qtypetraits.h + global/qversiontagging.h + io/qabstractfileengine.cpp io/qabstractfileengine_p.h + io/qbuffer.cpp io/qbuffer.h + io/qdataurl.cpp io/qdataurl_p.h + io/qdebug.cpp io/qdebug.h io/qdebug_p.h + io/qdir.cpp io/qdir.h io/qdir_p.h + io/qdiriterator.cpp io/qdiriterator.h + io/qfile.cpp io/qfile.h + io/qfiledevice.cpp io/qfiledevice.h io/qfiledevice_p.h + io/qfileinfo.cpp io/qfileinfo.h io/qfileinfo_p.h + io/qfileselector.cpp io/qfileselector.h io/qfileselector_p.h + io/qfilesystemengine.cpp io/qfilesystemengine_p.h + io/qfilesystementry.cpp io/qfilesystementry_p.h + io/qfilesystemiterator_p.h + io/qfilesystemmetadata_p.h + io/qfsfileengine.cpp io/qfsfileengine_p.h + io/qfsfileengine_iterator.cpp io/qfsfileengine_iterator_p.h + io/qiodevice.cpp io/qiodevice.h io/qiodevice_p.h + io/qipaddress.cpp io/qipaddress_p.h + io/qlockfile.cpp io/qlockfile.h io/qlockfile_p.h + io/qloggingcategory.cpp io/qloggingcategory.h + io/qloggingregistry.cpp io/qloggingregistry_p.h + io/qnoncontiguousbytedevice.cpp io/qnoncontiguousbytedevice_p.h + io/qresource.cpp io/qresource_p.h + io/qresource_iterator.cpp io/qresource_iterator_p.h + io/qsavefile.cpp io/qsavefile.h + io/qstandardpaths.cpp io/qstandardpaths.h + io/qstorageinfo.cpp io/qstorageinfo.h io/qstorageinfo_p.h + io/qtemporarydir.cpp io/qtemporarydir.h + io/qtemporaryfile.cpp io/qtemporaryfile.h io/qtemporaryfile_p.h + io/qtldurl.cpp io/qtldurl_p.h + io/qurl.cpp io/qurl.h io/qurl_p.h + io/qurlidna.cpp + io/qurlquery.cpp io/qurlquery.h + io/qurlrecode.cpp + io/qurltlds_p.h + itemmodels/qabstractitemmodel.cpp itemmodels/qabstractitemmodel.h itemmodels/qabstractitemmodel_p.h + itemmodels/qitemselectionmodel.cpp itemmodels/qitemselectionmodel.h itemmodels/qitemselectionmodel_p.h + kernel/qabstracteventdispatcher.cpp kernel/qabstracteventdispatcher.h kernel/qabstracteventdispatcher_p.h + kernel/qabstractnativeeventfilter.cpp kernel/qabstractnativeeventfilter.h + kernel/qbasictimer.cpp kernel/qbasictimer.h + kernel/qcoreapplication.cpp kernel/qcoreapplication.h kernel/qcoreapplication_p.h + kernel/qcorecmdlineargs_p.h + kernel/qcoreevent.cpp kernel/qcoreevent.h + kernel/qcoreglobaldata.cpp kernel/qcoreglobaldata_p.h + kernel/qdeadlinetimer.cpp kernel/qdeadlinetimer.h kernel/qdeadlinetimer_p.h + kernel/qelapsedtimer.cpp kernel/qelapsedtimer.h + kernel/qeventloop.cpp kernel/qeventloop.h + kernel/qfunctions_p.h + kernel/qmath.cpp kernel/qmath.h + kernel/qmetaobject.cpp kernel/qmetaobject.h kernel/qmetaobject_p.h + kernel/qmetaobject_moc_p.h + kernel/qmetaobjectbuilder.cpp kernel/qmetaobjectbuilder_p.h + kernel/qmetatype.cpp kernel/qmetatype.h kernel/qmetatype_p.h + kernel/qmetatypeswitcher_p.h + kernel/qmimedata.cpp kernel/qmimedata.h + kernel/qobject.cpp kernel/qobject.h kernel/qobject_p.h + kernel/qobject_impl.h + kernel/qobjectcleanuphandler.cpp kernel/qobjectcleanuphandler.h + kernel/qobjectdefs.h + kernel/qobjectdefs_impl.h + kernel/qpointer.cpp kernel/qpointer.h + kernel/qsharedmemory.cpp kernel/qsharedmemory.h kernel/qsharedmemory_p.h + kernel/qsignalmapper.cpp kernel/qsignalmapper.h + kernel/qsocketnotifier.cpp kernel/qsocketnotifier.h + kernel/qsystemerror.cpp kernel/qsystemerror_p.h + kernel/qsystemsemaphore.cpp kernel/qsystemsemaphore.h kernel/qsystemsemaphore_p.h + kernel/qtestsupport_core.cpp kernel/qtestsupport_core.h + kernel/qtimer.cpp kernel/qtimer.h + kernel/qtranslator.cpp kernel/qtranslator.h kernel/qtranslator_p.h + kernel/qvariant.cpp kernel/qvariant.h kernel/qvariant_p.h + plugin/qfactoryinterface.cpp plugin/qfactoryinterface.h + plugin/qfactoryloader.cpp plugin/qfactoryloader_p.h + plugin/qplugin.h plugin/qplugin_p.h + plugin/qpluginloader.cpp plugin/qpluginloader.h + plugin/quuid.cpp plugin/quuid.h + serialization/qcborarray.h + serialization/qcborcommon.cpp serialization/qcborcommon.h serialization/qcborcommon_p.h + serialization/qcbordiagnostic.cpp + serialization/qcbormap.h + serialization/qcborstream.h + serialization/qcborvalue.cpp serialization/qcborvalue.h serialization/qcborvalue_p.h + serialization/qdatastream.cpp serialization/qdatastream.h serialization/qdatastream_p.h + serialization/qjson_p.h + serialization/qjsonarray.cpp serialization/qjsonarray.h + serialization/qjsoncbor.cpp + serialization/qjsondocument.cpp serialization/qjsondocument.h + serialization/qjsonobject.cpp serialization/qjsonobject.h + serialization/qjsonparser.cpp serialization/qjsonparser_p.h + serialization/qjsonvalue.cpp serialization/qjsonvalue.h + serialization/qjsonwriter.cpp serialization/qjsonwriter_p.h + serialization/qtextstream.cpp serialization/qtextstream.h serialization/qtextstream_p.h + serialization/qxmlstream.cpp serialization/qxmlstream.h serialization/qxmlstream_p.h + serialization/qxmlutils.cpp serialization/qxmlutils_p.h + statemachine/qabstractstate.cpp statemachine/qabstractstate.h statemachine/qabstractstate_p.h + statemachine/qabstracttransition.cpp statemachine/qabstracttransition.h statemachine/qabstracttransition_p.h + statemachine/qfinalstate.cpp statemachine/qfinalstate.h statemachine/qfinalstate_p.h + statemachine/qhistorystate.cpp statemachine/qhistorystate.h statemachine/qhistorystate_p.h + statemachine/qsignaleventgenerator_p.h + statemachine/qsignaltransition.cpp statemachine/qsignaltransition.h statemachine/qsignaltransition_p.h + statemachine/qstate.cpp statemachine/qstate.h statemachine/qstate_p.h + statemachine/qstatemachine.cpp statemachine/qstatemachine.h statemachine/qstatemachine_p.h + text/qbytearray.cpp text/qbytearray.h text/qbytearray_p.h + text/qbytearraylist.cpp text/qbytearraylist.h + text/qbytearraymatcher.cpp text/qbytearraymatcher.h + text/qbytedata_p.h + text/qchar.h + text/qcollator.cpp text/qcollator.h text/qcollator_p.h + text/qdoublescanprint_p.h + text/qharfbuzz.cpp text/qharfbuzz_p.h + text/qlocale.cpp text/qlocale.h text/qlocale_p.h + text/qlocale_data_p.h + text/qlocale_tools.cpp text/qlocale_tools_p.h + text/qregexp.cpp text/qregexp.h + text/qstring.cpp text/qstring.h + text/qstring_compat.cpp + text/qstringalgorithms.h text/qstringalgorithms_p.h + text/qstringbuilder.cpp text/qstringbuilder.h + text/qstringiterator_p.h + text/qstringlist.cpp text/qstringlist.h + text/qstringliteral.h + text/qstringmatcher.h + text/qstringview.cpp text/qstringview.h + text/qtextboundaryfinder.cpp text/qtextboundaryfinder.h + text/qunicodetables_p.h + text/qunicodetools.cpp text/qunicodetools_p.h + text/qvsnprintf.cpp + thread/qmutex.h + thread/qreadwritelock.h + thread/qrunnable.cpp thread/qrunnable.h + thread/qthread.cpp thread/qthread.h + thread/qthreadstorage.h + thread/qwaitcondition.h thread/qwaitcondition_p.h + time/qcalendar.cpp time/qcalendar.h + time/qcalendarbackend_p.h + time/qcalendarmath_p.h + time/qdatetime.cpp time/qdatetime.h time/qdatetime_p.h + time/qgregoriancalendar.cpp time/qgregoriancalendar_p.h + time/qjuliancalendar.cpp time/qjuliancalendar_p.h + time/qmilankoviccalendar.cpp time/qmilankoviccalendar_p.h + time/qromancalendar.cpp time/qromancalendar_p.h + time/qromancalendar_data_p.h + tools/qalgorithms.h + tools/qarraydata.cpp tools/qarraydata.h + tools/qarraydataops.h + tools/qarraydatapointer.h + tools/qbitarray.cpp tools/qbitarray.h + tools/qcache.h + tools/qcontainerfwd.h + tools/qcontainertools_impl.h + tools/qcontiguouscache.cpp tools/qcontiguouscache.h + tools/qcryptographichash.cpp tools/qcryptographichash.h + tools/qduplicatetracker_p.h + tools/qflatmap_p.h + tools/qfreelist.cpp tools/qfreelist_p.h + tools/qhash.cpp tools/qhash.h + tools/qhashfunctions.h + tools/qiterator.h + tools/qline.cpp tools/qline.h + tools/qlinkedlist.cpp tools/qlinkedlist.h + tools/qlist.cpp tools/qlist.h + tools/qmakearray_p.h + tools/qmap.cpp tools/qmap.h + tools/qmargins.cpp tools/qmargins.h + tools/qmessageauthenticationcode.cpp tools/qmessageauthenticationcode.h + tools/qoffsetstringarray_p.h + tools/qpair.h + tools/qpoint.cpp tools/qpoint.h + tools/qqueue.h + tools/qrect.cpp tools/qrect.h + tools/qrefcount.cpp tools/qrefcount.h + tools/qringbuffer.cpp tools/qringbuffer_p.h + tools/qscopedpointer.h tools/qscopedpointer_p.h + tools/qscopedvaluerollback.h + tools/qscopeguard.h + tools/qset.h + tools/qshareddata.cpp tools/qshareddata.h + tools/qsharedpointer.cpp tools/qsharedpointer.h + tools/qsharedpointer_impl.h + tools/qsimd.cpp tools/qsimd_p.h + tools/qsize.cpp tools/qsize.h + tools/qstack.h + tools/qtools_p.h + tools/qvarlengtharray.h + tools/qvector.h + tools/qversionnumber.cpp tools/qversionnumber.h + DEFINES + QT_NO_FOREACH + QT_NO_USING_NAMESPACE + INCLUDE_DIRECTORIES + ${PROJECT_BINARY_DIR}/src/corelib/global + ../3rdparty/harfbuzz/src + ../3rdparty/md4 + ../3rdparty/md5 + ../3rdparty/sha3 + ../3rdparty/tinycbor/src + LIBRARIES + ZLIB::ZLIB + doubleconversion + PRECOMPILED_HEADER + "global/qt_pch.h" + NO_PCH_SOURCES + "text/qstring_compat.cpp" +) + + +qt_add_simd_part(Core SIMD mips_dsp + SOURCES + ../gui/painting/qt_mips_asm_dsp_p.h + text/qstring_mips_dsp_asm.S +) + + +if(ANDROID) + set_property(TARGET Core APPEND PROPERTY QT_ANDROID_BUNDLED_JAR_DEPENDENCIES + jar/QtAndroid.jar + ) + set_property(TARGET Core APPEND PROPERTY QT_ANDROID_LIB_DEPENDENCIES + plugins/platforms/libplugins_platforms_qtforandroid.so + ) + set_property(TARGET Core APPEND PROPERTY QT_ANDROID_PERMISSIONS + android.permission.INTERNET android.permission.WRITE_EXTERNAL_STORAGE + ) +endif() + +#### Keys ignored in scope 1:.:.:corelib.pro:<TRUE>: +# CMAKE_DISABLED_FEATURES = "$$join(QT_DISABLED_FEATURES, "$$escape_expand(\\n) ")" +# CMAKE_HOST_DATA_DIR = "$$cmakeRelativePath($$[QT_HOST_DATA/src], $$[QT_INSTALL_PREFIX])" +# CMAKE_INSTALL_DATA_DIR = "$$cmakeRelativePath($$[QT_HOST_DATA], $$[QT_INSTALL_PREFIX])" +# HOST_BINS = "$$[QT_HOST_BINS]" +# INSTALLS = "ctest_qt5_module_files" "cmake_qt5_umbrella_module_files" +# MODULE = "core" +# MODULE_CONFIG = "moc" "resources" +# QMAKE_DSYM_DEBUG_SCRIPT = "$$PWD/debug_script.py" +# QMAKE_DYNAMIC_LIST_FILE = "$$PWD/QtCore.dynlist" +# QMAKE_PKGCONFIG_VARIABLES = "host_bins" "qt_conf" +# QMAKE_SUBSTITUTES = "ctest_macros_file" "cmake_umbrella_config_file" "cmake_umbrella_config_module_location" "cmake_umbrella_config_module_location_for_install" "cmake_umbrella_config_version_file" "cmake_extras_mkspec_dir" "cmake_extras_mkspec_dir_for_install" +# cmake_extras_mkspec_dir.input = "$$PWD/Qt5CoreConfigExtrasMkspecDir.cmake.in" +# cmake_extras_mkspec_dir.output = "$$DESTDIR/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake" +# cmake_extras_mkspec_dir_for_install.input = "$$PWD/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in" +# cmake_extras_mkspec_dir_for_install.output = "$$DESTDIR/cmake/install/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake" +# cmake_qt5_umbrella_module_files.files = "$$cmake_umbrella_config_file.output" "$$cmake_umbrella_config_version_file.output" "$$cmake_umbrella_config_module_location_for_install.output" +# cmake_qt5_umbrella_module_files.path = "$$[QT_INSTALL_LIBS]/cmake/Qt5" +# cmake_umbrella_config_file.input = "$$PWD/Qt5Config.cmake.in" +# cmake_umbrella_config_file.output = "$$DESTDIR/cmake/Qt5/Qt5Config.cmake" +# cmake_umbrella_config_module_location.input = "$$PWD/Qt5ModuleLocation.cmake.in" +# cmake_umbrella_config_module_location.output = "$$DESTDIR/cmake/Qt5/Qt5ModuleLocation.cmake" +# cmake_umbrella_config_module_location_for_install.input = "$$PWD/Qt5ModuleLocationForInstall.cmake.in" +# cmake_umbrella_config_module_location_for_install.output = "$$DESTDIR/cmake/install/Qt5/Qt5ModuleLocation.cmake" +# cmake_umbrella_config_version_file.input = "$$PWD/../../mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in" +# cmake_umbrella_config_version_file.output = "$$DESTDIR/cmake/Qt5/Qt5ConfigVersion.cmake" +# ctest_macros_file.CONFIG = "verbatim" +# ctest_macros_file.input = "$$PWD/Qt5CTestMacros.cmake" +# ctest_macros_file.output = "$$DESTDIR/cmake/Qt5Core/Qt5CTestMacros.cmake" +# ctest_qt5_module_files.files = "$$ctest_macros_file.output" "$$cmake_extras_mkspec_dir_for_install.output" +# ctest_qt5_module_files.path = "$$[QT_INSTALL_LIBS]/cmake/Qt5Core" +# host_bins.name = "host_bins" +# host_bins.variable = "HOST_BINS" +# qt_conf.name = "qt_config" +# qt_conf.variable = "QT_CONFIG" + +## Scopes: +##################################################################### + +#### Keys ignored in scope 2:.:.:corelib.pro:QT_FEATURE_gc_binaries: +# MODULE_CONFIG = "gc_binaries" + +#### Keys ignored in scope 3:.:.:corelib.pro:NOT QT_NAMESPACE_ISEMPTY: +# MODULE_DEFINES = "QT_NAMESPACE=$$QT_NAMESPACE" + +qt_extend_target(Core CONDITION ANDROID + SOURCES + kernel/qsharedmemory_android.cpp + kernel/qsystemsemaphore_android.cpp + DEFINES + LIBS_SUFFIX='\\"_${CMAKE_SYSTEM_PROCESSOR}.so\\"' +) + +qt_extend_target(Core CONDITION MSVC AND (TEST_architecture_arch STREQUAL "i386") + LINK_OPTIONS + "/BASE:0x67000000" +) + +#### Keys ignored in scope 6:.:.:corelib.pro:FREEBSD OR OPENBSD: +# QMAKE_LFLAGS_NOUNDEF = <EMPTY> + +qt_extend_target(Core CONDITION QT_FEATURE_animation + SOURCES + animation/qabstractanimation.cpp animation/qabstractanimation.h animation/qabstractanimation_p.h + animation/qanimationgroup.cpp animation/qanimationgroup.h animation/qanimationgroup_p.h + animation/qparallelanimationgroup.cpp animation/qparallelanimationgroup.h animation/qparallelanimationgroup_p.h + animation/qpauseanimation.cpp animation/qpauseanimation.h + animation/qpropertyanimation.cpp animation/qpropertyanimation.h animation/qpropertyanimation_p.h + animation/qsequentialanimationgroup.cpp animation/qsequentialanimationgroup.h animation/qsequentialanimationgroup_p.h + animation/qvariantanimation.cpp animation/qvariantanimation.h animation/qvariantanimation_p.h +) + +qt_extend_target(Core CONDITION WIN32 + SOURCES + global/qoperatingsystemversion_win.cpp global/qoperatingsystemversion_win_p.h + io/qfilesystemengine_win.cpp + io/qfsfileengine_win.cpp + io/qlockfile_win.cpp + kernel/qcoreapplication_win.cpp + kernel/qelapsedtimer_win.cpp + kernel/qsharedmemory_win.cpp + kernel/qsystemsemaphore_win.cpp + kernel/qwineventnotifier.cpp kernel/qwineventnotifier.h kernel/qwineventnotifier_p.h + plugin/qsystemlibrary.cpp plugin/qsystemlibrary_p.h + thread/qatomic_msvc.h + thread/qthread_win.cpp + DEFINES + -QT_NO_CAST_TO_ASCII + LIBRARIES + ws2_32 +) + +qt_extend_target(Core CONDITION WIN32 AND NOT WINRT + SOURCES + io/qstandardpaths_win.cpp + io/qstorageinfo_win.cpp + io/qwindowspipereader.cpp io/qwindowspipereader_p.h + io/qwindowspipewriter.cpp io/qwindowspipewriter_p.h + kernel/qeventdispatcher_win.cpp kernel/qeventdispatcher_win_p.h + kernel/qwinregistry.cpp kernel/qwinregistry_p.h + LIBRARIES + advapi32 + kernel32 + netapi32 + ole32 + shell32 + user32 + uuid + version + winmm + PUBLIC_LIBRARIES + mpr + userenv +) + +qt_extend_target(Core CONDITION APPLE + SOURCES + global/qoperatingsystemversion_darwin.mm + io/qstandardpaths_mac.mm + io/qstorageinfo_mac.cpp + kernel/qcfsocketnotifier.cpp kernel/qcfsocketnotifier_p.h + kernel/qcore_foundation.mm + kernel/qcore_mac.cpp kernel/qcore_mac_p.h + kernel/qcore_mac_objc.mm + kernel/qcoreapplication_mac.cpp + kernel/qeventdispatcher_cf.mm kernel/qeventdispatcher_cf_p.h + LIBRARIES + ${FWCoreFoundation} + ${FWFoundation} +) + +qt_extend_target(Core CONDITION APPLE_OSX + LIBRARIES + ${FWAppKit} + ${FWApplicationServices} + ${FWCoreServices} + ${FWSecurity} + PUBLIC_LIBRARIES + ${FWDiskArbitration} + ${FWIOKit} +) + +qt_extend_target(Core CONDITION INTEGRITY + LIBRARIES + ivfs + net + posix + shm_client + socket + COMPILE_OPTIONS + --pending_instantiations=128 +) + +#### Keys ignored in scope 15:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_HOST_DATA_DIR): +# CMAKE_HOST_DATA_DIR = "$$[QT_HOST_DATA/src]/" +# CMAKE_HOST_DATA_DIR_IS_ABSOLUTE = "True" + +#### Keys ignored in scope 16:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_INSTALL_DATA_DIR): +# CMAKE_INSTALL_DATA_DIR = "$$[QT_HOST_DATA]/" +# CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE = "True" + +#### Keys ignored in scope 21:.:global:global/global.pri:QT_CPU_FEATURES__ss_QT_ARCH___contains___f16c: +# f16c_cxx = "true" + +#### Keys ignored in scope 23:.:global:global/global.pri:CLANG OR intel_icl OR ICC: +# f16c_cxx = "false" + +#### Keys ignored in scope 25:.:global:global/global.pri:GCC AND f16c AND x86SimdAlways: +# f16c_cxx = "true" + +#### Keys ignored in scope 27:.:global:global/global.pri:MSVC AND QT_CPU_FEATURES__ss_QT_ARCH___contains___avx: +# f16c_cxx = "true" + +#### Keys ignored in scope 28:.:global:global/global.pri:else: +# f16c_cxx = "false" + +qt_extend_target(Core CONDITION _ss_f16c_cxx + DEFINES + QFLOAT16_INCLUDE_FAST +) + +if(NOT _ss_f16c_cxx) + qt_add_simd_part(Core SIMD f16c + SOURCES + global/qfloat16_f16c.c + ) +endif() + +qt_extend_target(Core CONDITION NOT CMAKE_CROSSCOMPILING AND NOT _x_-armcc_x_ AND NOT static AND (hurd_x_ OR linux_x_) + DEFINES + ELF_INTERPRETER=\\\"=Creadelf-l/bin/ls|perl-n-e\'['quote', ['if', ['/program', 'interpreter:', ['.*'], ']/'], '{', 'print', '$1;', '}']]\'\\\" + LINK_OPTIONS + "-Wl,-e,qt_core_boilerplate" +) + +qt_extend_target(Core CONDITION LINUX AND NOT static + SOURCES + global/minimum-linux_p.h +) + +#### Keys ignored in scope 35:.:global:global/global.pri:precompile_header: +# NO_PCH_ASM = "global/minimum-linux.S" +# QMAKE_EXTRA_COMPILERS = "no_pch_assembler" +# no_pch_assembler.commands = "$$QMAKE_CC" "-c" "$(CFLAGS)" "$(INCPATH)" "${QMAKE_FILE_IN}" "-o" "${QMAKE_FILE_OUT}" +# no_pch_assembler.dependency_type = "TYPE_C" +# no_pch_assembler.input = "NO_PCH_ASM" +# no_pch_assembler.name = "compiling[no_pch]" "${QMAKE_FILE_IN}" +# no_pch_assembler.output = "${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${firstQMAKE_EXT_OBJ}" + +#### Keys ignored in scope 36:.:global:global/global.pri:silent: +# no_pch_assembler.commands = "@echo" "compiling[no_pch]" "${QMAKE_FILE_IN}" "&&" + +qt_extend_target(Core CONDITION LINUX AND NOT precompile_header AND NOT static + SOURCES + global/minimum-linux.S +) + +qt_extend_target(Core CONDITION QT_FEATURE_slog2 + LIBRARIES + Slog2::Slog2 +) + +qt_extend_target(Core CONDITION QT_FEATURE_journald + LIBRARIES + PkgConfig::Libsystemd +) + +#### Keys ignored in scope 40:.:global:global/global.pri:GCC AND ltcg: +# QMAKE_EXTRA_COMPILERS = "versiontagging_compiler" +# versiontagging_compiler.commands = "$$QMAKE_CXX" "-c" "$(CXXFLAGS)" "$(INCPATH)" "-fno-lto" "-o" "${QMAKE_FILE_OUT}" "${QMAKE_FILE_IN}" +# versiontagging_compiler.dependency_type = "TYPE_C" +# versiontagging_compiler.input = "VERSIONTAGGING_SOURCES" +# versiontagging_compiler.name = "compiling[versiontagging]" "${QMAKE_FILE_IN}" +# versiontagging_compiler.output = "${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${firstQMAKE_EXT_OBJ}" +# versiontagging_compiler.variable_out = "OBJECTS" + +#### Keys ignored in scope 41:.:global:global/global.pri:silent: +# versiontagging_compiler.commands = "@echo" "compiling[versiontagging]" "${QMAKE_FILE_IN}" "&&" + +qt_extend_target(Core CONDITION NOT GCC OR NOT ltcg + SOURCES + global/qversiontagging.cpp +) + +qt_extend_target(Core CONDITION UNIX + SOURCES + io/qfilesystemengine_unix.cpp + io/qfilesystemiterator_unix.cpp + io/qfsfileengine_unix.cpp + io/qlockfile_unix.cpp + kernel/qcore_unix.cpp kernel/qcore_unix_p.h + kernel/qeventdispatcher_unix.cpp kernel/qeventdispatcher_unix_p.h + kernel/qpoll_p.h + kernel/qtimerinfo_unix.cpp kernel/qtimerinfo_unix_p.h + thread/qthread_unix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_thread + SOURCES + thread/qatomic.cpp thread/qatomic.h + thread/qatomic_bootstrap.h + thread/qatomic_cxx11.h + thread/qbasicatomic.h + thread/qfutex_p.h + thread/qgenericatomic.h + thread/qlocking_p.h + thread/qmutex.cpp thread/qmutex_p.h + thread/qorderedmutexlocker_p.h + thread/qreadwritelock.cpp thread/qreadwritelock_p.h + thread/qsemaphore.cpp thread/qsemaphore.h + thread/qthread_p.h + thread/qthreadpool.cpp thread/qthreadpool.h thread/qthreadpool_p.h + thread/qthreadstorage.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_thread AND WIN32 + SOURCES + thread/qmutex_win.cpp + thread/qwaitcondition_win.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_thread AND UNIX + SOURCES + thread/qwaitcondition_unix.cpp +) + +qt_extend_target(Core CONDITION APPLE AND QT_FEATURE_thread + SOURCES + thread/qmutex_mac.cpp +) + +qt_extend_target(Core CONDITION LINUX AND QT_FEATURE_thread + SOURCES + thread/qmutex_linux.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_thread AND UNIX AND NOT APPLE AND NOT LINUX + SOURCES + thread/qmutex_unix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_future + SOURCES + thread/qexception.cpp thread/qexception.h + thread/qfuture.h + thread/qfutureinterface.cpp thread/qfutureinterface.h thread/qfutureinterface_p.h + thread/qfuturesynchronizer.h + thread/qfuturewatcher.cpp thread/qfuturewatcher.h thread/qfuturewatcher_p.h + thread/qresultstore.cpp thread/qresultstore.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_std_atomic64 + PUBLIC_LIBRARIES + Atomic +) + +qt_extend_target(Core CONDITION ICC + COMPILE_OPTIONS + -fp-model + strict +) + +qt_extend_target(Core CONDITION MSVC + SOURCES + tools/qvector_msvc.cpp + NO_PCH_SOURCES + "tools/qvector_msvc.cpp" +) + +qt_extend_target(Core CONDITION QT_FEATURE_commandlineparser + SOURCES + tools/qcommandlineoption.cpp tools/qcommandlineoption.h + tools/qcommandlineparser.cpp tools/qcommandlineparser.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_easingcurve + SOURCES + tools/qeasingcurve.cpp tools/qeasingcurve.h + tools/qtimeline.cpp tools/qtimeline.h +) + +qt_extend_target(Core CONDITION UNIX AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS AND NOT WASM AND (NOT APPLE_OSX OR NOT ICC) + LIBRARIES + m +) + +qt_extend_target(Core CONDITION APPLE AND NOT NACL + SOURCES + kernel/qelapsedtimer_mac.cpp + text/qlocale_mac.mm +) + +qt_extend_target(Core CONDITION UNIX AND (NACL OR NOT APPLE) + SOURCES + text/qlocale_unix.cpp +) + +qt_extend_target(Core CONDITION WIN32 AND (NACL OR NOT APPLE) + SOURCES + text/qlocale_win.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_icu + SOURCES + text/qcollator_icu.cpp + text/qlocale_icu.cpp + LIBRARIES + ICU::i18n ICU::uc ICU::data +) + +qt_extend_target(Core CONDITION WIN32 AND NOT QT_FEATURE_icu + SOURCES + text/qcollator_win.cpp +) + +qt_extend_target(Core CONDITION APPLE_OSX AND NOT QT_FEATURE_icu + SOURCES + text/qcollator_macx.cpp +) + +qt_extend_target(Core CONDITION UNIX AND NOT APPLE_OSX AND NOT QT_FEATURE_icu + SOURCES + text/qcollator_posix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_regularexpression + SOURCES + text/qregularexpression.cpp text/qregularexpression.h + LIBRARIES + WrapPCRE2::WrapPCRE2 +) + +qt_extend_target(Core CONDITION QT_FEATURE_hijricalendar + SOURCES + time/qhijricalendar.cpp time/qhijricalendar_p.h + time/qhijricalendar_data_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_islamiccivilcalendar + SOURCES + time/qislamiccivilcalendar.cpp time/qislamiccivilcalendar_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_jalalicalendar + SOURCES + time/qjalalicalendar.cpp time/qjalalicalendar_p.h + time/qjalalicalendar_data_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_timezone + SOURCES + time/qtimezone.cpp time/qtimezone.h + time/qtimezoneprivate.cpp time/qtimezoneprivate_p.h + time/qtimezoneprivate_data_p.h +) + +qt_extend_target(Core CONDITION APPLE AND QT_FEATURE_timezone AND NOT NACL + SOURCES + time/qtimezoneprivate_mac.mm +) + +qt_extend_target(Core CONDITION ANDROID AND QT_FEATURE_timezone AND NOT ANDROID_EMBEDDED AND (NACL OR NOT APPLE) + SOURCES + time/qtimezoneprivate_android.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_timezone AND UNIX AND (ANDROID_EMBEDDED OR NOT ANDROID) AND (NACL OR NOT APPLE) + SOURCES + time/qtimezoneprivate_tz.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_icu AND QT_FEATURE_timezone AND UNIX AND (ANDROID_EMBEDDED OR NOT ANDROID) AND (NACL OR NOT APPLE) + SOURCES + time/qtimezoneprivate_icu.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_icu AND QT_FEATURE_timezone AND WIN32 AND (ANDROID_EMBEDDED OR NOT ANDROID) AND (NACL OR NOT APPLE) + SOURCES + time/qtimezoneprivate_icu.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_timezone AND WIN32 AND NOT QT_FEATURE_icu AND (ANDROID_EMBEDDED OR NOT ANDROID) AND (NACL OR NOT APPLE) + SOURCES + time/qtimezoneprivate_win.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_datetimeparser + SOURCES + time/qdatetimeparser.cpp time/qdatetimeparser_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_zstd + LIBRARIES + ZSTD::ZSTD +) + +qt_extend_target(Core CONDITION QT_FEATURE_filesystemwatcher + SOURCES + io/qfilesystemwatcher.cpp io/qfilesystemwatcher.h io/qfilesystemwatcher_p.h + io/qfilesystemwatcher_polling.cpp io/qfilesystemwatcher_polling_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_filesystemwatcher AND WIN32 + SOURCES + io/qfilesystemwatcher_win.cpp io/qfilesystemwatcher_win_p.h +) + +qt_extend_target(Core CONDITION APPLE_OSX AND QT_FEATURE_filesystemwatcher + SOURCES + io/qfilesystemwatcher_fsevents.mm io/qfilesystemwatcher_fsevents_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_filesystemwatcher AND QT_FEATURE_inotify AND UNIX AND NOT APPLE_OSX + SOURCES + io/qfilesystemwatcher_inotify.cpp io/qfilesystemwatcher_inotify_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_filesystemwatcher AND UNIX AND NOT APPLE_OSX AND NOT QT_FEATURE_inotify AND (APPLE OR FREEBSD OR NETBSD OR OPENBSD) + SOURCES + io/qfilesystemwatcher_kqueue.cpp io/qfilesystemwatcher_kqueue_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_processenvironment + SOURCES + io/qprocess.cpp io/qprocess.h io/qprocess_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_processenvironment AND WIN32 AND NOT WINRT + SOURCES + io/qprocess_win.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_processenvironment AND UNIX + SOURCES + io/qprocess_unix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_settings + SOURCES + io/qsettings.cpp io/qsettings.h io/qsettings_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_settings AND WIN32 AND NOT WINRT + SOURCES + io/qsettings_win.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_settings AND WINRT + SOURCES + io/qsettings_winrt.cpp +) + +qt_extend_target(Core CONDITION APPLE AND QT_FEATURE_settings AND NOT NACL + SOURCES + io/qsettings_mac.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_settings AND WASM + SOURCES + io/qsettings_wasm.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_filesystemiterator AND WIN32 + SOURCES + io/qfilesystemiterator_win.cpp +) + +qt_extend_target(Core CONDITION WINRT + SOURCES + io/qstandardpaths_winrt.cpp + io/qstorageinfo_stub.cpp + kernel/qeventdispatcher_winrt.cpp kernel/qeventdispatcher_winrt_p.h + kernel/qfunctions_fake_env_p.h + kernel/qfunctions_winrt.cpp kernel/qfunctions_winrt.h +) + +qt_extend_target(Core CONDITION UNIX AND NOT APPLE_UIKIT AND NOT INTEGRITY AND NOT rtems + SOURCES + ../3rdparty/forkfd/forkfd.h + io/forkfd_qt.cpp + INCLUDE_DIRECTORIES + ../3rdparty/forkfd +) + +qt_extend_target(Core CONDITION APPLE AND QT_FEATURE_processenvironment + SOURCES + io/qprocess_darwin.mm +) + +qt_extend_target(Core CONDITION APPLE AND NOT APPLE_OSX + PUBLIC_LIBRARIES + ${FWMobileCoreServices} +) + +qt_extend_target(Core CONDITION ANDROID AND NOT ANDROID_EMBEDDED + SOURCES + io/qstandardpaths_android.cpp + io/qstorageinfo_unix.cpp + kernel/qjni.cpp kernel/qjni_p.h + kernel/qjnihelpers.cpp kernel/qjnihelpers_p.h + kernel/qjnionload.cpp +) + +qt_extend_target(Core CONDITION HAIKU AND (ANDROID_EMBEDDED OR NOT ANDROID) + SOURCES + io/qstandardpaths_haiku.cpp + io/qstorageinfo_unix.cpp + PUBLIC_LIBRARIES + be +) + +qt_extend_target(Core CONDITION UNIX AND NOT APPLE AND NOT HAIKU AND (ANDROID_EMBEDDED OR NOT ANDROID) + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_proxymodel + SOURCES + itemmodels/qabstractproxymodel.cpp itemmodels/qabstractproxymodel.h itemmodels/qabstractproxymodel_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_concatenatetablesproxymodel AND QT_FEATURE_proxymodel + SOURCES + itemmodels/qconcatenatetablesproxymodel.cpp itemmodels/qconcatenatetablesproxymodel.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_identityproxymodel AND QT_FEATURE_proxymodel + SOURCES + itemmodels/qidentityproxymodel.cpp itemmodels/qidentityproxymodel.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_proxymodel AND QT_FEATURE_sortfilterproxymodel + SOURCES + itemmodels/qsortfilterproxymodel.cpp itemmodels/qsortfilterproxymodel.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_proxymodel AND QT_FEATURE_transposeproxymodel + SOURCES + itemmodels/qtransposeproxymodel.cpp itemmodels/qtransposeproxymodel.h itemmodels/qtransposeproxymodel_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_stringlistmodel + SOURCES + itemmodels/qstringlistmodel.cpp itemmodels/qstringlistmodel.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_library + SOURCES + plugin/qelfparser_p.cpp plugin/qelfparser_p.h + plugin/qlibrary.cpp plugin/qlibrary.h plugin/qlibrary_p.h + plugin/qmachparser.cpp plugin/qmachparser_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_library AND UNIX + SOURCES + plugin/qlibrary_unix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_library AND WIN32 + SOURCES + plugin/qlibrary_win.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_dlopen AND QT_FEATURE_library + LIBRARIES + ${CMAKE_DL_LIBS} +) + +qt_extend_target(Core CONDITION APPLE AND (APPLE_IOS OR APPLE_TVOS) + LIBRARIES + ${FWUIKit} +) + +qt_extend_target(Core CONDITION APPLE_WATCHOS + LIBRARIES + ${FWWatchKit} +) + +qt_extend_target(Core CONDITION NACL + SOURCES + kernel/qfunctions_nacl.cpp kernel/qfunctions_nacl.h +) + +qt_extend_target(Core CONDITION INTEGRITY OR (NACL AND UNIX) OR (UNIX AND NOT APPLE) + SOURCES + kernel/qelapsedtimer_unix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_poll_select AND UNIX + SOURCES + kernel/qpoll.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_glib AND UNIX + SOURCES + kernel/qeventdispatcher_glib.cpp kernel/qeventdispatcher_glib_p.h + LIBRARIES + GLIB2::GLIB2 +) + +qt_extend_target(Core CONDITION QT_FEATURE_clock_gettime AND UNIX + LIBRARIES + WrapRt +) + +qt_extend_target(Core CONDITION UNIX AND NOT ANDROID + SOURCES + kernel/qsharedmemory_posix.cpp + kernel/qsharedmemory_systemv.cpp + kernel/qsharedmemory_unix.cpp + kernel/qsystemsemaphore_posix.cpp + kernel/qsystemsemaphore_systemv.cpp + kernel/qsystemsemaphore_unix.cpp +) + +qt_extend_target(Core CONDITION VXWORKS + SOURCES + kernel/qfunctions_vxworks.cpp kernel/qfunctions_vxworks.h +) + +qt_extend_target(Core CONDITION QNX AND QT_FEATURE_qqnx_pps + SOURCES + kernel/qppsattribute.cpp kernel/qppsattribute_p.h + kernel/qppsattributeprivate_p.h + kernel/qppsobject.cpp kernel/qppsobject_p.h + kernel/qppsobjectprivate_p.h + LIBRARIES + PPS::PPS +) + +qt_extend_target(Core CONDITION QT_FEATURE_textcodec + SOURCES + codecs/qlatincodec.cpp codecs/qlatincodec_p.h + codecs/qsimplecodec.cpp codecs/qsimplecodec_p.h + codecs/qtextcodec.cpp codecs/qtextcodec.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_codecs AND QT_FEATURE_textcodec + SOURCES + codecs/qisciicodec.cpp codecs/qisciicodec_p.h + codecs/qtsciicodec.cpp codecs/qtsciicodec_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_icu AND QT_FEATURE_textcodec + SOURCES + codecs/qicucodec.cpp codecs/qicucodec_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_big_codecs AND QT_FEATURE_textcodec AND NOT QT_FEATURE_icu + SOURCES + codecs/qbig5codec.cpp codecs/qbig5codec_p.h + codecs/qeucjpcodec.cpp codecs/qeucjpcodec_p.h + codecs/qeuckrcodec.cpp codecs/qeuckrcodec_p.h + codecs/qgb18030codec.cpp codecs/qgb18030codec_p.h + codecs/qjiscodec.cpp codecs/qjiscodec_p.h + codecs/qjpunicode.cpp + codecs/qsjiscodec.cpp codecs/qsjiscodec_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_iconv AND QT_FEATURE_textcodec AND NOT QT_FEATURE_icu + SOURCES + codecs/qiconvcodec.cpp codecs/qiconvcodec_p.h + LIBRARIES + iconv +) + +qt_extend_target(Core CONDITION QT_FEATURE_textcodec AND WIN32 AND NOT QT_FEATURE_icu + SOURCES + codecs/qwindowscodec.cpp codecs/qwindowscodec_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_cborstreamreader + SOURCES + serialization/qcborstreamreader.cpp serialization/qcborstreamreader.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_cborstreamwriter + SOURCES + serialization/qcborstreamwriter.cpp serialization/qcborstreamwriter.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_binaryjson + SOURCES + serialization/qbinaryjson.cpp serialization/qbinaryjson_p.h + serialization/qbinaryjsonarray.cpp serialization/qbinaryjsonarray_p.h + serialization/qbinaryjsonobject.cpp serialization/qbinaryjsonobject_p.h + serialization/qbinaryjsonvalue.cpp serialization/qbinaryjsonvalue_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_qeventtransition + SOURCES + statemachine/qeventtransition.cpp statemachine/qeventtransition.h statemachine/qeventtransition_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_mimetype + SOURCES + mimetypes/qmimedatabase.cpp mimetypes/qmimedatabase.h mimetypes/qmimedatabase_p.h + mimetypes/qmimeglobpattern.cpp mimetypes/qmimeglobpattern_p.h + mimetypes/qmimemagicrule.cpp mimetypes/qmimemagicrule_p.h + mimetypes/qmimemagicrulematcher.cpp mimetypes/qmimemagicrulematcher_p.h + mimetypes/qmimeprovider.cpp mimetypes/qmimeprovider_p.h + mimetypes/qmimetype.cpp mimetypes/qmimetype.h mimetypes/qmimetype_p.h + mimetypes/qmimetypeparser.cpp mimetypes/qmimetypeparser_p.h +) + +#### Keys ignored in scope 197:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_mimetype: +# MIME_DATABASE = "mimetypes/mime/packages/freedesktop.org.xml" +# OTHER_FILES = "$$MIME_DATABASE" + +qt_extend_target(Core CONDITION QT_FEATURE_mimetype AND QT_FEATURE_mimetype_database + INCLUDE_DIRECTORIES + .rcc +) + +#### Keys ignored in scope 198:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_mimetype_database: +# QMAKE_EXTRA_COMPILERS = "mimedb" +# mimedb.commands = "${QMAKE_FILE_IN}" ">" "${QMAKE_FILE_OUT}" +# mimedb.depends = "$$PWD/mime/generate.pl" +# mimedb.input = "MIME_DATABASE" +# mimedb.output = "$$outpath/qmimeprovider_database.cpp" +# mimedb.variable_out = "INCLUDED_SOURCES" + +#### Keys ignored in scope 200:.:mimetypes:mimetypes/mimetypes.pri:(CMAKE_BUILD_TYPE STREQUAL Debug): +# outpath = ".rcc/debug" + +#### Keys ignored in scope 201:.:mimetypes:mimetypes/mimetypes.pri:else: +# outpath = ".rcc/release" + +#### Keys ignored in scope 202:.:mimetypes:mimetypes/mimetypes.pri:MAKEFILE_GENERATOR___equals___MSVC.NET OR MAKEFILE_GENERATOR___equals___MSBUILD OR QMAKE_SH_ISEMPTY: +# mimedb.commands = "cmd" "/c" "$$shell_path($$PWD/mime/generate.bat)" +# mimedb.depends = "$$PWD/mime/generate.bat" "$$PWD/mime/hexdump.ps1" + +#### Keys ignored in scope 203:.:mimetypes:mimetypes/mimetypes.pri:else: +# mimedb.commands = "perl" "$${mimedb.depends}" + +#### Keys ignored in scope 204:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_zstd: +# mimedb.commands = "--zstd" + +qt_extend_target(Core CONDITION WASM + SOURCES + platform/wasm/qstdweb.cpp platform/wasm/qstdweb_p.h +) + + +qt_create_tracepoints(Core qtcore.tracepoints) +qt_add_docs(Core + doc/qtcore.qdocconf +) + diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt new file mode 100644 index 0000000000..ca53e47ac3 --- /dev/null +++ b/src/corelib/CMakeLists.txt @@ -0,0 +1,1238 @@ +# Generated from corelib.pro. + +# special case begin +qt_find_package(Threads PROVIDED_TARGETS Threads::Threads) +qt_find_package(WrapDoubleConversion REQUIRED + PROVIDED_TARGETS WrapDoubleConversion::WrapDoubleConversion) + +if (NOT WrapDoubleConversion_FOUND) + message(FATAL_ERROR "Your C library does not provide \ + sscanf_l/snprintf_l _snprintf_l/_sscanf_l. \ + You need to use libdouble-conversion for double/string conversion.") +endif() + +# compute the reverse relative path from QtCoreConfigExtras to the install prefix +# this is used in QtCoreConfigExtras to make its install paths relocatable +if(QT_WILL_INSTALL) + get_filename_component(_clean_prefix "${CMAKE_INSTALL_PREFIX}/${QT_CONFIG_INSTALL_DIR}" ABSOLUTE) +else() + get_filename_component(_clean_prefix "${QT_CONFIG_BUILD_DIR}" ABSOLUTE) +endif() +file(RELATIVE_PATH QT_INVERSE_CONFIG_INSTALL_DIR ${_clean_prefix} ${CMAKE_INSTALL_PREFIX}) + +# special case end + +##################################################################### +## Core Module: +##################################################################### + +qt_add_module(Core + GENERATE_METATYPES + QMAKE_MODULE_CONFIG moc resources + EXCEPTIONS + SOURCES + # special case: remove ../3rdparty/harfbuzz + codecs/qtextcodec_p.h + codecs/qutfcodec.cpp codecs/qutfcodec_p.h + global/archdetect.cpp + global/qcompilerdetection.h + global/qendian.cpp global/qendian.h global/qendian_p.h + global/qflags.h + global/qfloat16.cpp global/qfloat16.h + global/qglobal.cpp global/qglobal.h + global/qglobalstatic.h + global/qhooks.cpp global/qhooks_p.h + global/qisenum.h + global/qlibraryinfo.cpp global/qlibraryinfo.h + global/qlogging.cpp global/qlogging.h + global/qmalloc.cpp + global/qmemory_p.h + # global/qnamespace.h # special case + global/qnumeric.cpp global/qnumeric.h global/qnumeric_p.h + global/qoperatingsystemversion.cpp global/qoperatingsystemversion.h global/qoperatingsystemversion_p.h + global/qprocessordetection.h + global/qrandom.cpp global/qrandom.h global/qrandom_p.h + global/qsysinfo.h + global/qsystemdetection.h + global/qtypeinfo.h + global/qtypetraits.h + global/qversiontagging.cpp global/qversiontagging.h # special case + io/qabstractfileengine.cpp io/qabstractfileengine_p.h + io/qbuffer.cpp io/qbuffer.h + io/qdataurl.cpp io/qdataurl_p.h + io/qdebug.cpp io/qdebug.h io/qdebug_p.h + io/qdir.cpp io/qdir.h io/qdir_p.h + io/qdiriterator.cpp io/qdiriterator.h + io/qfile.cpp io/qfile.h + io/qfiledevice.cpp io/qfiledevice.h io/qfiledevice_p.h + io/qfileinfo.cpp io/qfileinfo.h io/qfileinfo_p.h + io/qfileselector.cpp io/qfileselector.h io/qfileselector_p.h + io/qfilesystemengine.cpp io/qfilesystemengine_p.h + io/qfilesystementry.cpp io/qfilesystementry_p.h + io/qfilesystemiterator_p.h + io/qfilesystemmetadata_p.h + io/qfsfileengine.cpp io/qfsfileengine_p.h + io/qfsfileengine_iterator.cpp io/qfsfileengine_iterator_p.h + io/qiodevice.cpp io/qiodevice.h io/qiodevice_p.h + io/qipaddress.cpp io/qipaddress_p.h + io/qlockfile.cpp io/qlockfile.h io/qlockfile_p.h + io/qloggingcategory.cpp io/qloggingcategory.h + io/qloggingregistry.cpp io/qloggingregistry_p.h + io/qnoncontiguousbytedevice.cpp io/qnoncontiguousbytedevice_p.h + io/qresource.cpp io/qresource_p.h + io/qresource_iterator.cpp io/qresource_iterator_p.h + io/qsavefile.cpp io/qsavefile.h + io/qstandardpaths.cpp io/qstandardpaths.h + io/qstorageinfo.cpp io/qstorageinfo.h io/qstorageinfo_p.h + io/qtemporarydir.cpp io/qtemporarydir.h + io/qtemporaryfile.cpp io/qtemporaryfile.h io/qtemporaryfile_p.h + io/qtldurl.cpp io/qtldurl_p.h + io/qurl.cpp io/qurl.h io/qurl_p.h + io/qurlidna.cpp + io/qurlquery.cpp io/qurlquery.h + io/qurlrecode.cpp + io/qurltlds_p.h + itemmodels/qabstractitemmodel.cpp itemmodels/qabstractitemmodel.h itemmodels/qabstractitemmodel_p.h + itemmodels/qitemselectionmodel.cpp itemmodels/qitemselectionmodel.h itemmodels/qitemselectionmodel_p.h + kernel/qabstracteventdispatcher.cpp kernel/qabstracteventdispatcher.h kernel/qabstracteventdispatcher_p.h + kernel/qabstractnativeeventfilter.cpp kernel/qabstractnativeeventfilter.h + kernel/qbasictimer.cpp kernel/qbasictimer.h + kernel/qcoreapplication.cpp kernel/qcoreapplication.h kernel/qcoreapplication_p.h + kernel/qcorecmdlineargs_p.h + kernel/qcoreevent.cpp kernel/qcoreevent.h + kernel/qcoreglobaldata.cpp kernel/qcoreglobaldata_p.h + kernel/qdeadlinetimer.cpp kernel/qdeadlinetimer.h kernel/qdeadlinetimer_p.h + kernel/qelapsedtimer.cpp kernel/qelapsedtimer.h + kernel/qeventloop.cpp kernel/qeventloop.h + kernel/qfunctions_p.h + kernel/qmath.cpp kernel/qmath.h + kernel/qmetaobject.cpp kernel/qmetaobject.h kernel/qmetaobject_p.h + kernel/qmetaobject_moc_p.h + kernel/qmetaobjectbuilder.cpp kernel/qmetaobjectbuilder_p.h + kernel/qmetatype.cpp kernel/qmetatype.h kernel/qmetatype_p.h + kernel/qmetatypeswitcher_p.h + kernel/qmimedata.cpp kernel/qmimedata.h + # kernel/qobject.cpp kernel/qobject.h kernel/qobject_p.h # special case + kernel/qobject_impl.h + kernel/qobjectcleanuphandler.cpp kernel/qobjectcleanuphandler.h + kernel/qobjectdefs.h + kernel/qobjectdefs_impl.h + kernel/qpointer.cpp kernel/qpointer.h + kernel/qsharedmemory.cpp kernel/qsharedmemory.h kernel/qsharedmemory_p.h + kernel/qsignalmapper.cpp kernel/qsignalmapper.h + kernel/qsocketnotifier.cpp kernel/qsocketnotifier.h + kernel/qsystemerror.cpp kernel/qsystemerror_p.h + kernel/qsystemsemaphore.cpp kernel/qsystemsemaphore.h kernel/qsystemsemaphore_p.h + kernel/qtestsupport_core.cpp kernel/qtestsupport_core.h + kernel/qtimer.cpp kernel/qtimer.h + kernel/qtranslator.cpp kernel/qtranslator.h kernel/qtranslator_p.h + kernel/qvariant.cpp kernel/qvariant.h kernel/qvariant_p.h + plugin/qfactoryinterface.cpp plugin/qfactoryinterface.h + plugin/qfactoryloader.cpp plugin/qfactoryloader_p.h + plugin/qplugin.h plugin/qplugin_p.h + plugin/qpluginloader.cpp plugin/qpluginloader.h + plugin/quuid.cpp plugin/quuid.h + serialization/qcborarray.h + serialization/qcborcommon.cpp serialization/qcborcommon.h serialization/qcborcommon_p.h + serialization/qcbordiagnostic.cpp + serialization/qcbormap.h + serialization/qcborstream.h + serialization/qcborvalue.cpp serialization/qcborvalue.h serialization/qcborvalue_p.h + serialization/qdatastream.cpp serialization/qdatastream.h serialization/qdatastream_p.h + serialization/qjson_p.h + serialization/qjsonarray.cpp serialization/qjsonarray.h + serialization/qjsoncbor.cpp + serialization/qjsondocument.cpp serialization/qjsondocument.h + serialization/qjsonobject.cpp serialization/qjsonobject.h + serialization/qjsonparser.cpp serialization/qjsonparser_p.h + serialization/qjsonvalue.cpp serialization/qjsonvalue.h + serialization/qjsonwriter.cpp serialization/qjsonwriter_p.h + serialization/qtextstream.cpp serialization/qtextstream.h serialization/qtextstream_p.h + serialization/qxmlstream.cpp serialization/qxmlstream.h serialization/qxmlstream_p.h + serialization/qxmlutils.cpp serialization/qxmlutils_p.h + statemachine/qabstractstate.cpp statemachine/qabstractstate.h statemachine/qabstractstate_p.h + statemachine/qabstracttransition.cpp statemachine/qabstracttransition.h statemachine/qabstracttransition_p.h + statemachine/qfinalstate.cpp statemachine/qfinalstate.h statemachine/qfinalstate_p.h + statemachine/qhistorystate.cpp statemachine/qhistorystate.h statemachine/qhistorystate_p.h + statemachine/qsignaleventgenerator_p.h + statemachine/qsignaltransition.cpp statemachine/qsignaltransition.h statemachine/qsignaltransition_p.h + statemachine/qstate.cpp statemachine/qstate.h statemachine/qstate_p.h + statemachine/qstatemachine.cpp statemachine/qstatemachine.h statemachine/qstatemachine_p.h + text/qbytearray.cpp text/qbytearray.h text/qbytearray_p.h + text/qbytearraylist.cpp text/qbytearraylist.h + text/qbytearraymatcher.cpp text/qbytearraymatcher.h + text/qbytedata_p.h + text/qchar.h + text/qcollator.cpp text/qcollator.h text/qcollator_p.h + text/qdoublescanprint_p.h + text/qharfbuzz.cpp text/qharfbuzz_p.h + text/qlocale.cpp text/qlocale.h text/qlocale_p.h + text/qlocale_data_p.h + text/qlocale_tools.cpp text/qlocale_tools_p.h + text/qregexp.cpp text/qregexp.h + text/qstring.cpp text/qstring.h + text/qstring_compat.cpp + text/qstringalgorithms.h text/qstringalgorithms_p.h + text/qstringbuilder.cpp text/qstringbuilder.h + text/qstringiterator_p.h + text/qstringlist.cpp text/qstringlist.h + text/qstringliteral.h + text/qstringmatcher.h + text/qstringview.cpp text/qstringview.h + text/qtextboundaryfinder.cpp text/qtextboundaryfinder.h + text/qunicodetables_p.h + text/qunicodetools.cpp text/qunicodetools_p.h + text/qvsnprintf.cpp + thread/qmutex.h + thread/qreadwritelock.h + thread/qrunnable.cpp thread/qrunnable.h + thread/qthread.cpp thread/qthread.h + thread/qthreadstorage.h + thread/qwaitcondition.h thread/qwaitcondition_p.h + time/qcalendar.cpp time/qcalendar.h + time/qcalendarbackend_p.h + time/qcalendarmath_p.h + time/qdatetime.cpp time/qdatetime.h time/qdatetime_p.h + time/qgregoriancalendar.cpp time/qgregoriancalendar_p.h + time/qjuliancalendar.cpp time/qjuliancalendar_p.h + time/qmilankoviccalendar.cpp time/qmilankoviccalendar_p.h + time/qromancalendar.cpp time/qromancalendar_p.h + time/qromancalendar_data_p.h + tools/qalgorithms.h + tools/qarraydata.cpp tools/qarraydata.h + tools/qarraydataops.h + tools/qarraydatapointer.h + tools/qbitarray.cpp tools/qbitarray.h + tools/qcache.h + tools/qcontainerfwd.h + tools/qcontainertools_impl.h + tools/qcontiguouscache.cpp tools/qcontiguouscache.h + tools/qcryptographichash.cpp tools/qcryptographichash.h + tools/qduplicatetracker_p.h + tools/qflatmap_p.h + tools/qfreelist.cpp tools/qfreelist_p.h + tools/qhash.cpp tools/qhash.h + tools/qhashfunctions.h + tools/qiterator.h + tools/qline.cpp tools/qline.h + tools/qlinkedlist.cpp tools/qlinkedlist.h + tools/qlist.cpp tools/qlist.h + tools/qmakearray_p.h + tools/qmap.cpp tools/qmap.h + tools/qmargins.cpp tools/qmargins.h + tools/qmessageauthenticationcode.cpp tools/qmessageauthenticationcode.h + tools/qoffsetstringarray_p.h + tools/qpair.h + tools/qpoint.cpp tools/qpoint.h + tools/qqueue.h + tools/qrect.cpp tools/qrect.h + tools/qrefcount.cpp tools/qrefcount.h + tools/qringbuffer.cpp tools/qringbuffer_p.h + tools/qscopedpointer.h tools/qscopedpointer_p.h + tools/qscopedvaluerollback.h + tools/qscopeguard.h + tools/qset.h + tools/qshareddata.cpp tools/qshareddata.h + tools/qsharedpointer.cpp tools/qsharedpointer.h + tools/qsharedpointer_impl.h + tools/qsimd.cpp tools/qsimd_p.h + tools/qsize.cpp tools/qsize.h + tools/qstack.h + tools/qtools_p.h + tools/qvarlengtharray.h + tools/qvector.h + tools/qversionnumber.cpp tools/qversionnumber.h + DEFINES + QT_NO_FOREACH + QT_NO_USING_NAMESPACE + INCLUDE_DIRECTORIES + "${CMAKE_CURRENT_BINARY_DIR}/global" # special case + ../3rdparty/tinycbor/src + # special case: remove ../3rdparty/... + PRECOMPILED_HEADER + global/qt_pch.h + NO_PCH_SOURCES + "text/qstring_compat.cpp" + LIBRARIES + ZLIB::ZLIB + # double-conversion # special case + Qt::GlobalConfigPrivate # special case + QtHarfBuzz # special case + Threads::Threads # special case + WrapDoubleConversion::WrapDoubleConversion # special case + PUBLIC_LIBRARIES # special case: + Qt::Platform # special case: + # special case begin + # Generated in QtBaseGlobalTargets + EXTRA_CMAKE_FILES ${QT_CORE_RESOURCE_GENERATED_FILE_PATH} + EXTRA_CMAKE_INCLUDES ${QT_CORE_RESOURCE_GENERATED_FILE_NAME} + # special case end +) + +# special case begin +add_dependencies(Core ${QT_CMAKE_EXPORT_NAMESPACE}::moc) +add_dependencies(Core ${QT_CMAKE_EXPORT_NAMESPACE}::rcc) +add_dependencies(CorePrivate ${QT_CMAKE_EXPORT_NAMESPACE}::moc) +add_dependencies(CorePrivate ${QT_CMAKE_EXPORT_NAMESPACE}::rcc) + +if (QT_NAMESPACE STREQUAL "") +else() + target_compile_definitions(Core PUBLIC "QT_NAMESPACE=${QT_NAMESPACE}") +endif() + +qt_generate_qconfig_cpp() + +# Handle QObject: Automoc does not work for this as it would +# require to spill internals into users: +add_library(Core_qobject OBJECT) +qt_manual_moc(qobject_moc_files kernel/qobject.h global/qnamespace.h) +set_source_files_properties(${qobject_moc_files} PROPERTIES HEADER_FILE_ONLY ON) +target_sources(Core_qobject PRIVATE + global/qnamespace.h + kernel/qobject.cpp kernel/qobject.h kernel/qobject_p.h ${qobject_moc_files}) +set_target_properties(Core_qobject PROPERTIES + COMPILE_OPTIONS $<TARGET_PROPERTY:Core,COMPILE_OPTIONS> + COMPILE_DEFINITIONS $<TARGET_PROPERTY:Core,COMPILE_DEFINITIONS> + INCLUDE_DIRECTORIES $<TARGET_PROPERTY:Core,INCLUDE_DIRECTORIES> +) +target_include_directories(Core_qobject PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/kernel") # for moc_qobject.cpp +target_link_libraries(Core_qobject PRIVATE Qt::Platform Qt::GlobalConfig) +target_link_libraries(Core PRIVATE Core_qobject) + +if(NOT BUILD_SHARED_LIBS) + install( + TARGETS Core_qobject + EXPORT "${INSTALL_CMAKE_NAMESPACE}Targets" + ) +endif() + +set_property(TARGET Core APPEND PROPERTY + PUBLIC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/global/qconfig.h") +set_property(TARGET Core APPEND PROPERTY + PRIVATE_HEADER "${CMAKE_CURRENT_BINARY_DIR}/global/qconfig_p.h") + +# Find ELF interpreter and define a macro for that: +if (LINUX AND NOT CMAKE_CROSSCOMPILING AND BUILD_SHARED_LIBS) + if (NOT DEFINED ELF_INTERPRETER) + execute_process(COMMAND ${CMAKE_COMMAND} -E env LC_ALL=C readelf -l /bin/ls + RESULT_VARIABLE readelf_ok + OUTPUT_VARIABLE readelf_output + ) + if ("${readelf_ok}" STREQUAL "0" + AND "${readelf_output}" MATCHES "program interpreter: (.*)]") + set(ELF_INTERPRETER "${CMAKE_MATCH_1}" CACHE INTERNAL "ELF interpreter location") + else() + set(ELF_INTERPRETER "" CACHE INTERNAL "ELF interpreter location") + endif() + endif() + if (ELF_INTERPRETER) + target_link_options(Core PRIVATE "-Wl,-e,qt_core_boilerplate") + target_compile_definitions(Core PRIVATE ELF_INTERPRETER="${ELF_INTERPRETER}") + endif() +endif() +# special case end + +qt_add_simd_part(Core SIMD mips_dsp + SOURCES + ../gui/painting/qt_mips_asm_dsp_p.h + text/qstring_mips_dsp_asm.S +) + + +if(ANDROID) + set_property(TARGET Core APPEND PROPERTY QT_ANDROID_BUNDLED_JAR_DEPENDENCIES + jar/QtAndroid.jar + ) + set_property(TARGET Core APPEND PROPERTY QT_ANDROID_LIB_DEPENDENCIES + plugins/platforms/libplugins_platforms_qtforandroid.so + ) + set_property(TARGET Core APPEND PROPERTY QT_ANDROID_PERMISSIONS + android.permission.INTERNET android.permission.WRITE_EXTERNAL_STORAGE + ) +endif() + +#### Keys ignored in scope 1:.:.:corelib.pro:<TRUE>: +# CMAKE_DISABLED_FEATURES = "$$join(QT_DISABLED_FEATURES, "$$escape_expand(\\n) ")" +# CMAKE_HOST_DATA_DIR = "$$cmakeRelativePath($$[QT_HOST_DATA/src], $$[QT_INSTALL_PREFIX])" +# CMAKE_INSTALL_DATA_DIR = "$$cmakeRelativePath($$[QT_HOST_DATA], $$[QT_INSTALL_PREFIX])" +# HOST_BINS = "$$[QT_HOST_BINS]" +# INSTALLS = "ctest_qt5_module_files" "cmake_qt5_umbrella_module_files" +# MODULE = "core" +# MODULE_CONFIG = "moc" "resources" +# QMAKE_DSYM_DEBUG_SCRIPT = "$$PWD/debug_script.py" +# QMAKE_DYNAMIC_LIST_FILE = "$$PWD/QtCore.dynlist" +# QMAKE_PKGCONFIG_VARIABLES = "host_bins" "qt_conf" +# QMAKE_SUBSTITUTES = "ctest_macros_file" "cmake_umbrella_config_file" "cmake_umbrella_config_module_location" "cmake_umbrella_config_module_location_for_install" "cmake_umbrella_config_version_file" "cmake_extras_mkspec_dir" "cmake_extras_mkspec_dir_for_install" +# cmake_extras_mkspec_dir.input = "$$PWD/Qt5CoreConfigExtrasMkspecDir.cmake.in" +# cmake_extras_mkspec_dir.output = "$$DESTDIR/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake" +# cmake_extras_mkspec_dir_for_install.input = "$$PWD/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in" +# cmake_extras_mkspec_dir_for_install.output = "$$DESTDIR/cmake/install/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake" +# cmake_qt5_umbrella_module_files.files = "$$cmake_umbrella_config_file.output" "$$cmake_umbrella_config_version_file.output" "$$cmake_umbrella_config_module_location_for_install.output" +# cmake_qt5_umbrella_module_files.path = "$$[QT_INSTALL_LIBS]/cmake/Qt5" +# cmake_umbrella_config_file.input = "$$PWD/Qt5Config.cmake.in" +# cmake_umbrella_config_file.output = "$$DESTDIR/cmake/Qt5/Qt5Config.cmake" +# cmake_umbrella_config_module_location.input = "$$PWD/Qt5ModuleLocation.cmake.in" +# cmake_umbrella_config_module_location.output = "$$DESTDIR/cmake/Qt5/Qt5ModuleLocation.cmake" +# cmake_umbrella_config_module_location_for_install.input = "$$PWD/Qt5ModuleLocationForInstall.cmake.in" +# cmake_umbrella_config_module_location_for_install.output = "$$DESTDIR/cmake/install/Qt5/Qt5ModuleLocation.cmake" +# cmake_umbrella_config_version_file.input = "$$PWD/../../mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in" +# cmake_umbrella_config_version_file.output = "$$DESTDIR/cmake/Qt5/Qt5ConfigVersion.cmake" +# ctest_macros_file.CONFIG = "verbatim" +# ctest_macros_file.input = "$$PWD/Qt5CTestMacros.cmake" +# ctest_macros_file.output = "$$DESTDIR/cmake/Qt5Core/Qt5CTestMacros.cmake" +# ctest_qt5_module_files.files = "$$ctest_macros_file.output" "$$cmake_extras_mkspec_dir_for_install.output" +# ctest_qt5_module_files.path = "$$[QT_INSTALL_LIBS]/cmake/Qt5Core" +# host_bins.name = "host_bins" +# host_bins.variable = "HOST_BINS" +# qt_conf.name = "qt_config" +# qt_conf.variable = "QT_CONFIG" + +## Scopes: +##################################################################### + +#### Keys ignored in scope 2:.:.:corelib.pro:QT_FEATURE_gc_binaries: +# MODULE_CONFIG = "gc_binaries" + +#### Keys ignored in scope 3:.:.:corelib.pro:NOT QT_NAMESPACE_ISEMPTY: +# MODULE_DEFINES = "QT_NAMESPACE=$$QT_NAMESPACE" + +qt_extend_target(Core CONDITION ANDROID + SOURCES + kernel/qsharedmemory_android.cpp + kernel/qsystemsemaphore_android.cpp + DEFINES + LIBS_SUFFIX="\\\\"_${CMAKE_SYSTEM_PROCESSOR}.so\\\\"" # special case +) + +qt_extend_target(Core CONDITION MSVC AND (TEST_architecture_arch STREQUAL "i386") + LINK_OPTIONS + "/BASE:0x67000000" +) + +#### Keys ignored in scope 6:.:.:corelib.pro:FREEBSD OR OPENBSD: +# QMAKE_LFLAGS_NOUNDEF = <EMPTY> + +qt_extend_target(Core CONDITION QT_FEATURE_animation + SOURCES + animation/qabstractanimation.cpp animation/qabstractanimation.h animation/qabstractanimation_p.h + animation/qanimationgroup.cpp animation/qanimationgroup.h animation/qanimationgroup_p.h + animation/qparallelanimationgroup.cpp animation/qparallelanimationgroup.h animation/qparallelanimationgroup_p.h + animation/qpauseanimation.cpp animation/qpauseanimation.h + animation/qpropertyanimation.cpp animation/qpropertyanimation.h animation/qpropertyanimation_p.h + animation/qsequentialanimationgroup.cpp animation/qsequentialanimationgroup.h animation/qsequentialanimationgroup_p.h + animation/qvariantanimation.cpp animation/qvariantanimation.h animation/qvariantanimation_p.h +) + +qt_extend_target(Core CONDITION WIN32 + SOURCES + global/qoperatingsystemversion_win.cpp global/qoperatingsystemversion_win_p.h + io/qfilesystemengine_win.cpp + io/qfsfileengine_win.cpp + io/qlockfile_win.cpp + kernel/qcoreapplication_win.cpp + kernel/qelapsedtimer_win.cpp + kernel/qsharedmemory_win.cpp + kernel/qsystemsemaphore_win.cpp + kernel/qwineventnotifier.cpp kernel/qwineventnotifier.h kernel/qwineventnotifier_p.h + plugin/qsystemlibrary.cpp plugin/qsystemlibrary_p.h + thread/qatomic_msvc.h + thread/qthread_win.cpp + # DEFINES # special case: remove + LIBRARIES + ws2_32 +) + +qt_extend_target(Core CONDITION WIN32 AND NOT WINRT + SOURCES + io/qstandardpaths_win.cpp + io/qstorageinfo_win.cpp + io/qwindowspipereader.cpp io/qwindowspipereader_p.h + io/qwindowspipewriter.cpp io/qwindowspipewriter_p.h + kernel/qeventdispatcher_win.cpp kernel/qeventdispatcher_win_p.h + kernel/qwinregistry.cpp kernel/qwinregistry_p.h + LIBRARIES + advapi32 + kernel32 + netapi32 + ole32 + shell32 + user32 + uuid + version + winmm + PUBLIC_LIBRARIES + mpr + userenv +) + +qt_extend_target(Core CONDITION APPLE + SOURCES + global/qoperatingsystemversion_darwin.mm + io/qstandardpaths_mac.mm + io/qstorageinfo_mac.cpp + kernel/qcfsocketnotifier.cpp kernel/qcfsocketnotifier_p.h + kernel/qcore_foundation.mm + kernel/qcore_mac.cpp kernel/qcore_mac_p.h + kernel/qcore_mac_objc.mm + kernel/qcoreapplication_mac.cpp + kernel/qeventdispatcher_cf.mm kernel/qeventdispatcher_cf_p.h + LIBRARIES + ${FWCoreFoundation} + ${FWFoundation} +) + +qt_extend_target(Core CONDITION APPLE_OSX + LIBRARIES + ${FWAppKit} + ${FWApplicationServices} + ${FWCoreServices} + ${FWSecurity} + PUBLIC_LIBRARIES + ${FWDiskArbitration} + ${FWIOKit} +) + +qt_extend_target(Core CONDITION INTEGRITY + LIBRARIES + ivfs + net + posix + shm_client + socket + COMPILE_OPTIONS + --pending_instantiations=128 +) + +#### Keys ignored in scope 15:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_HOST_DATA_DIR): +# CMAKE_HOST_DATA_DIR = "$$[QT_HOST_DATA/src]/" +# CMAKE_HOST_DATA_DIR_IS_ABSOLUTE = "True" + +#### Keys ignored in scope 16:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_INSTALL_DATA_DIR): +# CMAKE_INSTALL_DATA_DIR = "$$[QT_HOST_DATA]/" +# CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE = "True" + +#### Keys ignored in scope 21:.:global:global/global.pri:QT_CPU_FEATURES__ss_QT_ARCH___contains___f16c: +# f16c_cxx = "true" + +#### Keys ignored in scope 23:.:global:global/global.pri:CLANG OR intel_icl OR ICC: +# f16c_cxx = "false" + +#### Keys ignored in scope 25:.:global:global/global.pri:GCC AND f16c AND x86SimdAlways: +# f16c_cxx = "true" + +#### Keys ignored in scope 27:.:global:global/global.pri:MSVC AND QT_CPU_FEATURES__ss_QT_ARCH___contains___avx: +# f16c_cxx = "true" + +#### Keys ignored in scope 28:.:global:global/global.pri:else: +# f16c_cxx = "false" + +# extend_target(Core CONDITION _ss_f16c_cxx ... # special case remove: Handled manually + +# special case begin +# Remove this because it's handled manually +#extend_target(Core CONDITION NOT _x_-armcc_x_ AND NOT cross_compile AND NOT static AND (hurd_x_ OR linux_x_) +# DEFINES +# ELF_INTERPRETER=\\\"=Creadelf-l/bin/ls|perl-n-e\'['quote', ['if', ['/program', 'interpreter:', ['.*'], ']/'], '{', 'print', '$1;', '}']]\'\\\" +# LINK_OPTIONS +# "-Wl,-e,qt_core_boilerplate" +#) +# special case end + +qt_extend_target(Core CONDITION LINUX AND NOT static + SOURCES + global/minimum-linux_p.h +) + +#### Keys ignored in scope 35:.:global:global/global.pri:precompile_header: +# NO_PCH_ASM = "global/minimum-linux.S" +# QMAKE_EXTRA_COMPILERS = "no_pch_assembler" +# no_pch_assembler.commands = "$$QMAKE_CC" "-c" "$(CFLAGS)" "$(INCPATH)" "${QMAKE_FILE_IN}" "-o" "${QMAKE_FILE_OUT}" +# no_pch_assembler.dependency_type = "TYPE_C" +# no_pch_assembler.input = "NO_PCH_ASM" +# no_pch_assembler.name = "compiling[no_pch]" "${QMAKE_FILE_IN}" +# no_pch_assembler.output = "${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${firstQMAKE_EXT_OBJ}" + +#### Keys ignored in scope 36:.:global:global/global.pri:silent: +# no_pch_assembler.commands = "@echo" "compiling[no_pch]" "${QMAKE_FILE_IN}" "&&" + +qt_extend_target(Core CONDITION LINUX AND NOT precompile_header AND NOT static + SOURCES + global/minimum-linux.S +) + +qt_extend_target(Core CONDITION QT_FEATURE_slog2 + LIBRARIES + Slog2::Slog2 +) + +qt_extend_target(Core CONDITION QT_FEATURE_journald + LIBRARIES + PkgConfig::Libsystemd +) + +#### Keys ignored in scope 40:.:global:global/global.pri:GCC AND ltcg: +# QMAKE_EXTRA_COMPILERS = "versiontagging_compiler" +# versiontagging_compiler.commands = "$$QMAKE_CXX" "-c" "$(CXXFLAGS)" "$(INCPATH)" "-fno-lto" "-o" "${QMAKE_FILE_OUT}" "${QMAKE_FILE_IN}" +# versiontagging_compiler.dependency_type = "TYPE_C" +# versiontagging_compiler.input = "VERSIONTAGGING_SOURCES" +# versiontagging_compiler.name = "compiling[versiontagging]" "${QMAKE_FILE_IN}" +# versiontagging_compiler.output = "${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${firstQMAKE_EXT_OBJ}" +# versiontagging_compiler.variable_out = "OBJECTS" + +#### Keys ignored in scope 41:.:global:global/global.pri:silent: +# versiontagging_compiler.commands = "@echo" "compiling[versiontagging]" "${QMAKE_FILE_IN}" "&&" + +qt_extend_target(Core CONDITION NOT GCC OR NOT ltcg + SOURCES + global/qversiontagging.cpp +) + +qt_extend_target(Core CONDITION UNIX + SOURCES + io/qfilesystemengine_unix.cpp + io/qfilesystemiterator_unix.cpp + io/qfsfileengine_unix.cpp + io/qlockfile_unix.cpp + kernel/qcore_unix.cpp kernel/qcore_unix_p.h + kernel/qeventdispatcher_unix.cpp kernel/qeventdispatcher_unix_p.h + kernel/qpoll_p.h + kernel/qtimerinfo_unix.cpp kernel/qtimerinfo_unix_p.h + thread/qthread_unix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_thread + SOURCES + thread/qatomic.cpp thread/qatomic.h + thread/qatomic_bootstrap.h + thread/qatomic_cxx11.h + thread/qbasicatomic.h + thread/qfutex_p.h + thread/qgenericatomic.h + thread/qlocking_p.h + thread/qmutex.cpp thread/qmutex_p.h + thread/qorderedmutexlocker_p.h + thread/qreadwritelock.cpp thread/qreadwritelock_p.h + thread/qsemaphore.cpp thread/qsemaphore.h + thread/qthread_p.h + thread/qthreadpool.cpp thread/qthreadpool.h thread/qthreadpool_p.h + thread/qthreadstorage.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_thread AND WIN32 + SOURCES + thread/qmutex_win.cpp + thread/qwaitcondition_win.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_thread AND UNIX + SOURCES + thread/qwaitcondition_unix.cpp +) + +qt_extend_target(Core CONDITION APPLE AND QT_FEATURE_thread + SOURCES + thread/qmutex_mac.cpp +) + +qt_extend_target(Core CONDITION LINUX AND QT_FEATURE_thread + SOURCES + thread/qmutex_linux.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_thread AND UNIX AND NOT APPLE AND NOT LINUX + SOURCES + thread/qmutex_unix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_future + SOURCES + thread/qexception.cpp thread/qexception.h + thread/qfuture.h + thread/qfutureinterface.cpp thread/qfutureinterface.h thread/qfutureinterface_p.h + thread/qfuturesynchronizer.h + thread/qfuturewatcher.cpp thread/qfuturewatcher.h thread/qfuturewatcher_p.h + thread/qresultstore.cpp thread/qresultstore.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_std_atomic64 + PUBLIC_LIBRARIES + Atomic +) + +qt_extend_target(Core CONDITION ICC + COMPILE_OPTIONS + -fp-model + strict +) + +qt_extend_target(Core CONDITION MSVC + SOURCES + tools/qvector_msvc.cpp + NO_PCH_SOURCES + "tools/qvector_msvc.cpp" +) + +qt_extend_target(Core CONDITION QT_FEATURE_commandlineparser + SOURCES + tools/qcommandlineoption.cpp tools/qcommandlineoption.h + tools/qcommandlineparser.cpp tools/qcommandlineparser.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_easingcurve + SOURCES + tools/qeasingcurve.cpp tools/qeasingcurve.h + tools/qtimeline.cpp tools/qtimeline.h +) + +qt_extend_target(Core CONDITION UNIX AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS AND NOT WASM AND (NOT APPLE_OSX OR NOT ICC) + LIBRARIES + m +) + +qt_extend_target(Core CONDITION APPLE AND NOT NACL + SOURCES + kernel/qelapsedtimer_mac.cpp + text/qlocale_mac.mm +) + +qt_extend_target(Core CONDITION UNIX AND (NACL OR NOT APPLE) + SOURCES + text/qlocale_unix.cpp +) + +qt_extend_target(Core CONDITION WIN32 AND (NACL OR NOT APPLE) + SOURCES + text/qlocale_win.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_icu + SOURCES + text/qcollator_icu.cpp + text/qlocale_icu.cpp + LIBRARIES + ICU::i18n ICU::uc ICU::data +) + +qt_extend_target(Core CONDITION WIN32 AND NOT QT_FEATURE_icu + SOURCES + text/qcollator_win.cpp +) + +qt_extend_target(Core CONDITION APPLE_OSX AND NOT QT_FEATURE_icu + SOURCES + text/qcollator_macx.cpp +) + +qt_extend_target(Core CONDITION UNIX AND NOT APPLE_OSX AND NOT QT_FEATURE_icu + SOURCES + text/qcollator_posix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_regularexpression + SOURCES + text/qregularexpression.cpp text/qregularexpression.h + LIBRARIES + WrapPCRE2::WrapPCRE2 +) + +qt_extend_target(Core CONDITION QT_FEATURE_hijricalendar + SOURCES + time/qhijricalendar.cpp time/qhijricalendar_p.h + time/qhijricalendar_data_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_islamiccivilcalendar + SOURCES + time/qislamiccivilcalendar.cpp time/qislamiccivilcalendar_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_jalalicalendar + SOURCES + time/qjalalicalendar.cpp time/qjalalicalendar_p.h + time/qjalalicalendar_data_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_timezone + SOURCES + time/qtimezone.cpp time/qtimezone.h + time/qtimezoneprivate.cpp time/qtimezoneprivate_p.h + time/qtimezoneprivate_data_p.h +) + +qt_extend_target(Core CONDITION APPLE AND QT_FEATURE_timezone AND NOT NACL + SOURCES + time/qtimezoneprivate_mac.mm +) + +qt_extend_target(Core CONDITION ANDROID AND QT_FEATURE_timezone AND NOT ANDROID_EMBEDDED AND (NACL OR NOT APPLE) + SOURCES + time/qtimezoneprivate_android.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_timezone AND UNIX AND (ANDROID_EMBEDDED OR NOT ANDROID) AND (NACL OR NOT APPLE) + SOURCES + time/qtimezoneprivate_tz.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_icu AND QT_FEATURE_timezone AND UNIX AND (ANDROID_EMBEDDED OR NOT ANDROID) AND (NACL OR NOT APPLE) + SOURCES + time/qtimezoneprivate_icu.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_icu AND QT_FEATURE_timezone AND WIN32 AND (ANDROID_EMBEDDED OR NOT ANDROID) AND (NACL OR NOT APPLE) + SOURCES + time/qtimezoneprivate_icu.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_timezone AND WIN32 AND NOT QT_FEATURE_icu AND (ANDROID_EMBEDDED OR NOT ANDROID) AND (NACL OR NOT APPLE) + SOURCES + time/qtimezoneprivate_win.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_datetimeparser + SOURCES + time/qdatetimeparser.cpp time/qdatetimeparser_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_zstd + LIBRARIES + ZSTD::ZSTD +) + +qt_extend_target(Core CONDITION QT_FEATURE_filesystemwatcher + SOURCES + io/qfilesystemwatcher.cpp io/qfilesystemwatcher.h io/qfilesystemwatcher_p.h + io/qfilesystemwatcher_polling.cpp io/qfilesystemwatcher_polling_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_filesystemwatcher AND WIN32 + SOURCES + io/qfilesystemwatcher_win.cpp io/qfilesystemwatcher_win_p.h +) + +qt_extend_target(Core CONDITION APPLE_OSX AND QT_FEATURE_filesystemwatcher + SOURCES + io/qfilesystemwatcher_fsevents.mm io/qfilesystemwatcher_fsevents_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_filesystemwatcher AND QT_FEATURE_inotify AND UNIX AND NOT APPLE_OSX + SOURCES + io/qfilesystemwatcher_inotify.cpp io/qfilesystemwatcher_inotify_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_filesystemwatcher AND UNIX AND NOT APPLE_OSX AND NOT QT_FEATURE_inotify AND (APPLE OR FREEBSD OR NETBSD OR OPENBSD) + SOURCES + io/qfilesystemwatcher_kqueue.cpp io/qfilesystemwatcher_kqueue_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_processenvironment + SOURCES + io/qprocess.cpp io/qprocess.h io/qprocess_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_processenvironment AND WIN32 AND NOT WINRT + SOURCES + io/qprocess_win.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_processenvironment AND UNIX + SOURCES + io/qprocess_unix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_settings + SOURCES + io/qsettings.cpp io/qsettings.h io/qsettings_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_settings AND WIN32 AND NOT WINRT + SOURCES + io/qsettings_win.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_settings AND WINRT + SOURCES + io/qsettings_winrt.cpp +) + +qt_extend_target(Core CONDITION APPLE AND QT_FEATURE_settings AND NOT NACL + SOURCES + io/qsettings_mac.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_settings AND WASM + SOURCES + io/qsettings_wasm.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_filesystemiterator AND WIN32 + SOURCES + io/qfilesystemiterator_win.cpp +) + +qt_extend_target(Core CONDITION WINRT + SOURCES + io/qstandardpaths_winrt.cpp + io/qstorageinfo_stub.cpp + kernel/qeventdispatcher_winrt.cpp kernel/qeventdispatcher_winrt_p.h + kernel/qfunctions_fake_env_p.h + kernel/qfunctions_winrt.cpp kernel/qfunctions_winrt.h +) + +qt_extend_target(Core CONDITION UNIX AND NOT APPLE_UIKIT AND NOT INTEGRITY AND NOT rtems + SOURCES + ../3rdparty/forkfd/forkfd.h + io/forkfd_qt.cpp + INCLUDE_DIRECTORIES + ../3rdparty/forkfd +) + +qt_extend_target(Core CONDITION APPLE AND QT_FEATURE_processenvironment + SOURCES + io/qprocess_darwin.mm +) + +qt_extend_target(Core CONDITION APPLE AND NOT APPLE_OSX + PUBLIC_LIBRARIES + ${FWMobileCoreServices} +) + +qt_extend_target(Core CONDITION ANDROID AND NOT ANDROID_EMBEDDED + SOURCES + io/qstandardpaths_android.cpp + io/qstorageinfo_unix.cpp + kernel/qjni.cpp kernel/qjni_p.h + kernel/qjnihelpers.cpp kernel/qjnihelpers_p.h + kernel/qjnionload.cpp +) + +qt_extend_target(Core CONDITION HAIKU AND (ANDROID_EMBEDDED OR NOT ANDROID) + SOURCES + io/qstandardpaths_haiku.cpp + io/qstorageinfo_unix.cpp + PUBLIC_LIBRARIES + be +) + +qt_extend_target(Core CONDITION UNIX AND NOT APPLE AND NOT HAIKU AND (ANDROID_EMBEDDED OR NOT ANDROID) + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_proxymodel + SOURCES + itemmodels/qabstractproxymodel.cpp itemmodels/qabstractproxymodel.h itemmodels/qabstractproxymodel_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_concatenatetablesproxymodel AND QT_FEATURE_proxymodel + SOURCES + itemmodels/qconcatenatetablesproxymodel.cpp itemmodels/qconcatenatetablesproxymodel.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_identityproxymodel AND QT_FEATURE_proxymodel + SOURCES + itemmodels/qidentityproxymodel.cpp itemmodels/qidentityproxymodel.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_proxymodel AND QT_FEATURE_sortfilterproxymodel + SOURCES + itemmodels/qsortfilterproxymodel.cpp itemmodels/qsortfilterproxymodel.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_proxymodel AND QT_FEATURE_transposeproxymodel + SOURCES + itemmodels/qtransposeproxymodel.cpp itemmodels/qtransposeproxymodel.h itemmodels/qtransposeproxymodel_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_stringlistmodel + SOURCES + itemmodels/qstringlistmodel.cpp itemmodels/qstringlistmodel.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_library + SOURCES + plugin/qelfparser_p.cpp plugin/qelfparser_p.h + plugin/qlibrary.cpp plugin/qlibrary.h plugin/qlibrary_p.h + plugin/qmachparser.cpp plugin/qmachparser_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_library AND UNIX + SOURCES + plugin/qlibrary_unix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_library AND WIN32 + SOURCES + plugin/qlibrary_win.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_dlopen AND QT_FEATURE_library + LIBRARIES + ${CMAKE_DL_LIBS} +) + +qt_extend_target(Core CONDITION APPLE AND (APPLE_IOS OR APPLE_TVOS) + LIBRARIES + ${FWUIKit} +) + +qt_extend_target(Core CONDITION APPLE_WATCHOS + LIBRARIES + ${FWWatchKit} +) + +qt_extend_target(Core CONDITION NACL + SOURCES + kernel/qfunctions_nacl.cpp kernel/qfunctions_nacl.h +) + +qt_extend_target(Core CONDITION INTEGRITY OR (NACL AND UNIX) OR (UNIX AND NOT APPLE) + SOURCES + kernel/qelapsedtimer_unix.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_poll_select AND UNIX + SOURCES + kernel/qpoll.cpp +) + +qt_extend_target(Core CONDITION QT_FEATURE_glib AND UNIX + SOURCES + kernel/qeventdispatcher_glib.cpp kernel/qeventdispatcher_glib_p.h + LIBRARIES + GLIB2::GLIB2 +) + +qt_extend_target(Core CONDITION QT_FEATURE_clock_gettime AND UNIX + LIBRARIES + WrapRt +) + +qt_extend_target(Core CONDITION UNIX AND NOT ANDROID + SOURCES + kernel/qsharedmemory_posix.cpp + kernel/qsharedmemory_systemv.cpp + kernel/qsharedmemory_unix.cpp + kernel/qsystemsemaphore_posix.cpp + kernel/qsystemsemaphore_systemv.cpp + kernel/qsystemsemaphore_unix.cpp +) + +qt_extend_target(Core CONDITION VXWORKS + SOURCES + kernel/qfunctions_vxworks.cpp kernel/qfunctions_vxworks.h +) + +qt_extend_target(Core CONDITION QNX AND QT_FEATURE_qqnx_pps + SOURCES + kernel/qppsattribute.cpp kernel/qppsattribute_p.h + kernel/qppsattributeprivate_p.h + kernel/qppsobject.cpp kernel/qppsobject_p.h + kernel/qppsobjectprivate_p.h + LIBRARIES + PPS::PPS +) + +qt_extend_target(Core CONDITION QT_FEATURE_textcodec + SOURCES + codecs/qlatincodec.cpp codecs/qlatincodec_p.h + codecs/qsimplecodec.cpp codecs/qsimplecodec_p.h + codecs/qtextcodec.cpp codecs/qtextcodec.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_codecs AND QT_FEATURE_textcodec + SOURCES + codecs/qisciicodec.cpp codecs/qisciicodec_p.h + codecs/qtsciicodec.cpp codecs/qtsciicodec_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_icu AND QT_FEATURE_textcodec + SOURCES + codecs/qicucodec.cpp codecs/qicucodec_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_big_codecs AND QT_FEATURE_textcodec AND NOT QT_FEATURE_icu + SOURCES + codecs/qbig5codec.cpp codecs/qbig5codec_p.h + codecs/qeucjpcodec.cpp codecs/qeucjpcodec_p.h + codecs/qeuckrcodec.cpp codecs/qeuckrcodec_p.h + codecs/qgb18030codec.cpp codecs/qgb18030codec_p.h + codecs/qjiscodec.cpp codecs/qjiscodec_p.h + codecs/qjpunicode.cpp + codecs/qsjiscodec.cpp codecs/qsjiscodec_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_iconv AND QT_FEATURE_textcodec AND NOT QT_FEATURE_icu + SOURCES + codecs/qiconvcodec.cpp codecs/qiconvcodec_p.h + LIBRARIES + iconv +) + +qt_extend_target(Core CONDITION QT_FEATURE_textcodec AND WIN32 AND NOT QT_FEATURE_icu + SOURCES + codecs/qwindowscodec.cpp codecs/qwindowscodec_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_cborstreamreader + SOURCES + serialization/qcborstreamreader.cpp serialization/qcborstreamreader.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_cborstreamwriter + SOURCES + serialization/qcborstreamwriter.cpp serialization/qcborstreamwriter.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_binaryjson + SOURCES + serialization/qbinaryjson.cpp serialization/qbinaryjson_p.h + serialization/qbinaryjsonarray.cpp serialization/qbinaryjsonarray_p.h + serialization/qbinaryjsonobject.cpp serialization/qbinaryjsonobject_p.h + serialization/qbinaryjsonvalue.cpp serialization/qbinaryjsonvalue_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_qeventtransition + SOURCES + statemachine/qeventtransition.cpp statemachine/qeventtransition.h statemachine/qeventtransition_p.h +) + +qt_extend_target(Core CONDITION QT_FEATURE_mimetype + SOURCES + mimetypes/qmimedatabase.cpp mimetypes/qmimedatabase.h mimetypes/qmimedatabase_p.h + mimetypes/qmimeglobpattern.cpp mimetypes/qmimeglobpattern_p.h + mimetypes/qmimemagicrule.cpp mimetypes/qmimemagicrule_p.h + mimetypes/qmimemagicrulematcher.cpp mimetypes/qmimemagicrulematcher_p.h + mimetypes/qmimeprovider.cpp mimetypes/qmimeprovider_p.h + mimetypes/qmimetype.cpp mimetypes/qmimetype.h mimetypes/qmimetype_p.h + mimetypes/qmimetypeparser.cpp mimetypes/qmimetypeparser_p.h +) + +#### Keys ignored in scope 197:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_mimetype: +# MIME_DATABASE = "mimetypes/mime/packages/freedesktop.org.xml" +# OTHER_FILES = "$$MIME_DATABASE" + +# special case begin +# qt_extend_target(Core CONDITION QT_FEATURE_mimetype AND QT_FEATURE_mimetype_database +# INCLUDE_DIRECTORIES +# .rcc +#) +# special case end + +#### Keys ignored in scope 198:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_mimetype_database: +# QMAKE_EXTRA_COMPILERS = "mimedb" +# mimedb.commands = "${QMAKE_FILE_IN}" ">" "${QMAKE_FILE_OUT}" +# mimedb.depends = "$$PWD/mime/generate.pl" +# mimedb.input = "MIME_DATABASE" +# mimedb.output = "$$outpath/qmimeprovider_database.cpp" +# mimedb.variable_out = "INCLUDED_SOURCES" + +#### Keys ignored in scope 200:.:mimetypes:mimetypes/mimetypes.pri:(CMAKE_BUILD_TYPE STREQUAL Debug): +# outpath = ".rcc/debug" + +#### Keys ignored in scope 201:.:mimetypes:mimetypes/mimetypes.pri:else: +# outpath = ".rcc/release" + +#### Keys ignored in scope 202:.:mimetypes:mimetypes/mimetypes.pri:MAKEFILE_GENERATOR___equals___MSVC.NET OR MAKEFILE_GENERATOR___equals___MSBUILD OR QMAKE_SH_ISEMPTY: +# mimedb.commands = "cmd" "/c" "$$shell_path($$PWD/mime/generate.bat)" +# mimedb.depends = "$$PWD/mime/generate.bat" "$$PWD/mime/hexdump.ps1" + +#### Keys ignored in scope 203:.:mimetypes:mimetypes/mimetypes.pri:else: +# mimedb.commands = "perl" "$${mimedb.depends}" + +#### Keys ignored in scope 204:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_zstd: +# mimedb.commands = "--zstd" +# Resources: +# special case begin +# We can't specify the resources directly as we have unit tests that +# depend on these as well and we no longer support the use of hand +# edited qrc files. +if(QT_FEATURE_mimetype AND QT_FEATURE_mimetype_database) + include(${CMAKE_CURRENT_SOURCE_DIR}/mimetypes/mimetypes_resources.cmake) + corelib_add_mimetypes_resources(Core) + +# Generate qmimeprovider_database.cpp + set(qmimeprovider_db_output "${CMAKE_CURRENT_BINARY_DIR}/.rcc/qmimeprovider_database.cpp") + set(command_args "") + set(mime_dir "${CMAKE_CURRENT_SOURCE_DIR}/mimetypes/mime") + set(command_depends "${mime_dir}/generate.pl" "${corelib_mimetypes_resource_file}") + if (MSVC) + list(APPEND command_args "${mime_dir}/generate.bat" "${mime_dir}/hexdump.ps1" ) + list(APPEND command_depends "${mime_dir}/generate.bat" "${mime_dir}/hexdump.ps1" ) + else() + list(APPEND command_args perl "${mime_dir}/generate.pl" ) + endif() + + if (QT_FEATURE_zstd) + list(APPEND command_args "--zstd") + endif() + + list(APPEND command_args "${corelib_mimetypes_resource_file}" ">" "${qmimeprovider_db_output}") + + add_custom_command(OUTPUT "${qmimeprovider_db_output}" + DEPENDS ${command_depends} + COMMAND ${command_args} + COMMENT "Generating ${qmimeprovider_db_output}" + ) + + target_sources(Core PRIVATE ${qmimeprovider_db_output}) + set_source_files_properties(${qmimeprovider_db_output} PROPERTIES HEADER_FILE_ONLY TRUE) + target_include_directories(Core PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/.rcc") +endif() + +# special case end + +qt_extend_target(Core CONDITION WASM + SOURCES + platform/wasm/qstdweb.cpp platform/wasm/qstdweb_p.h +) + +# special case begin +# needs refinement for the other compiler specific cases. +if(TEST_arch_${TEST_architecture_arch}_subarch_f16c) + # Equivalent to contains(QT_CPU_FEATURES.$$QT_ARCH, f16c) + extend_target(Core + DEFINES + QFLOAT16_INCLUDE_FAST + ) +else() + qt_add_simd_part(Core SIMD f16c + SOURCES + global/qfloat16_f16c.c + ) +endif() + +set_source_files_properties( + thread/qmutex_linux.cpp + thread/qmutex_mac.cpp + thread/qmutex_unix.cpp + thread/qmutex_win.cpp + PROPERTIES HEADER_FILE_ONLY ON) # special case: These files are included by qmutex.cpp! + + +# Remove QT_NO_CAST_TO_ASCII to ensure that the symbols are included in the library. +if(WIN32) + get_target_property(defines Core COMPILE_DEFINITIONS) + list(REMOVE_ITEM defines QT_NO_CAST_TO_ASCII) + set_target_properties(Core PROPERTIES COMPILE_DEFINITIONS "${defines}") +endif() + +qt_internal_add_link_flags_gc_sections(Core PRIVATE) + +if(WIN32) + set(isExe $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>) + set(isWin32 $<BOOL:$<TARGET_PROPERTY:WIN32_EXECUTABLE>>) + set(isNotExcluded $<NOT:$<BOOL:$<TARGET_PROPERTY:Qt5_NO_LINK_QTMAIN>>>) + set(isPolicyNEW $<TARGET_POLICY:CMP0020>) + + target_link_libraries(Core INTERFACE $<$<AND:${isExe},${isWin32},${isNotExcluded},${isPolicyNEW}>:Qt::WinMain>) + qt_record_extra_qt_package_dependency(Core WinMain "${PROJECT_VERSION}") +endif() +# special case end + +qt_create_tracepoints(Core qtcore.tracepoints) +qt_add_docs(Core + doc/qtcore.qdocconf +) + diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in deleted file mode 100644 index 4c1c3a612b..0000000000 --- a/src/corelib/Qt5CoreConfigExtras.cmake.in +++ /dev/null @@ -1,203 +0,0 @@ -if(NOT DEFINED QT_DEFAULT_MAJOR_VERSION) - set(QT_DEFAULT_MAJOR_VERSION 5) -endif() - -if (NOT TARGET Qt5::qmake) - add_executable(Qt5::qmake IMPORTED) - -!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") -!!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") -!!ENDIF - _qt5_Core_check_file_exists(${imported_location}) - - set_target_properties(Qt5::qmake PROPERTIES - IMPORTED_LOCATION ${imported_location} - ) -endif() - -if (NOT TARGET Qt5::moc) - add_executable(Qt5::moc IMPORTED) - -!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") -!!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") -!!ENDIF - _qt5_Core_check_file_exists(${imported_location}) - - set_target_properties(Qt5::moc PROPERTIES - IMPORTED_LOCATION ${imported_location} - ) - # For CMake automoc feature - get_target_property(QT_MOC_EXECUTABLE Qt5::moc LOCATION) -endif() - -if (NOT TARGET Qt5::rcc) - add_executable(Qt5::rcc IMPORTED) - -!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") -!!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") -!!ENDIF - _qt5_Core_check_file_exists(${imported_location}) - - set_target_properties(Qt5::rcc PROPERTIES - IMPORTED_LOCATION ${imported_location} - ) -endif() - -set(CMAKE_AUTOMOC_MACRO_NAMES "Q_OBJECT" "Q_GADGET" "Q_NAMESPACE" "Q_NAMESPACE_EXPORT") - -set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake) -set(Qt5Core_MOC_EXECUTABLE Qt5::moc) -set(Qt5Core_RCC_EXECUTABLE Qt5::rcc) - -set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_MAJOR_VERSION 5) -set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_COORD_TYPE $$QT_COORD_TYPE) -set_property(TARGET Qt5::Core APPEND PROPERTY - COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION QT_COORD_TYPE -) - -include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5CoreConfigExtrasMkspecDir.cmake\") - -foreach(_dir ${_qt5_corelib_extra_includes}) - _qt5_Core_check_file_exists(${_dir}) -endforeach() - -list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes}) -set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes}) -set(_qt5_corelib_extra_includes) - -# Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The -# Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module -# macro to add it. -set(Qt5_POSITION_INDEPENDENT_CODE True) - -# On x86 and x86-64 systems with ELF binaries (especially Linux), due to -# a new optimization in GCC 5.x in combination with a recent version of -# GNU binutils, compiling Qt applications with -fPIE is no longer -# enough. -# Applications now need to be compiled with the -fPIC option if the Qt option -# \"reduce relocations\" is active. For backward compatibility only, Qt accepts -# the use of -fPIE for GCC 4.x versions. -set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $$QMAKE_CXXFLAGS_APP) - -# TODO Qt6: Remove -set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"\") - -!!IF !isEmpty(QT_NAMESPACE) -list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE) -list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE) -set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE) -!!ENDIF - -!!IF !isEmpty(CMAKE_DISABLED_FEATURES) -set(Qt5_DISABLED_FEATURES - $$CMAKE_DISABLED_FEATURES -) -!!ENDIF - -set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>) - -set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype) - -!!IF qtConfig(reduce_exports) -set(QT_VISIBILITY_AVAILABLE \"True\") -!!ENDIF - -!!IF !isEmpty(QT_LIBINFIX) -set(QT_LIBINFIX \"$${QT_LIBINFIX}\") -!!ENDIF - -!!IF !isEmpty(CMAKE_WINDOWS_BUILD) -set(Qt5Core_QTMAIN_LIBRARIES Qt5::WinMain) - -if (NOT TARGET Qt5::WinMain) - add_library(Qt5::WinMain STATIC IMPORTED) - -!!IF !isEmpty(CMAKE_RELEASE_TYPE) - set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") -!!ELSE - set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") -!!ENDIF - - set_target_properties(Qt5::WinMain PROPERTIES - IMPORTED_LOCATION_RELEASE ${imported_location} - ) -!!ENDIF - -!!IF !isEmpty(CMAKE_DEBUG_TYPE) - set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) - -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") -!!ELSE - set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") -!!ENDIF - - set_target_properties(Qt5::WinMain PROPERTIES - IMPORTED_LOCATION_DEBUG ${imported_location} - ) -!!ENDIF - - if (NOT Qt5_NO_LINK_QTMAIN) - set(_isExe $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>) - set(_isWin32 $<BOOL:$<TARGET_PROPERTY:WIN32_EXECUTABLE>>) - set(_isNotExcluded $<NOT:$<BOOL:$<TARGET_PROPERTY:Qt5_NO_LINK_QTMAIN>>>) - set(_isPolicyNEW $<TARGET_POLICY:CMP0020>) - get_target_property(_configs Qt5::Core IMPORTED_CONFIGURATIONS) - set_property(TARGET Qt5::Core APPEND PROPERTY - INTERFACE_LINK_LIBRARIES - $<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt5::WinMain> - ) - # For backward compatibility with CMake < 2.8.12 - foreach(_config ${_configs}) - set_property(TARGET Qt5::Core APPEND PROPERTY - IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} - $<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt5::WinMain> - ) - endforeach() - unset(_configs) - unset(_isExe) - unset(_isWin32) - unset(_isNotExcluded) - unset(_isPolicyNEW) - endif() -endif() -!!ENDIF - -get_filename_component(_Qt5CoreConfigDir ${CMAKE_CURRENT_LIST_FILE} PATH) - -set(_Qt5CTestMacros \"${_Qt5CoreConfigDir}/Qt5CTestMacros.cmake\") - -if (ANDROID_PLATFORM) - include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5AndroidSupport.cmake\") -endif() - -_qt5_Core_check_file_exists(${_Qt5CTestMacros}) - -# Create versionless tool targets. -foreach(__qt_tool qmake moc rcc) - if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::${__qt_tool} - AND TARGET Qt5::${__qt_tool}) - add_executable(Qt::${__qt_tool} IMPORTED) - get_target_property(__qt_imported_location Qt5::${__qt_tool} IMPORTED_LOCATION) - set_target_properties(Qt::${__qt_tool} - PROPERTIES IMPORTED_LOCATION \"${__qt_imported_location}\") - endif() -endforeach() - -!!IF !isEmpty(CMAKE_WINDOWS_BUILD) -# Add a versionless target for WinMain. -if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::WinMain) - add_library(Qt::WinMain INTERFACE IMPORTED) - set_target_properties(Qt::WinMain PROPERTIES - INTERFACE_LINK_LIBRARIES \"Qt5::WinMain\" - ) -endif() -!!ENDIF diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake deleted file mode 100644 index 6c21470164..0000000000 --- a/src/corelib/Qt5CoreMacros.cmake +++ /dev/null @@ -1,486 +0,0 @@ -#============================================================================= -# Copyright 2005-2011 Kitware, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# * Neither the name of Kitware, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#============================================================================= - -###################################### -# -# Macros for building Qt files -# -###################################### - -include(CMakeParseArguments) - -# macro used to create the names of output files preserving relative dirs -macro(qt5_make_output_file infile prefix ext outfile ) - string(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength) - string(LENGTH ${infile} _infileLength) - set(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR}) - if(_infileLength GREATER _binlength) - string(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile) - if(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") - file(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile}) - else() - file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile}) - endif() - else() - file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile}) - endif() - if(WIN32 AND rel MATCHES "^([a-zA-Z]):(.*)$") # absolute path - set(rel "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}") - endif() - set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}") - string(REPLACE ".." "__" _outfile ${_outfile}) - get_filename_component(outpath ${_outfile} PATH) - get_filename_component(_outfile ${_outfile} NAME_WE) - file(MAKE_DIRECTORY ${outpath}) - set(${outfile} ${outpath}/${prefix}${_outfile}.${ext}) -endmacro() - - -macro(qt5_get_moc_flags _moc_flags) - set(${_moc_flags}) - get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES) - - if(CMAKE_INCLUDE_CURRENT_DIR) - list(APPEND _inc_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) - endif() - - foreach(_current ${_inc_DIRS}) - if("${_current}" MATCHES "\\.framework/?$") - string(REGEX REPLACE "/[^/]+\\.framework" "" framework_path "${_current}") - set(${_moc_flags} ${${_moc_flags}} "-F${framework_path}") - else() - set(${_moc_flags} ${${_moc_flags}} "-I${_current}") - endif() - endforeach() - - get_directory_property(_defines COMPILE_DEFINITIONS) - foreach(_current ${_defines}) - set(${_moc_flags} ${${_moc_flags}} "-D${_current}") - endforeach() - - if(WIN32) - set(${_moc_flags} ${${_moc_flags}} -DWIN32) - endif() - if (MSVC) - set(${_moc_flags} ${${_moc_flags}} --compiler-flavor=msvc) - endif() -endmacro() - - -# helper macro to set up a moc rule -function(qt5_create_moc_command infile outfile moc_flags moc_options moc_target moc_depends) - # Pass the parameters in a file. Set the working directory to - # be that containing the parameters file and reference it by - # just the file name. This is necessary because the moc tool on - # MinGW builds does not seem to handle spaces in the path to the - # file given with the @ syntax. - get_filename_component(_moc_outfile_name "${outfile}" NAME) - get_filename_component(_moc_outfile_dir "${outfile}" PATH) - if(_moc_outfile_dir) - set(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir}) - endif() - set (_moc_parameters_file ${outfile}_parameters) - set (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}") - string (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}") - - if(moc_target) - set(_moc_parameters_file ${_moc_parameters_file}$<$<BOOL:$<CONFIGURATION>>:_$<CONFIGURATION>>) - set(targetincludes "$<TARGET_PROPERTY:${moc_target},INCLUDE_DIRECTORIES>") - set(targetdefines "$<TARGET_PROPERTY:${moc_target},COMPILE_DEFINITIONS>") - - set(targetincludes "$<$<BOOL:${targetincludes}>:-I$<JOIN:${targetincludes},\n-I>\n>") - set(targetdefines "$<$<BOOL:${targetdefines}>:-D$<JOIN:${targetdefines},\n-D>\n>") - - file (GENERATE - OUTPUT ${_moc_parameters_file} - CONTENT "${targetdefines}${targetincludes}${_moc_parameters}\n" - ) - - set(targetincludes) - set(targetdefines) - else() - file(WRITE ${_moc_parameters_file} "${_moc_parameters}\n") - endif() - - set(_moc_extra_parameters_file @${_moc_parameters_file}) - add_custom_command(OUTPUT ${outfile} - COMMAND ${Qt5Core_MOC_EXECUTABLE} ${_moc_extra_parameters_file} - DEPENDS ${infile} ${moc_depends} - ${_moc_working_dir} - VERBATIM) - set_source_files_properties(${infile} PROPERTIES SKIP_AUTOMOC ON) - set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC ON) - set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOUIC ON) -endfunction() - - -function(qt5_generate_moc infile outfile ) - # get include dirs and flags - qt5_get_moc_flags(moc_flags) - get_filename_component(abs_infile ${infile} ABSOLUTE) - set(_outfile "${outfile}") - if(NOT IS_ABSOLUTE "${outfile}") - set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") - endif() - if ("x${ARGV2}" STREQUAL "xTARGET") - set(moc_target ${ARGV3}) - endif() - qt5_create_moc_command(${abs_infile} ${_outfile} "${moc_flags}" "" "${moc_target}" "") -endfunction() - -if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) - function(qt_generate_moc) - if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) - qt5_generate_moc(${ARGV}) - elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) - qt6_generate_moc(${ARGV}) - endif() - endfunction() -endif() - - -# qt5_wrap_cpp(outfiles inputfile ... ) - -function(qt5_wrap_cpp outfiles ) - # get include dirs - qt5_get_moc_flags(moc_flags) - - set(options) - set(oneValueArgs TARGET) - set(multiValueArgs OPTIONS DEPENDS) - - cmake_parse_arguments(_WRAP_CPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - set(moc_files ${_WRAP_CPP_UNPARSED_ARGUMENTS}) - set(moc_options ${_WRAP_CPP_OPTIONS}) - set(moc_target ${_WRAP_CPP_TARGET}) - set(moc_depends ${_WRAP_CPP_DEPENDS}) - - foreach(it ${moc_files}) - get_filename_component(it ${it} ABSOLUTE) - qt5_make_output_file(${it} moc_ cpp outfile) - qt5_create_moc_command(${it} ${outfile} "${moc_flags}" "${moc_options}" "${moc_target}" "${moc_depends}") - list(APPEND ${outfiles} ${outfile}) - endforeach() - set(${outfiles} ${${outfiles}} PARENT_SCOPE) -endfunction() - -# This will override the CMake upstream command, because that one is for Qt 3. -if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) - function(qt_wrap_cpp outfiles) - if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) - qt5_wrap_cpp("${outfiles}" ${ARGN}) - elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) - qt6_wrap_cpp("${outfiles}" ${ARGN}) - endif() - set("${outfiles}" "${${outfiles}}" PARENT_SCOPE) - endfunction() -endif() - - -# _qt5_parse_qrc_file(infile _out_depends _rc_depends) -# internal - -function(_qt5_parse_qrc_file infile _out_depends _rc_depends) - get_filename_component(rc_path ${infile} PATH) - - if(EXISTS "${infile}") - # parse file for dependencies - # all files are absolute paths or relative to the location of the qrc file - file(READ "${infile}" RC_FILE_CONTENTS) - string(REGEX MATCHALL "<file[^<]+" RC_FILES "${RC_FILE_CONTENTS}") - foreach(RC_FILE ${RC_FILES}) - string(REGEX REPLACE "^<file[^>]*>" "" RC_FILE "${RC_FILE}") - if(NOT IS_ABSOLUTE "${RC_FILE}") - set(RC_FILE "${rc_path}/${RC_FILE}") - endif() - set(RC_DEPENDS ${RC_DEPENDS} "${RC_FILE}") - endforeach() - # Since this cmake macro is doing the dependency scanning for these files, - # let's make a configured file and add it as a dependency so cmake is run - # again when dependencies need to be recomputed. - qt5_make_output_file("${infile}" "" "qrc.depends" out_depends) - configure_file("${infile}" "${out_depends}" COPYONLY) - else() - # The .qrc file does not exist (yet). Let's add a dependency and hope - # that it will be generated later - set(out_depends) - endif() - - set(${_out_depends} ${out_depends} PARENT_SCOPE) - set(${_rc_depends} ${RC_DEPENDS} PARENT_SCOPE) -endfunction() - - -# qt5_add_binary_resources(target inputfiles ... ) - -function(qt5_add_binary_resources target ) - - set(options) - set(oneValueArgs DESTINATION) - set(multiValueArgs OPTIONS) - - cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - set(rcc_files ${_RCC_UNPARSED_ARGUMENTS}) - set(rcc_options ${_RCC_OPTIONS}) - set(rcc_destination ${_RCC_DESTINATION}) - - if(NOT rcc_destination) - set(rcc_destination ${CMAKE_CURRENT_BINARY_DIR}/${target}.rcc) - endif() - - foreach(it ${rcc_files}) - get_filename_component(infile ${it} ABSOLUTE) - - _qt5_parse_qrc_file(${infile} _out_depends _rc_depends) - set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON) - set(infiles ${infiles} ${infile}) - set(out_depends ${out_depends} ${_out_depends}) - set(rc_depends ${rc_depends} ${_rc_depends}) - endforeach() - - add_custom_command(OUTPUT ${rcc_destination} - COMMAND ${Qt5Core_RCC_EXECUTABLE} - ARGS ${rcc_options} --binary --name ${target} --output ${rcc_destination} ${infiles} - DEPENDS ${rc_depends} ${out_depends} ${infiles} VERBATIM) - add_custom_target(${target} ALL DEPENDS ${rcc_destination}) -endfunction() - -if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) - function(qt_add_binary_resources) - if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) - qt5_add_binary_resources(${ARGV}) - elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) - qt6_add_binary_resources(${ARGV}) - endif() - endfunction() -endif() - - -# qt5_add_resources(outfiles inputfile ... ) - -function(qt5_add_resources outfiles ) - - set(options) - set(oneValueArgs) - set(multiValueArgs OPTIONS) - - cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - set(rcc_files ${_RCC_UNPARSED_ARGUMENTS}) - set(rcc_options ${_RCC_OPTIONS}) - - if("${rcc_options}" MATCHES "-binary") - message(WARNING "Use qt5_add_binary_resources for binary option") - endif() - - foreach(it ${rcc_files}) - get_filename_component(outfilename ${it} NAME_WE) - get_filename_component(infile ${it} ABSOLUTE) - set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp) - - _qt5_parse_qrc_file(${infile} _out_depends _rc_depends) - set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON) - - add_custom_command(OUTPUT ${outfile} - COMMAND ${Qt5Core_RCC_EXECUTABLE} - ARGS ${rcc_options} --name ${outfilename} --output ${outfile} ${infile} - MAIN_DEPENDENCY ${infile} - DEPENDS ${_rc_depends} "${_out_depends}" VERBATIM) - set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC ON) - set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOUIC ON) - list(APPEND ${outfiles} ${outfile}) - endforeach() - set(${outfiles} ${${outfiles}} PARENT_SCOPE) -endfunction() - -if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) - function(qt_add_resources outfiles) - if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) - qt5_add_resources("${outfiles}" ${ARGN}) - elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) - qt6_add_resources("${outfiles}" ${ARGN}) - endif() - set("${outfiles}" "${${outfiles}}" PARENT_SCOPE) - endfunction() -endif() - - -# qt5_add_big_resources(outfiles inputfile ... ) - -function(qt5_add_big_resources outfiles ) - if (CMAKE_VERSION VERSION_LESS 3.9) - message(FATAL_ERROR, "qt5_add_big_resources requires CMake 3.9 or newer") - endif() - - set(options) - set(oneValueArgs) - set(multiValueArgs OPTIONS) - - cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - set(rcc_files ${_RCC_UNPARSED_ARGUMENTS}) - set(rcc_options ${_RCC_OPTIONS}) - - if("${rcc_options}" MATCHES "-binary") - message(WARNING "Use qt5_add_binary_resources for binary option") - endif() - - foreach(it ${rcc_files}) - get_filename_component(outfilename ${it} NAME_WE) - get_filename_component(infile ${it} ABSOLUTE) - set(tmpoutfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}tmp.cpp) - set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.o) - - _qt5_parse_qrc_file(${infile} _out_depends _rc_depends) - set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON) - add_custom_command(OUTPUT ${tmpoutfile} - COMMAND ${Qt5Core_RCC_EXECUTABLE} ${rcc_options} --name ${outfilename} --pass 1 --output ${tmpoutfile} ${infile} - DEPENDS ${infile} ${_rc_depends} "${out_depends}" VERBATIM) - add_custom_target(big_resources_${outfilename} ALL DEPENDS ${tmpoutfile}) - add_library(rcc_object_${outfilename} OBJECT ${tmpoutfile}) - set_target_properties(rcc_object_${outfilename} PROPERTIES AUTOMOC OFF) - set_target_properties(rcc_object_${outfilename} PROPERTIES AUTOUIC OFF) - add_dependencies(rcc_object_${outfilename} big_resources_${outfilename}) - # The modification of TARGET_OBJECTS needs the following change in cmake - # https://gitlab.kitware.com/cmake/cmake/commit/93c89bc75ceee599ba7c08b8fe1ac5104942054f - add_custom_command(OUTPUT ${outfile} - COMMAND ${Qt5Core_RCC_EXECUTABLE} - ARGS ${rcc_options} --name ${outfilename} --pass 2 --temp $<TARGET_OBJECTS:rcc_object_${outfilename}> --output ${outfile} ${infile} - DEPENDS rcc_object_${outfilename} - VERBATIM) - list(APPEND ${outfiles} ${outfile}) - endforeach() - set(${outfiles} ${${outfiles}} PARENT_SCOPE) -endfunction() - -if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) - function(qt_add_big_resources outfiles) - if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) - qt5_add_big_resources(${outfiles} ${ARGN}) - elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) - qt6_add_big_resources(${outfiles} ${ARGN}) - endif() - set("${outfiles}" "${${outfiles}}" PARENT_SCOPE) - endfunction() -endif() - - -set(_Qt5_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..") - -macro(qt5_use_modules _target _link_type) - if(CMAKE_WARN_DEPRECATED) - set(messageType WARNING) - endif() - if(CMAKE_ERROR_DEPRECATED) - set(messageType FATAL_ERROR) - endif() - if(messageType) - message(${messageType} "The qt5_use_modules macro is obsolete. Use target_link_libraries with IMPORTED targets instead.") - endif() - - if (NOT TARGET ${_target}) - message(FATAL_ERROR "The first argument to qt5_use_modules must be an existing target.") - endif() - if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE" ) - set(_qt5_modules ${ARGN}) - set(_qt5_link_type ${_link_type}) - else() - set(_qt5_modules ${_link_type} ${ARGN}) - endif() - - if ("${_qt5_modules}" STREQUAL "") - message(FATAL_ERROR "qt5_use_modules requires at least one Qt module to use.") - endif() - - foreach(_module ${_qt5_modules}) - if (NOT Qt5${_module}_FOUND) - find_package(Qt5${_module} PATHS "${_Qt5_COMPONENT_PATH}" NO_DEFAULT_PATH) - if (NOT Qt5${_module}_FOUND) - message(FATAL_ERROR "Cannot use \"${_module}\" module which has not yet been found.") - endif() - endif() - target_link_libraries(${_target} ${_qt5_link_type} ${Qt5${_module}_LIBRARIES}) - set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_module}_INCLUDE_DIRS}) - set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt5${_module}_COMPILE_DEFINITIONS}) - set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG) - set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG) - set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG) - if (Qt5_POSITION_INDEPENDENT_CODE - AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" - OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)) - set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE}) - endif() - endforeach() -endmacro() - -function(qt5_import_plugins TARGET_NAME) - set(_doing "") - foreach(_arg ${ARGN}) - if(_arg STREQUAL "INCLUDE") - set(_doing "INCLUDE") - elseif(_arg STREQUAL "EXCLUDE") - set(_doing "EXCLUDE") - elseif(_arg STREQUAL "INCLUDE_BY_TYPE") - set(_doing "INCLUDE_BY_TYPE") - elseif(_arg STREQUAL "EXCLUDE_BY_TYPE") - set(_doing "EXCLUDE_BY_TYPE") - else() - if(_doing STREQUAL "INCLUDE") - set_property(TARGET ${TARGET_NAME} APPEND PROPERTY QT_PLUGINS "${_arg}") - elseif(_doing STREQUAL "EXCLUDE") - set_property(TARGET ${TARGET_NAME} APPEND PROPERTY QT_NO_PLUGINS "${_arg}") - elseif(_doing STREQUAL "INCLUDE_BY_TYPE") - string(REGEX REPLACE "[-/]" "_" _plugin_type "${_arg}") - set(_doing "INCLUDE_BY_TYPE_PLUGINS") - elseif(_doing STREQUAL "INCLUDE_BY_TYPE_PLUGINS") - set_property(TARGET ${TARGET_NAME} APPEND PROPERTY "QT_PLUGINS_${_plugin_type}" "${_arg}") - elseif(_doing STREQUAL "EXCLUDE_BY_TYPE") - string(REGEX REPLACE "[-/]" "_" _plugin_type "${_arg}") - set_property(TARGET ${TARGET_NAME} PROPERTY "QT_PLUGINS_${_plugin_type}" -) - else() - message(FATAL_ERROR "Unexpected extra argument: \"${_arg}\"") - endif() - endif() - endforeach() -endfunction() - -if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) - function(qt_import_plugins) - if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) - qt5_import_plugins(${ARGV}) - elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) - qt6_import_plugins(${ARGV}) - endif() - endfunction() -endif() diff --git a/src/corelib/Qt5CTestMacros.cmake b/src/corelib/Qt6CTestMacros.cmake index 962d49d6b2..962d49d6b2 100644 --- a/src/corelib/Qt5CTestMacros.cmake +++ b/src/corelib/Qt6CTestMacros.cmake diff --git a/src/corelib/Qt5Config.cmake.in b/src/corelib/Qt6Config.cmake.in index 6b6544f932..6b6544f932 100644 --- a/src/corelib/Qt5Config.cmake.in +++ b/src/corelib/Qt6Config.cmake.in diff --git a/src/corelib/Qt6CoreConfigExtras.cmake.in b/src/corelib/Qt6CoreConfigExtras.cmake.in new file mode 100644 index 0000000000..cb1dc9689c --- /dev/null +++ b/src/corelib/Qt6CoreConfigExtras.cmake.in @@ -0,0 +1,56 @@ +if(NOT DEFINED QT_DEFAULT_MAJOR_VERSION) + set(QT_DEFAULT_MAJOR_VERSION 6) +endif() + +# include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5CoreConfigExtrasMkspecDir.cmake\") +# +# foreach(_dir ${_qt5_corelib_extra_includes}) +# _qt5_Core_check_file_exists(${_dir}) +# endforeach() + +# list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes}) +# set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes}) +# set(_qt5_corelib_extra_includes) + +if (NOT QT_NO_CREATE_TARGETS) + set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core PROPERTY INTERFACE_QT_MAJOR_VERSION @PROJECT_VERSION_MAJOR@) + set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core PROPERTY INTERFACE_QT_COORD_TYPE @QT_COORD_TYPE@) + set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY + COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION QT_COORD_TYPE + ) + + # On x86 and x86-64 systems with ELF binaries (especially Linux), due to + # a new optimization in GCC 5.x in combination with a recent version of + # GNU binutils, compiling Qt applications with -fPIE is no longer + # enough. + # Applications now need to be compiled with the -fPIC option if the Qt option + # \"reduce relocations\" is active. For backward compatibility only, Qt accepts + # the use of -fPIE for GCC 4.x versions. + if (CMAKE_CXX_COMPILER MATCHES "icc.*$" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-fPIC") + endif() + + if (NOT "@QT_NAMESPACE@" STREQUAL "") + set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_NAMESPACE=@QT_NAMESPACE@) + endif() + set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>) + set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype) +endif() + +set(CMAKE_AUTOMOC_MACRO_NAMES "Q_OBJECT" "Q_GADGET" "Q_NAMESPACE" "Q_NAMESPACE_EXPORT") + +# install layout information, following what qmake -query provides +get_filename_component(QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/../@QT_INVERSE_CONFIG_INSTALL_DIR@ ABSOLUTE) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_ARCHDATA ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_ARCHDATADIR@) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_BINS ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_BINDIR@) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_CONFIGURATION ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_SYSCONFDIR@) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_DATA ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_DATADIR@) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_DOCS ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_DOCDIR@) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_EXAMPLES ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_EXAMPLESDIR@) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_HEADERS ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_INCLUDEDIR@) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_LIBS ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_LIBDIR@) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_LIBEXECS ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_LIBEXECDIR@) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_PLUGINS ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_PLUGINSDIR@) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_QML ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_QMLDIR@) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_TESTS ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_TESTSDIR@) +set(QT@PROJECT_VERSION_MAJOR@_INSTALL_TRANSLATIONS ${QT@PROJECT_VERSION_MAJOR@_INSTALL_PREFIX}/@INSTALL_TRANSLATIONSDIR@) diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in b/src/corelib/Qt6CoreConfigExtrasMkspecDir.cmake.in index c357237d0e..c357237d0e 100644 --- a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in +++ b/src/corelib/Qt6CoreConfigExtrasMkspecDir.cmake.in diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in b/src/corelib/Qt6CoreConfigExtrasMkspecDirForInstall.cmake.in index 706304cf34..706304cf34 100644 --- a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in +++ b/src/corelib/Qt6CoreConfigExtrasMkspecDirForInstall.cmake.in diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake new file mode 100644 index 0000000000..446926cd73 --- /dev/null +++ b/src/corelib/Qt6CoreMacros.cmake @@ -0,0 +1,824 @@ +#============================================================================= +# Copyright 2005-2011 Kitware, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of Kitware, Inc. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#============================================================================= + +###################################### +# +# Macros for building Qt files +# +###################################### + +include(CMakeParseArguments) + +# macro used to create the names of output files preserving relative dirs +macro(qt6_make_output_file infile prefix ext outfile ) + string(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength) + string(LENGTH ${infile} _infileLength) + set(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR}) + if(_infileLength GREATER _binlength) + string(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile) + if(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") + file(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile}) + else() + file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile}) + endif() + else() + file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile}) + endif() + if(WIN32 AND rel MATCHES "^([a-zA-Z]):(.*)$") # absolute path + set(rel "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}") + endif() + set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}") + string(REPLACE ".." "__" _outfile ${_outfile}) + get_filename_component(outpath ${_outfile} PATH) + get_filename_component(_outfile ${_outfile} NAME_WE) + file(MAKE_DIRECTORY ${outpath}) + set(${outfile} ${outpath}/${prefix}${_outfile}.${ext}) +endmacro() + + +macro(qt6_get_moc_flags _moc_flags) + set(${_moc_flags}) + get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES) + + if(CMAKE_INCLUDE_CURRENT_DIR) + list(APPEND _inc_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + endif() + + foreach(_current ${_inc_DIRS}) + if("${_current}" MATCHES "\\.framework/?$") + string(REGEX REPLACE "/[^/]+\\.framework" "" framework_path "${_current}") + set(${_moc_flags} ${${_moc_flags}} "-F${framework_path}") + else() + set(${_moc_flags} ${${_moc_flags}} "-I${_current}") + endif() + endforeach() + + get_directory_property(_defines COMPILE_DEFINITIONS) + foreach(_current ${_defines}) + set(${_moc_flags} ${${_moc_flags}} "-D${_current}") + endforeach() + + if(WIN32) + set(${_moc_flags} ${${_moc_flags}} -DWIN32) + endif() + if (MSVC) + set(${_moc_flags} ${${_moc_flags}} --compiler-flavor=msvc) + endif() +endmacro() + + +# helper macro to set up a moc rule +function(qt6_create_moc_command infile outfile moc_flags moc_options moc_target moc_depends) + # Pass the parameters in a file. Set the working directory to + # be that containing the parameters file and reference it by + # just the file name. This is necessary because the moc tool on + # MinGW builds does not seem to handle spaces in the path to the + # file given with the @ syntax. + get_filename_component(_moc_outfile_name "${outfile}" NAME) + get_filename_component(_moc_outfile_dir "${outfile}" PATH) + if(_moc_outfile_dir) + set(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir}) + endif() + set (_moc_parameters_file ${outfile}_parameters) + set (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}") + string (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}") + + if(moc_target) + set(_moc_parameters_file ${_moc_parameters_file}$<$<BOOL:$<CONFIGURATION>>:_$<CONFIGURATION>>) + set(targetincludes "$<TARGET_PROPERTY:${moc_target},INCLUDE_DIRECTORIES>") + set(targetdefines "$<TARGET_PROPERTY:${moc_target},COMPILE_DEFINITIONS>") + + set(targetincludes "$<$<BOOL:${targetincludes}>:-I$<JOIN:${targetincludes},\n-I>\n>") + set(targetdefines "$<$<BOOL:${targetdefines}>:-D$<JOIN:${targetdefines},\n-D>\n>") + + file (GENERATE + OUTPUT ${_moc_parameters_file} + CONTENT "${targetdefines}${targetincludes}${_moc_parameters}\n" + ) + + set(targetincludes) + set(targetdefines) + else() + file(WRITE ${_moc_parameters_file} "${_moc_parameters}\n") + endif() + + set(_moc_extra_parameters_file @${_moc_parameters_file}) + add_custom_command(OUTPUT ${outfile} + COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::moc ${_moc_extra_parameters_file} + DEPENDS ${infile} ${moc_depends} + ${_moc_working_dir} + VERBATIM) + set_source_files_properties(${infile} PROPERTIES SKIP_AUTOMOC ON) + set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC ON) + set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOUIC ON) +endfunction() + + +function(qt6_generate_moc infile outfile ) + # get include dirs and flags + qt6_get_moc_flags(moc_flags) + get_filename_component(abs_infile ${infile} ABSOLUTE) + set(_outfile "${outfile}") + if(NOT IS_ABSOLUTE "${outfile}") + set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") + endif() + if ("x${ARGV2}" STREQUAL "xTARGET") + set(moc_target ${ARGV3}) + endif() + qt6_create_moc_command(${abs_infile} ${_outfile} "${moc_flags}" "" "${moc_target}" "") +endfunction() + +if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) + function(qt_generate_moc) + if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) + qt5_generate_moc(${ARGV}) + elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) + qt6_generate_moc(${ARGV}) + endif() + endfunction() +endif() + + +# qt6_wrap_cpp(outfiles inputfile ... ) + +function(qt6_wrap_cpp outfiles ) + # get include dirs + qt6_get_moc_flags(moc_flags) + + set(options) + set(oneValueArgs TARGET) + set(multiValueArgs OPTIONS DEPENDS) + + cmake_parse_arguments(_WRAP_CPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + set(moc_files ${_WRAP_CPP_UNPARSED_ARGUMENTS}) + set(moc_options ${_WRAP_CPP_OPTIONS}) + set(moc_target ${_WRAP_CPP_TARGET}) + set(moc_depends ${_WRAP_CPP_DEPENDS}) + + foreach(it ${moc_files}) + get_filename_component(it ${it} ABSOLUTE) + qt6_make_output_file(${it} moc_ cpp outfile) + qt6_create_moc_command(${it} ${outfile} "${moc_flags}" "${moc_options}" "${moc_target}" "${moc_depends}") + list(APPEND ${outfiles} ${outfile}) + endforeach() + set(${outfiles} ${${outfiles}} PARENT_SCOPE) +endfunction() + +# This will override the CMake upstream command, because that one is for Qt 3. +if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) + function(qt_wrap_cpp outfiles) + if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) + qt5_wrap_cpp("${outfiles}" ${ARGN}) + elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) + qt6_wrap_cpp("${outfiles}" ${ARGN}) + endif() + set("${outfiles}" "${${outfiles}}" PARENT_SCOPE) + endfunction() +endif() + + +# _qt6_parse_qrc_file(infile _out_depends _rc_depends) +# internal + +function(_qt6_parse_qrc_file infile _out_depends _rc_depends) + get_filename_component(rc_path ${infile} PATH) + + if(EXISTS "${infile}") + # parse file for dependencies + # all files are absolute paths or relative to the location of the qrc file + file(READ "${infile}" RC_FILE_CONTENTS) + string(REGEX MATCHALL "<file[^<]+" RC_FILES "${RC_FILE_CONTENTS}") + foreach(RC_FILE ${RC_FILES}) + string(REGEX REPLACE "^<file[^>]*>" "" RC_FILE "${RC_FILE}") + if(NOT IS_ABSOLUTE "${RC_FILE}") + set(RC_FILE "${rc_path}/${RC_FILE}") + endif() + set(RC_DEPENDS ${RC_DEPENDS} "${RC_FILE}") + endforeach() + # Since this cmake macro is doing the dependency scanning for these files, + # let's make a configured file and add it as a dependency so cmake is run + # again when dependencies need to be recomputed. + qt6_make_output_file("${infile}" "" "qrc.depends" out_depends) + configure_file("${infile}" "${out_depends}" COPYONLY) + else() + # The .qrc file does not exist (yet). Let's add a dependency and hope + # that it will be generated later + set(out_depends) + endif() + + set(${_out_depends} ${out_depends} PARENT_SCOPE) + set(${_rc_depends} ${RC_DEPENDS} PARENT_SCOPE) +endfunction() + + +# qt6_add_binary_resources(target inputfiles ... ) + +function(qt6_add_binary_resources target ) + + set(options) + set(oneValueArgs DESTINATION) + set(multiValueArgs OPTIONS) + + cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + set(rcc_files ${_RCC_UNPARSED_ARGUMENTS}) + set(rcc_options ${_RCC_OPTIONS}) + set(rcc_destination ${_RCC_DESTINATION}) + + if(NOT rcc_destination) + set(rcc_destination ${CMAKE_CURRENT_BINARY_DIR}/${target}.rcc) + endif() + + foreach(it ${rcc_files}) + get_filename_component(infile ${it} ABSOLUTE) + + _qt6_parse_qrc_file(${infile} _out_depends _rc_depends) + set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON) + set(infiles ${infiles} ${infile}) + set(out_depends ${out_depends} ${_out_depends}) + set(rc_depends ${rc_depends} ${_rc_depends}) + endforeach() + + add_custom_command(OUTPUT ${rcc_destination} + COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::rcc + ARGS ${rcc_options} --binary --name ${target} --output ${rcc_destination} ${infiles} + DEPENDS ${rc_depends} ${out_depends} ${infiles} VERBATIM) + add_custom_target(${target} ALL DEPENDS ${rcc_destination}) +endfunction() + +if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) + function(qt_add_binary_resources) + if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) + qt5_add_binary_resources(${ARGV}) + elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) + qt6_add_binary_resources(${ARGV}) + endif() + endfunction() +endif() + + +# qt6_add_resources(target resourcename ... +# or +# qt6_add_resources(outfiles inputfile ... ) + +function(qt6_add_resources outfiles ) + if (TARGET ${outfiles}) + cmake_parse_arguments(arg "" "OUTPUT_TARGETS" "" ${ARGN}) + qt6_process_resource(${ARGV}) + if (arg_OUTPUT_TARGETS) + set(${arg_OUTPUT_TARGETS} ${${arg_OUTPUT_TARGETS}} PARENT_SCOPE) + endif() + else() + set(options) + set(oneValueArgs) + set(multiValueArgs OPTIONS) + + cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + set(rcc_files ${_RCC_UNPARSED_ARGUMENTS}) + set(rcc_options ${_RCC_OPTIONS}) + + if("${rcc_options}" MATCHES "-binary") + message(WARNING "Use qt6_add_binary_resources for binary option") + endif() + + foreach(it ${rcc_files}) + get_filename_component(outfilename ${it} NAME_WE) + get_filename_component(infile ${it} ABSOLUTE) + set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp) + + _qt6_parse_qrc_file(${infile} _out_depends _rc_depends) + set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON) + + add_custom_command(OUTPUT ${outfile} + COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::rcc + ARGS ${rcc_options} --name ${outfilename} --output ${outfile} ${infile} + MAIN_DEPENDENCY ${infile} + DEPENDS ${_rc_depends} "${_out_depends}" VERBATIM) + set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC ON) + set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOUIC ON) + list(APPEND ${outfiles} ${outfile}) + endforeach() + set(${outfiles} ${${outfiles}} PARENT_SCOPE) + endif() +endfunction() + +if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) + function(qt_add_resources outfiles) + if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) + qt5_add_resources("${outfiles}" ${ARGN}) + elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) + qt6_add_resources("${outfiles}" ${ARGN}) + endif() + if(NOT TARGET ${outfiles}) + set("${outfiles}" "${${outfiles}}" PARENT_SCOPE) + endif() + endfunction() +endif() + + +# qt6_add_big_resources(outfiles inputfile ... ) + +function(qt6_add_big_resources outfiles ) + if (CMAKE_VERSION VERSION_LESS 3.9) + message(FATAL_ERROR, "qt6_add_big_resources requires CMake 3.9 or newer") + endif() + + set(options) + set(oneValueArgs) + set(multiValueArgs OPTIONS) + + cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + set(rcc_files ${_RCC_UNPARSED_ARGUMENTS}) + set(rcc_options ${_RCC_OPTIONS}) + + if("${rcc_options}" MATCHES "-binary") + message(WARNING "Use qt6_add_binary_resources for binary option") + endif() + + foreach(it ${rcc_files}) + get_filename_component(outfilename ${it} NAME_WE) + get_filename_component(infile ${it} ABSOLUTE) + set(tmpoutfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}tmp.cpp) + set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.o) + + _qt6_parse_qrc_file(${infile} _out_depends _rc_depends) + set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON) + add_custom_command(OUTPUT ${tmpoutfile} + COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::rcc ${rcc_options} --name ${outfilename} --pass 1 --output ${tmpoutfile} ${infile} + DEPENDS ${infile} ${_rc_depends} "${out_depends}" VERBATIM) + add_custom_target(big_resources_${outfilename} ALL DEPENDS ${tmpoutfile}) + add_library(rcc_object_${outfilename} OBJECT ${tmpoutfile}) + set_target_properties(rcc_object_${outfilename} PROPERTIES AUTOMOC OFF) + set_target_properties(rcc_object_${outfilename} PROPERTIES AUTOUIC OFF) + add_dependencies(rcc_object_${outfilename} big_resources_${outfilename}) + # The modification of TARGET_OBJECTS needs the following change in cmake + # https://gitlab.kitware.com/cmake/cmake/commit/93c89bc75ceee599ba7c08b8fe1ac5104942054f + add_custom_command(OUTPUT ${outfile} + COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::rcc + ARGS ${rcc_options} --name ${outfilename} --pass 2 --temp $<TARGET_OBJECTS:rcc_object_${outfilename}> --output ${outfile} ${infile} + DEPENDS rcc_object_${outfilename} + VERBATIM) + list(APPEND ${outfiles} ${outfile}) + endforeach() + set(${outfiles} ${${outfiles}} PARENT_SCOPE) +endfunction() + +if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) + function(qt_add_big_resources outfiles) + if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) + qt5_add_big_resources(${outfiles} ${ARGN}) + elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) + qt6_add_big_resources(${outfiles} ${ARGN}) + endif() + set("${outfiles}" "${${outfiles}}" PARENT_SCOPE) + endfunction() +endif() + +set(_Qt6_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..") + +macro(qt6_use_modules _target _link_type) + if(CMAKE_WARN_DEPRECATED) + set(messageType WARNING) + endif() + if(CMAKE_ERROR_DEPRECATED) + set(messageType FATAL_ERROR) + endif() + if(messageType) + message(${messageType} "The qt6_use_modules macro is obsolete. Use target_link_libraries with IMPORTED targets instead.") + endif() + + if (NOT TARGET ${_target}) + message(FATAL_ERROR "The first argument to qt6_use_modules must be an existing target.") + endif() + if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE" ) + set(_qt6_modules ${ARGN}) + set(_qt6_link_type ${_link_type}) + else() + set(_qt6_modules ${_link_type} ${ARGN}) + endif() + + if ("${_qt6_modules}" STREQUAL "") + message(FATAL_ERROR "qt6_use_modules requires at least one Qt module to use.") + endif() + + foreach(_module ${_qt6_modules}) + if (NOT Qt6${_module}_FOUND) + find_package(Qt6${_module} PATHS "${_Qt6_COMPONENT_PATH}" NO_DEFAULT_PATH) + if (NOT Qt6${_module}_FOUND) + message(FATAL_ERROR "Cannot use \"${_module}\" module which has not yet been found.") + endif() + endif() + target_link_libraries(${_target} ${_qt6_link_type} ${Qt6${_module}_LIBRARIES}) + set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt6${_module}_INCLUDE_DIRS}) + set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt6${_module}_COMPILE_DEFINITIONS}) + set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG) + set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG) + set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG) + if (Qt6_POSITION_INDEPENDENT_CODE + AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" + OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)) + set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt6_POSITION_INDEPENDENT_CODE}) + endif() + endforeach() +endmacro() + +function(add_qt_gui_executable target) + if(ANDROID) + add_library("${target}" MODULE ${ARGN}) + # On our qmake builds we do don't compile the executables with + # visibility=hidden. Not having this flag set will cause the + # executable to have main() hidden and can then no longer be loaded + # through dlopen() + set_property(TARGET "${target}" PROPERTY C_VISIBILITY_PRESET default) + set_property(TARGET "${target}" PROPERTY CXX_VISIBILITY_PRESET default) + qt_android_apply_arch_suffix("${target}") + else() + add_executable("${target}" WIN32 MACOSX_BUNDLE ${ARGN}) + endif() + target_link_libraries("${target}" PRIVATE Qt::Core) + if(TARGET Qt::Gui) + target_link_libraries("${target}" PRIVATE Qt::Gui) + endif() + + if(ANDROID) + qt_android_generate_deployment_settings("${target}") + qt_android_add_apk_target("${target}") + endif() +endfunction() + +function(_qt_get_plugin_name_with_version target out_var) + string(REGEX REPLACE "^Qt::(.+)" "Qt${QT_DEFAULT_MAJOR_VERSION}::\\1" + qt_plugin_with_version "${target}") + if(TARGET "${qt_plugin_with_version}") + set("${out_var}" "${qt_plugin_with_version}" PARENT_SCOPE) + else() + set("${out_var}" "" PARENT_SCOPE) + endif() +endfunction() + +macro(_qt_import_plugin target plugin) + set(_final_plugin_name "${plugin}") + if(NOT TARGET "${plugin}") + _qt_get_plugin_name_with_version("${plugin}" _qt_plugin_with_version_name) + if(TARGET "${_qt_plugin_with_version_name}") + set(_final_plugin_name "${_qt_plugin_with_version_name}") + endif() + endif() + + if(NOT TARGET "${_final_plugin_name}") + message( + "Warning: plug-in ${_final_plugin_name} is not known to the current Qt installation.") + else() + get_target_property(_plugin_class_name "${_final_plugin_name}" QT_PLUGIN_CLASS_NAME) + if(_plugin_class_name) + set_property(TARGET "${target}" APPEND PROPERTY QT_PLUGINS "${plugin}") + endif() + endif() +endmacro() + +# This function is used to indicate which plug-ins are going to be +# used by a given target. +# This allows static linking to a correct set of plugins. +# Options : +# NO_DEFAULT: disable linking against any plug-in by default for that target, e.g. no platform plug-in. +# INCLUDE <list of additional plug-ins to be linked against> +# EXCLUDE <list of plug-ins to be removed from the default set> +# INCLUDE_BY_TYPE <type> <included plugins> +# EXCLUDE_BY_TYPE <type to be excluded> +# +# Example : +# qt_import_plugins(myapp +# INCLUDE Qt::QCocoaIntegrationPlugin +# EXCLUDE Qt::QMinimalIntegrationPlugin +# INCLUDE_BY_TYPE imageformats Qt::QGifPlugin Qt::QJpegPlugin +# EXCLUDE_BY_TYPE sqldrivers +# ) + +# TODO : support qml plug-ins. +function(qt6_import_plugins target) + cmake_parse_arguments(arg "NO_DEFAULT" "" "INCLUDE;EXCLUDE;INCLUDE_BY_TYPE;EXCLUDE_BY_TYPE" ${ARGN}) + + # Handle NO_DEFAULT + if(${arg_NO_DEFAULT}) + set_target_properties(${target} PROPERTIES QT_DEFAULT_PLUGINS 0) + endif() + + # Handle INCLUDE + foreach(plugin ${arg_INCLUDE}) + _qt_import_plugin("${target}" "${plugin}") + endforeach() + + # Handle EXCLUDE + foreach(plugin ${arg_EXCLUDE}) + set_property(TARGET "${target}" APPEND PROPERTY QT_NO_PLUGINS "${plugin}") + endforeach() + + # Handle INCLUDE_BY_TYPE + set(_current_type "") + foreach(_arg ${arg_INCLUDE_BY_TYPE}) + string(REGEX REPLACE "[-/]" "_" _plugin_type "${_arg}") + list(FIND QT_ALL_PLUGIN_TYPES_FOUND_VIA_FIND_PACKAGE "${_plugin_type}" _has_plugin_type) + + if(${_has_plugin_type} GREATER_EQUAL 0) + set(_current_type "${_plugin_type}") + else() + if("${_current_type}" STREQUAL "") + message(FATAL_ERROR "qt_import_plugins: invalid syntax for INCLUDE_BY_TYPE") + endif() + + # Check if passed plugin target name is a version-less one, and make a version-full + # one. + _qt_get_plugin_name_with_version("${_arg}" qt_plugin_with_version) + if(TARGET "${_arg}" OR TARGET "${qt_plugin_with_version}") + set_property(TARGET "${target}" APPEND PROPERTY "QT_PLUGINS_${_current_type}" "${_arg}") + else() + message("Warning: plug-in ${_arg} is not known to the current Qt installation.") + endif() + endif() + endforeach() + + # Handle EXCLUDE_BY_TYPE + foreach(_arg ${arg_EXCLUDE_BY_TYPE}) + string(REGEX REPLACE "[-/]" "_" _plugin_type "${_arg}") + set_property(TARGET "${target}" PROPERTY "QT_PLUGINS_${_plugin_type}" "-") + endforeach() +endfunction() + +if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) + function(qt_import_plugins) + if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) + qt5_import_plugins(${ARGV}) + elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) + qt6_import_plugins(${ARGV}) + endif() + endfunction() +endif() + +# Generate metatypes dependency file. This function extracts the list of +# metatypes files as well as the dependency file from the direct library +# dependencies of a target via generator expressions. +# Parameters: +# dep_file: Location where to generate the dependency file for build time +# dependencies. +# dep_file_install: Location where to generate the dependency file which +# is expected to be installed. +function(qt6_generate_meta_types_dep_file target dep_file dep_file_install) + # Due to generator expressions it is not possible to recursively evaluate + # the LINK_LIBRARIES of target. Therefore we generate a dependency file for + # every module with metatypes which can be evaluated at build time. + # When generating this file we need to take into account that there are two + # levels at which dependencies can be expressed: build and install. + # Build dependencies refer to targets which are being built along side the + # original target. These targets' install dependencies are not available + # at this point in time. We set a special property on these targets that's + # only available at build time. + # Install dependencies refer to targets which are found via a find_package() + # call. + # Both install and build targets have the + # INTERFACE_QT_META_TYPES_INSTALL_[DEP_FILE|FILE]. When building the target, + # INTERFACE_QT_META_TYPES_INSTALL_... refer to the expected install + # directory to be appended to CMAKE_INSTALL_PREFIX. + # Only build target have the INTERFACE_QT_META_TYPES_[DEP_FILE|FILE] which + # point to the files that have been produced during build time. + # Finally, to make sure the targets actually have a metatypes files, we + # check if they have the INTERFACE_QT_MODULE_HAS_META_TYPES property. + # + # Note: All properties start with INTERFACE_ since it is the only way to + # set properties on interface targets that get generated in the + # QtModuleConfig.in + # + get_target_property(link_dependencies ${target} LINK_LIBRARIES) + set(prop_dep "INTERFACE_QT_META_TYPES_BUILD_DEP_FILE") + set(prop_file "INTERFACE_QT_META_TYPES_BUILD_FILE") + set(prop_file_install "INTERFACE_QT_META_TYPES_INSTALL_FILE") + set(prop_dep_install "INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE") + set(prop_is_local "INTERFACE_QT_MODULE_META_TYPES_FROM_BUILD") + set(prop_has_metatypes "INTERFACE_QT_MODULE_HAS_META_TYPES") + + set(gen_exp "") + set(gen_exp_install "") + foreach(dep IN LISTS link_dependencies) + # Skip over any flags starting with -, like -framework or -lboo. + if("${dep}" MATCHES "^-") + continue() + endif() + # replace LINK_ONLY with true, or we will get an error evaluating that + # generator expression + string(REPLACE "$<LINK_ONLY:" "$<1:" genex_target "$<GENEX_EVAL:${dep}>") + string(REPLACE "$<TARGET_OBJECTS:" "$<1:" genex_target "${genex_target}") + set(genex_check_is_local + "$<TARGET_GENEX_EVAL:${genex_target},$<TARGET_PROPERTY:${genex_target},${prop_is_local}>>" + ) + set(genex_is_target "$<TARGET_EXISTS:$<IF:$<BOOL:${genex_target}>,${genex_target},-NOTFOUND>>") + set(genex_has_metatypes + "$<TARGET_GENEX_EVAL:${genex_target},$<TARGET_PROPERTY:${genex_target},${prop_has_metatypes}>>" + ) + set(genex_get_metatypes + "$<TARGET_GENEX_EVAL:${genex_target},$<TARGET_PROPERTY:${genex_target},${prop_file}>>" + ) + set(genex_get_metatypes_dep + "$<TARGET_GENEX_EVAL:${genex_target},$<TARGET_PROPERTY:${genex_target},${prop_dep}>>" + ) + set(genex_get_metatypes_install + "$<TARGET_GENEX_EVAL:${genex_target},$<TARGET_PROPERTY:${genex_target},${prop_file_install}>>" + ) + set(genex_get_metatypes_install_dep + "$<TARGET_GENEX_EVAL:${genex_target},$<TARGET_PROPERTY:${genex_target},${prop_dep_install}>>" + ) + set(get_local_or_install + "$<IF:$<BOOL:${genex_check_is_local}>,${genex_get_metatypes}=${genex_get_metatypes_dep},${genex_get_metatypes_install}=${genex_get_metatypes_install_dep}>" + ) + + list(APPEND gen_exp + "$<$<AND:$<BOOL:${genex_target}>,$<BOOL:${genex_has_metatypes}>>:${get_local_or_install}>" + ) + + list(APPEND gen_exp_install + "$<$<AND:$<BOOL:${genex_target}>,$<BOOL:${genex_get_metatypes_install}>>:${genex_get_metatypes_install}=${genex_get_metatypes_install_dep}>" + ) + endforeach() + + file(GENERATE + OUTPUT "${dep_file}" + CONTENT "$<JOIN:$<GENEX_EVAL:${gen_exp}>,\n>" + ) + + file(GENERATE + OUTPUT "${dep_file_install}" + CONTENT "$<JOIN:$<GENEX_EVAL:${gen_exp_install}>,\n>" + ) +endfunction() + +# +# Generate Qt metatypes.json for a target +# Params: +# INSTALL_DIR: Location where to install the metatypes file (Optional) +# COPY_OVER_INSTALL: When present will install the file via a post build step +# copy rather than using install +function(qt6_generate_meta_types_json_file target) + + cmake_parse_arguments(arg "COPY_OVER_INSTALL" "INSTALL_DIR" "" ${ARGN}) + + if (NOT QT_BUILDING_QT) + if (NOT arg_INSTALL_DIR) + message(FATAL_ERROR "Please specify an install directory using INSTALL_DIR") + endif() + else() + # Automatically fill install args when building qt + set(metatypes_install_dir ${INSTALL_LIBDIR}/metatypes) + set(args) + if (NOT QT_WILL_INSTALL) + set(arg_COPY_OVER_INSTALL TRUE) + endif() + if (NOT arg_INSTALL_DIR) + set(arg_INSTALL_DIR "${metatypes_install_dir}") + endif() + endif() + + # Tell automoc to output json files + set_property(TARGET "${target}" APPEND PROPERTY + AUTOMOC_MOC_OPTIONS "--output-json" + ) + + get_target_property(target_type ${target} TYPE) + if (target_type STREQUAL "INTERFACE_LIBRARY" OR CMAKE_VERSION VERSION_LESS "3.16.0") + # interface libraries not supported or cmake version is not high enough + message(WARNING "Meta types generation requires CMake >= 3.16") + return() + endif() + + get_target_property(existing_meta_types_file ${target} INTERFACE_QT_META_TYPES_BUILD_FILE) + if (existing_meta_types_file) + return() + endif() + + get_target_property(target_binary_dir ${target} BINARY_DIR) + + if(CMAKE_BUILD_TYPE) + set(cmake_autogen_cache_file + "${target_binary_dir}/CMakeFiles/${target}_autogen.dir/ParseCache.txt") + set(mutli_config_args + --cmake-autogen-include-dir-path "${target_binary_dir}/${target}_autogen/include" + ) + else() + set(cmake_autogen_cache_file + "${target_binary_dir}/CMakeFiles/${target}_autogen.dir/ParseCache_$<CONFIG>.txt") + set(mutli_config_args + --cmake-autogen-include-dir-path "${target_binary_dir}/${target}_autogen/include_$<CONFIG>" + "--cmake-multi-config") + endif() + + set(cmake_autogen_info_file + "${target_binary_dir}/CMakeFiles/${target}_autogen.dir/AutogenInfo.json") + set(type_list_file "${target_binary_dir}/meta_types/json_file_list.txt") + + add_custom_target(${target}_automoc_json_extraction + BYPRODUCTS ${type_list_file} + COMMAND + ${QT_CMAKE_EXPORT_NAMESPACE}::cmake_automoc_parser + --cmake-autogen-cache-file "${cmake_autogen_cache_file}" + --cmake-autogen-info-file "${cmake_autogen_info_file}" + --output-file-path "${type_list_file}" + ${mutli_config_args} + COMMENT "Running Automoc file extraction" + COMMAND_EXPAND_LISTS + ) + + add_dependencies(${target}_automoc_json_extraction ${target}_autogen) + + if (CMAKE_BUILD_TYPE) + string(TOLOWER ${target}_${CMAKE_BUILD_TYPE} target_lowercase) + else() + string(TOLOWER ${target} target_lowercase) + endif() + + set(metatypes_file_name "qt6${target_lowercase}_metatypes.json") + set(metatypes_file "${target_binary_dir}/meta_types/${metatypes_file_name}") + + set(metatypes_dep_file_name "qt6${target_lowercase}_metatypes_dep.txt") + set(metatypes_dep_file "${target_binary_dir}/meta_types/${metatypes_dep_file_name}") + + add_custom_command(OUTPUT ${metatypes_file} + DEPENDS ${type_list_file} + COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::moc + -o ${metatypes_file} + --collect-json "@${type_list_file}" + COMMENT "Runing automoc with --collect-json" + ) + + target_sources(${target} PRIVATE ${metatypes_file}) + set_source_files_properties(${metatypes_file} PROPERTIES HEADER_FILE_ONLY TRUE) + + # Set the required properties. See documentation of + # qt6_generate_meta_types_dep_file() + set_target_properties(${target} PROPERTIES + INTERFACE_QT_MODULE_HAS_META_TYPES YES + INTERFACE_QT_MODULE_META_TYPES_FROM_BUILD YES + INTERFACE_QT_META_TYPES_BUILD_FILE ${metatypes_file} + INTERFACE_QT_META_TYPES_BUILD_DEP_FILE ${metatypes_dep_file} + INTERFACE_QT_META_TYPES_INSTALL_FILE "${arg_INSTALL_DIR}/${metatypes_file_name}" + INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE "${arg_INSTALL_DIR}/${metatypes_dep_file_name}" + ) + + qt6_generate_meta_types_dep_file(${target} + "${metatypes_dep_file}" + "${metatypes_dep_file}.install" + ) + + if (arg_COPY_OVER_INSTALL) + add_custom_command(TARGET ${target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${metatypes_file}" + "${arg_INSTALL_DIR}/${metatypes_file_name}" + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${metatypes_dep_file}.install" + "${arg_INSTALL_DIR}/${metatypes_dep_file_name}" + ) + else() + install(FILES "${metatypes_file}" + DESTINATION "${arg_INSTALL_DIR}" + ) + install(FILES "${metatypes_dep_file}.install" + DESTINATION "${arg_INSTALL_DIR}" + RENAME "${metatypes_dep_file_name}" + ) + endif() +endfunction() + +if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) + function(qt_generate_meta_types_json_file) + qt6_generate_meta_types_json_file(${ARGV}) + endfunction() +endif() diff --git a/src/corelib/Qt5ModuleLocation.cmake.in b/src/corelib/Qt6ModuleLocation.cmake.in index cf70f6bc0e..cf70f6bc0e 100644 --- a/src/corelib/Qt5ModuleLocation.cmake.in +++ b/src/corelib/Qt6ModuleLocation.cmake.in diff --git a/src/corelib/Qt5ModuleLocationForInstall.cmake.in b/src/corelib/Qt6ModuleLocationForInstall.cmake.in index 8751e4acbc..8751e4acbc 100644 --- a/src/corelib/Qt5ModuleLocationForInstall.cmake.in +++ b/src/corelib/Qt6ModuleLocationForInstall.cmake.in diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake new file mode 100644 index 0000000000..c316d1b90a --- /dev/null +++ b/src/corelib/configure.cmake @@ -0,0 +1,959 @@ + + +#### Inputs + +# input iconv +set(INPUT_iconv "undefined" CACHE STRING "") +set_property(CACHE INPUT_iconv PROPERTY STRINGS undefined no yes posix sun gnu) + + + +#### Libraries + +qt_find_package(GLIB2 PROVIDED_TARGETS GLIB2::GLIB2) +qt_find_package(ICU COMPONENTS i18n uc data PROVIDED_TARGETS ICU::i18n ICU::uc ICU::data) +qt_find_package(Libsystemd PROVIDED_TARGETS PkgConfig::Libsystemd) +qt_find_package(Atomic PROVIDED_TARGETS Atomic) +qt_find_package(WrapRt PROVIDED_TARGETS WrapRt) +qt_find_package(LTTngUST PROVIDED_TARGETS LTTng::UST) +qt_find_package(WrapPCRE2 PROVIDED_TARGETS WrapPCRE2::WrapPCRE2) +set_package_properties(WrapPCRE2 PROPERTIES TYPE REQUIRED) +if((QNX) OR QT_FIND_ALL_PACKAGES_ALWAYS) + qt_find_package(PPS PROVIDED_TARGETS PPS::PPS) +endif() +qt_find_package(Slog2 PROVIDED_TARGETS Slog2::Slog2) + + +#### Tests + +# atomicfptr +qt_config_compile_test(atomicfptr + LABEL "working std::atomic for function pointers" + CODE +" +#include <atomic> +typedef void (*fptr)(int); +typedef std::atomic<fptr> atomicfptr; +void testfunction(int) { } +void test(volatile atomicfptr &a) +{ + fptr v = a.load(std::memory_order_acquire); + while (!a.compare_exchange_strong(v, &testfunction, + std::memory_order_acq_rel, + std::memory_order_acquire)) { + v = a.exchange(&testfunction); + } + a.store(&testfunction, std::memory_order_release); +} +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +atomicfptr fptr(testfunction); +test(fptr); + /* END TEST: */ + return 0; +} +") + +# clock-monotonic +qt_config_compile_test(clock_monotonic + LABEL "POSIX monotonic clock" + LIBRARIES + WrapRt + CODE +" +#include <unistd.h> +#include <time.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +#if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK-0 >= 0) +timespec ts; +clock_gettime(CLOCK_MONOTONIC, &ts); +#else +# error Feature _POSIX_MONOTONIC_CLOCK not available +#endif + /* END TEST: */ + return 0; +} +") + +# cloexec +qt_config_compile_test(cloexec + LABEL "O_CLOEXEC" + CODE +"#define _GNU_SOURCE 1 +#include <sys/types.h> +#include <sys/socket.h> +#include <fcntl.h> +#include <unistd.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +int pipes[2]; +(void) pipe2(pipes, O_CLOEXEC | O_NONBLOCK); +(void) fcntl(0, F_DUPFD_CLOEXEC, 0); +(void) dup3(0, 3, O_CLOEXEC); +#if defined(__NetBSD__) +(void) paccept(0, 0, 0, NULL, SOCK_CLOEXEC | SOCK_NONBLOCK); +#else +(void) accept4(0, 0, 0, SOCK_CLOEXEC | SOCK_NONBLOCK); +#endif + /* END TEST: */ + return 0; +} +") + +# cxx11_future +if (UNIX) + set(cxx11_future_TEST_LIBRARIES pthread) +endif() +qt_config_compile_test(cxx11_future + LABEL "C++11 <future>" + LIBRARIES + "${cxx11_future_TEST_LIBRARIES}" + CODE +" +#include <future> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +std::future<int> f = std::async([]() { return 42; }); +(void)f.get(); + /* END TEST: */ + return 0; +} +") + +# cxx11_random +qt_config_compile_test(cxx11_random + LABEL "C++11 <random>" + CODE +" +#include <random> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +std::mt19937 mt(0); + /* END TEST: */ + return 0; +} +") + +# eventfd +qt_config_compile_test(eventfd + LABEL "eventfd" + CODE +" +#include <sys/eventfd.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +eventfd_t value; +int fd = eventfd(0, EFD_CLOEXEC); +eventfd_read(fd, &value); +eventfd_write(fd, value); + /* END TEST: */ + return 0; +} +") + +# futimens +qt_config_compile_test(futimens + LABEL "futimens()" + CODE +" +#include <sys/stat.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +futimens(-1, 0); + /* END TEST: */ + return 0; +} +"# FIXME: qmake: ["# Block futimens() on Apple platforms unless it's available on ALL", '# deployment targets. This simplifies the logic at the call site', "# dramatically, as it isn't strictly needed compared to futimes().", 'darwin: QMAKE_CXXFLAGS += -Werror=unguarded-availability'] +) + +# futimes +qt_config_compile_test(futimes + LABEL "futimes()" + CODE +" +#include <sys/time.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +futimes(-1, 0); + /* END TEST: */ + return 0; +} +") + +# getauxval +qt_config_compile_test(getauxval + LABEL "getauxval()" + CODE +" +#include <sys/auxv.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +(void) getauxval(AT_NULL); + /* END TEST: */ + return 0; +} +") + +# getentropy +qt_config_compile_test(getentropy + LABEL "getentropy()" + CODE +" +#include <unistd.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +char buf[32]; +(void) getentropy(buf, sizeof(buf)); + /* END TEST: */ + return 0; +} +") + +# glibc +qt_config_compile_test(glibc + LABEL "GNU libc" + CODE +" +#include <stdlib.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +return __GLIBC__; + /* END TEST: */ + return 0; +} +") + +# inotify +qt_config_compile_test(inotify + LABEL "inotify" + CODE +" +#include <sys/inotify.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +inotify_init(); +inotify_add_watch(0, \"foobar\", IN_ACCESS); +inotify_rm_watch(0, 1); + /* END TEST: */ + return 0; +} +") + +# ipc_sysv +qt_config_compile_test(ipc_sysv + LABEL "SysV IPC" + CODE +" +#include <sys/types.h> +#include <sys/ipc.h> +#include <sys/sem.h> +#include <sys/shm.h> +#include <fcntl.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +key_t unix_key = ftok(\"test\", 'Q'); +semctl(semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL), 0, IPC_RMID, 0); +shmget(unix_key, 0, 0666 | IPC_CREAT | IPC_EXCL); +shmctl(0, 0, (struct shmid_ds *)(0)); + /* END TEST: */ + return 0; +} +") + +# ipc_posix +if (LINUX) + set(ipc_posix_TEST_LIBRARIES pthread rt) +endif() +qt_config_compile_test(ipc_posix + LABEL "POSIX IPC" + LIBRARIES + "${ipc_posix_TEST_LIBRARIES}" + CODE +" +#include <sys/types.h> +#include <sys/mman.h> +#include <semaphore.h> +#include <fcntl.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +sem_close(sem_open(\"test\", O_CREAT | O_EXCL, 0666, 0)); +shm_open(\"test\", O_RDWR | O_CREAT | O_EXCL, 0666); +shm_unlink(\"test\"); + /* END TEST: */ + return 0; +} +") + +# linkat +qt_config_compile_test(linkat + LABEL "linkat()" + CODE +"#define _ATFILE_SOURCE 1 +#include <fcntl.h> +#include <unistd.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +linkat(AT_FDCWD, \"foo\", AT_FDCWD, \"bar\", AT_SYMLINK_FOLLOW); + /* END TEST: */ + return 0; +} +") + +# ppoll +qt_config_compile_test(ppoll + LABEL "ppoll()" + CODE +" +#include <signal.h> +#include <poll.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +struct pollfd pfd; +struct timespec ts; +sigset_t sig; +ppoll(&pfd, 1, &ts, &sig); + /* END TEST: */ + return 0; +} +") + +# pollts +qt_config_compile_test(pollts + LABEL "pollts()" + CODE +" +#include <poll.h> +#include <signal.h> +#include <time.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +struct pollfd pfd; +struct timespec ts; +sigset_t sig; +pollts(&pfd, 1, &ts, &sig); + /* END TEST: */ + return 0; +} +") + +# poll +qt_config_compile_test(poll + LABEL "poll()" + CODE +" +#include <poll.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +struct pollfd pfd; +poll(&pfd, 1, 0); + /* END TEST: */ + return 0; +} +") + +# renameat2 +qt_config_compile_test(renameat2 + LABEL "renameat2()" + CODE +"#define _ATFILE_SOURCE 1 +#include <fcntl.h> +#include <stdio.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +renameat2(AT_FDCWD, argv[1], AT_FDCWD, argv[2], RENAME_NOREPLACE | RENAME_WHITEOUT); + /* END TEST: */ + return 0; +} +") + +# statx +qt_config_compile_test(statx + LABEL "statx() in libc" + CODE +"#define _ATFILE_SOURCE 1 +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#include <fcntl.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +struct statx statxbuf; +unsigned int mask = STATX_BASIC_STATS; +return statx(AT_FDCWD, \"\", AT_STATX_SYNC_AS_STAT, mask, &statxbuf); + /* END TEST: */ + return 0; +} +") + +# syslog +qt_config_compile_test(syslog + LABEL "syslog" + CODE +" +#include <syslog.h> + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +openlog(\"qt\", 0, LOG_USER); +syslog(LOG_INFO, \"configure\"); +closelog(); + /* END TEST: */ + return 0; +} +") + +# xlocalescanprint +qt_config_compile_test(xlocalescanprint + LABEL "xlocale.h (or equivalents)" + CODE +" + +#define QT_BEGIN_NAMESPACE +#define QT_END_NAMESPACE + +#ifdef _MSVC_VER +#define Q_CC_MSVC _MSVC_VER +#endif + +#define QT_NO_DOUBLECONVERSION + +#include QDSP_P_H +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +#ifdef _MSVC_VER +_locale_t invalidLocale = NULL; +#else +locale_t invalidLocale = NULL; +#endif +double a = 3.4; +qDoubleSnprintf(argv[0], 1, invalidLocale, \"invalid format\", a); +qDoubleSscanf(argv[0], invalidLocale, \"invalid format\", &a, &argc); + /* END TEST: */ + return 0; +} +"# FIXME: qmake: DEFINES += QDSP_P_H=$$shell_quote(\"@PWD@/text/qdoublescanprint_p.h\") +) + + + +#### Features + +qt_feature("clock-gettime" PRIVATE + LABEL "clock_gettime()" + CONDITION UNIX AND WrapRt_FOUND +) +qt_feature("clock-monotonic" PUBLIC + LABEL "POSIX monotonic clock" + CONDITION QT_FEATURE_clock_gettime AND TEST_clock_monotonic +) +qt_feature_definition("clock-monotonic" "QT_NO_CLOCK_MONOTONIC" NEGATE VALUE "1") +qt_feature("cxx11_future" PUBLIC + LABEL "C++11 <future>" + CONDITION TEST_cxx11_future +) +qt_feature("eventfd" PUBLIC + LABEL "eventfd" + CONDITION NOT WASM AND TEST_eventfd +) +qt_feature_definition("eventfd" "QT_NO_EVENTFD" NEGATE VALUE "1") +qt_feature("futimens" PRIVATE + LABEL "futimens()" + CONDITION NOT WIN32 AND TEST_futimens +) +qt_feature("futimes" PRIVATE + LABEL "futimes()" + CONDITION NOT WIN32 AND NOT QT_FEATURE_futimens AND TEST_futimes +) +qt_feature("getauxval" PRIVATE + LABEL "getauxval()" + CONDITION LINUX AND TEST_getauxval +) +qt_feature("getentropy" PRIVATE + LABEL "getentropy()" + CONDITION UNIX AND TEST_getentropy +) +qt_feature("glib" PUBLIC PRIVATE + LABEL "GLib" + AUTODETECT NOT WIN32 + CONDITION GLIB2_FOUND +) +qt_feature_definition("glib" "QT_NO_GLIB" NEGATE VALUE "1") +qt_feature("glibc" PRIVATE + LABEL "GNU libc" + AUTODETECT LINUX + CONDITION TEST_glibc +) +qt_feature("iconv" PUBLIC PRIVATE + SECTION "Internationalization" + LABEL "iconv" + PURPOSE "Provides internationalization on Unix." + CONDITION NOT QT_FEATURE_icu AND QT_FEATURE_textcodec AND ( TEST_posix_iconv OR TEST_sun_iconv ) +) +qt_feature_definition("iconv" "QT_NO_ICONV" NEGATE VALUE "1") +qt_feature("posix-libiconv" PRIVATE + LABEL "POSIX iconv" + CONDITION NOT WIN32 AND NOT QNX AND NOT ANDROID AND NOT APPLE AND TEST_posix_iconv AND TEST_iconv_needlib + ENABLE TEST_posix_iconv AND TEST_iconv_needlib + DISABLE NOT TEST_posix_iconv OR NOT TEST_iconv_needlib +) +qt_feature("sun-libiconv" + LABEL "SUN iconv" + CONDITION NOT WIN32 AND NOT QNX AND NOT ANDROID AND NOT APPLE AND TEST_sun_iconv + ENABLE TEST_sun_iconv + DISABLE NOT TEST_sun_iconv +) +qt_feature("gnu-libiconv" PRIVATE + LABEL "GNU iconv" + CONDITION NOT WIN32 AND NOT QNX AND NOT ANDROID AND NOT APPLE AND TEST_posix_iconv AND NOT TEST_iconv_needlib + ENABLE TEST_posix_iconv AND NOT TEST_iconv_needlib + DISABLE NOT TEST_posix_iconv OR TEST_iconv_needlib +) +qt_feature("icu" PRIVATE + LABEL "ICU" + AUTODETECT NOT WIN32 + CONDITION ICU_FOUND +) +qt_feature("inotify" PUBLIC PRIVATE + LABEL "inotify" + CONDITION TEST_inotify +) +qt_feature_definition("inotify" "QT_NO_INOTIFY" NEGATE VALUE "1") +qt_feature("ipc_posix" + LABEL "Using POSIX IPC" + AUTODETECT NOT WIN32 + CONDITION NOT TEST_ipc_sysv AND TEST_ipc_posix +) +qt_feature_definition("ipc_posix" "QT_POSIX_IPC") +qt_feature("journald" PRIVATE + LABEL "journald" + AUTODETECT OFF + CONDITION Libsystemd_FOUND +) +# Currently only used by QTemporaryFile; linkat() exists on Android, but hardlink creation fails due to security rules +qt_feature("linkat" PRIVATE + LABEL "linkat()" + AUTODETECT LINUX AND NOT ANDROID + CONDITION TEST_linkat +) +qt_feature("std-atomic64" PUBLIC + LABEL "64 bit atomic operations" + CONDITION Atomic_FOUND +) +qt_feature("mimetype" PUBLIC + SECTION "Utilities" + LABEL "Mimetype handling" + PURPOSE "Provides MIME type handling." + CONDITION QT_FEATURE_textcodec +) +qt_feature_definition("mimetype" "QT_NO_MIMETYPE" NEGATE VALUE "1") +qt_feature("mimetype-database" PRIVATE + LABEL "Built-in copy of the MIME database" + CONDITION QT_FEATURE_mimetype +) +qt_feature("pcre2" + LABEL "PCRE2" + ENABLE INPUT_pcre STREQUAL 'qt' + DISABLE INPUT_pcre STREQUAL 'no' OR INPUT_pcre STREQUAL 'system' +) +qt_feature_config("pcre2" QMAKE_PRIVATE_CONFIG) +qt_feature("poll_ppoll" PRIVATE + LABEL "Native ppoll()" + CONDITION NOT WASM AND TEST_ppoll + EMIT_IF NOT WIN32 +) +qt_feature("poll_pollts" PRIVATE + LABEL "Native pollts()" + CONDITION NOT QT_FEATURE_poll_ppoll AND TEST_pollts + EMIT_IF NOT WIN32 +) +qt_feature("poll_poll" PRIVATE + LABEL "Native poll()" + CONDITION NOT QT_FEATURE_poll_ppoll AND NOT QT_FEATURE_poll_pollts AND TEST_poll + EMIT_IF NOT WIN32 +) +qt_feature("poll_select" PRIVATE + LABEL "Emulated poll()" + CONDITION NOT QT_FEATURE_poll_ppoll AND NOT QT_FEATURE_poll_pollts AND NOT QT_FEATURE_poll_poll + EMIT_IF NOT WIN32 +) +qt_feature_definition("poll_select" "QT_NO_NATIVE_POLL") +qt_feature("qqnx_pps" PRIVATE + LABEL "PPS" + CONDITION PPS_FOUND + EMIT_IF QNX +) +qt_feature("renameat2" PRIVATE + LABEL "renameat2()" + CONDITION LINUX AND TEST_renameat2 +) +qt_feature("slog2" PRIVATE + LABEL "slog2" + CONDITION Slog2_FOUND +) +qt_feature("statx" PRIVATE + LABEL "statx() in libc" + CONDITION LINUX AND TEST_statx +) +qt_feature("syslog" PRIVATE + LABEL "syslog" + AUTODETECT OFF + CONDITION TEST_syslog +) +qt_feature("threadsafe-cloexec" + LABEL "Threadsafe pipe creation" + CONDITION TEST_cloexec +) +qt_feature_definition("threadsafe-cloexec" "QT_THREADSAFE_CLOEXEC" VALUE "1") +qt_feature_config("threadsafe-cloexec" QMAKE_PUBLIC_QT_CONFIG) +qt_feature("properties" PUBLIC + SECTION "Kernel" + LABEL "Properties" + PURPOSE "Supports scripting Qt-based applications." +) +qt_feature_definition("properties" "QT_NO_PROPERTIES" NEGATE VALUE "1") +qt_feature("regularexpression" PUBLIC + SECTION "Kernel" + LABEL "QRegularExpression" + PURPOSE "Provides an API to Perl-compatible regular expressions." + CONDITION ON OR QT_FEATURE_pcre2 +) +qt_feature_definition("regularexpression" "QT_NO_REGULAREXPRESSION" NEGATE VALUE "1") +qt_feature("sharedmemory" PUBLIC + SECTION "Kernel" + LABEL "QSharedMemory" + PURPOSE "Provides access to a shared memory segment." + CONDITION ( ANDROID OR WIN32 OR ( NOT VXWORKS AND ( TEST_ipc_sysv OR TEST_ipc_posix ) ) ) +) +qt_feature_definition("sharedmemory" "QT_NO_SHAREDMEMORY" NEGATE VALUE "1") +qt_feature("shortcut" PUBLIC + SECTION "Kernel" + LABEL "QShortcut" + PURPOSE "Provides keyboard accelerators and shortcuts." +) +qt_feature_definition("shortcut" "QT_NO_SHORTCUT" NEGATE VALUE "1") +qt_feature("systemsemaphore" PUBLIC + SECTION "Kernel" + LABEL "QSystemSemaphore" + PURPOSE "Provides a general counting system semaphore." + CONDITION ( NOT INTEGRITY AND NOT VXWORKS AND NOT rtems ) AND ( ANDROID OR WIN32 OR TEST_ipc_sysv OR TEST_ipc_posix ) +) +qt_feature_definition("systemsemaphore" "QT_NO_SYSTEMSEMAPHORE" NEGATE VALUE "1") +qt_feature("xmlstream" PUBLIC + SECTION "Kernel" + LABEL "XML Streaming APIs" + PURPOSE "Provides a simple streaming API for XML." +) +qt_feature_definition("xmlstream" "QT_NO_XMLSTREAM" NEGATE VALUE "1") +qt_feature("xmlstreamreader" PUBLIC + SECTION "Kernel" + LABEL "QXmlStreamReader" + PURPOSE "Provides a well-formed XML parser with a simple streaming API." + CONDITION QT_FEATURE_xmlstream +) +qt_feature_definition("xmlstreamreader" "QT_NO_XMLSTREAMREADER" NEGATE VALUE "1") +qt_feature("xmlstreamwriter" PUBLIC + SECTION "Kernel" + LABEL "QXmlStreamWriter" + PURPOSE "Provides a XML writer with a simple streaming API." + CONDITION QT_FEATURE_xmlstream +) +qt_feature_definition("xmlstreamwriter" "QT_NO_XMLSTREAMWRITER" NEGATE VALUE "1") +qt_feature("textdate" PUBLIC + SECTION "Data structures" + LABEL "Text Date" + PURPOSE "Supports month and day names in dates." +) +qt_feature_definition("textdate" "QT_NO_TEXTDATE" NEGATE VALUE "1") +qt_feature("datestring" PUBLIC + SECTION "Data structures" + LABEL "QDate/QTime/QDateTime" + PURPOSE "Provides conversion between dates and strings." + CONDITION QT_FEATURE_textdate +) +qt_feature_definition("datestring" "QT_NO_DATESTRING" NEGATE VALUE "1") +qt_feature("process" PUBLIC + SECTION "File I/O" + LABEL "QProcess" + PURPOSE "Supports external process invocation." + CONDITION QT_FEATURE_processenvironment AND NOT WINRT AND NOT APPLE_UIKIT AND NOT INTEGRITY AND NOT VXWORKS AND NOT rtems +) +qt_feature_definition("process" "QT_NO_PROCESS" NEGATE VALUE "1") +qt_feature("processenvironment" PUBLIC + SECTION "File I/O" + LABEL "QProcessEnvironment" + PURPOSE "Provides a higher-level abstraction of environment variables." + CONDITION NOT WINRT AND NOT INTEGRITY AND NOT rtems +) +qt_feature("temporaryfile" PUBLIC + SECTION "File I/O" + LABEL "QTemporaryFile" + PURPOSE "Provides an I/O device that operates on temporary files." +) +qt_feature_definition("temporaryfile" "QT_NO_TEMPORARYFILE" NEGATE VALUE "1") +qt_feature("library" PUBLIC + SECTION "File I/O" + LABEL "QLibrary" + PURPOSE "Provides a wrapper for dynamically loaded libraries." + CONDITION WIN32 OR HPUX OR ( NOT NACL AND QT_FEATURE_dlopen ) +) +qt_feature_definition("library" "QT_NO_LIBRARY" NEGATE VALUE "1") +qt_feature("settings" PUBLIC + SECTION "File I/O" + LABEL "QSettings" + PURPOSE "Provides persistent application settings." +) +qt_feature_definition("settings" "QT_NO_SETTINGS" NEGATE VALUE "1") +qt_feature("filesystemwatcher" PUBLIC + SECTION "File I/O" + LABEL "QFileSystemWatcher" + PURPOSE "Provides an interface for monitoring files and directories for modifications." + CONDITION NOT WINRT +) +qt_feature_definition("filesystemwatcher" "QT_NO_FILESYSTEMWATCHER" NEGATE VALUE "1") +qt_feature("filesystemiterator" PUBLIC + SECTION "File I/O" + LABEL "QFileSystemIterator" + PURPOSE "Provides fast file system iteration." +) +qt_feature_definition("filesystemiterator" "QT_NO_FILESYSTEMITERATOR" NEGATE VALUE "1") +qt_feature("itemmodel" PUBLIC + SECTION "ItemViews" + LABEL "Qt Item Model" + PURPOSE "Provides the item model for item views" +) +qt_feature_definition("itemmodel" "QT_NO_ITEMMODEL" NEGATE VALUE "1") +qt_feature("proxymodel" PUBLIC + SECTION "ItemViews" + LABEL "QAbstractProxyModel" + PURPOSE "Supports processing of data passed between another model and a view." + CONDITION QT_FEATURE_itemmodel +) +qt_feature_definition("proxymodel" "QT_NO_PROXYMODEL" NEGATE VALUE "1") +qt_feature("sortfilterproxymodel" PUBLIC + SECTION "ItemViews" + LABEL "QSortFilterProxyModel" + PURPOSE "Supports sorting and filtering of data passed between another model and a view." + CONDITION QT_FEATURE_proxymodel +) +qt_feature_definition("sortfilterproxymodel" "QT_NO_SORTFILTERPROXYMODEL" NEGATE VALUE "1") +qt_feature("identityproxymodel" PUBLIC + SECTION "ItemViews" + LABEL "QIdentityProxyModel" + PURPOSE "Supports proxying a source model unmodified." + CONDITION QT_FEATURE_proxymodel +) +qt_feature_definition("identityproxymodel" "QT_NO_IDENTITYPROXYMODEL" NEGATE VALUE "1") +qt_feature("transposeproxymodel" PUBLIC + SECTION "ItemViews" + LABEL "QTransposeProxyModel" + PURPOSE "Provides a proxy to swap rows and columns of a model." + CONDITION QT_FEATURE_proxymodel +) +qt_feature_definition("transposeproxymodel" "QT_NO_TRANSPOSEPROXYMODEL" NEGATE VALUE "1") +qt_feature("concatenatetablesproxymodel" PUBLIC + SECTION "ItemViews" + LABEL "QConcatenateTablesProxyModel" + PURPOSE "Supports concatenating source models." + CONDITION QT_FEATURE_proxymodel +) +qt_feature_definition("concatenatetablesproxymodel" "QT_NO_CONCATENATETABLESPROXYMODEL" NEGATE VALUE "1") +qt_feature("stringlistmodel" PUBLIC + SECTION "ItemViews" + LABEL "QStringListModel" + PURPOSE "Provides a model that supplies strings to views." + CONDITION QT_FEATURE_itemmodel +) +qt_feature_definition("stringlistmodel" "QT_NO_STRINGLISTMODEL" NEGATE VALUE "1") +qt_feature("translation" PUBLIC + SECTION "Internationalization" + LABEL "Translation" + PURPOSE "Supports translations using QObject::tr()." +) +qt_feature_definition("translation" "QT_NO_TRANSLATION" NEGATE VALUE "1") +qt_feature("textcodec" PUBLIC + SECTION "Internationalization" + LABEL "QTextCodec" + PURPOSE "Supports conversions between text encodings." +) +qt_feature_definition("textcodec" "QT_NO_TEXTCODEC" NEGATE VALUE "1") +qt_feature("codecs" PUBLIC + SECTION "Internationalization" + LABEL "Codecs" + PURPOSE "Supports non-unicode text conversions." + CONDITION QT_FEATURE_textcodec +) +qt_feature_definition("codecs" "QT_NO_CODECS" NEGATE VALUE "1") +qt_feature("big_codecs" PUBLIC + SECTION "Internationalization" + LABEL "Big Codecs" + PURPOSE "Supports big codecs, e.g. CJK." + CONDITION QT_FEATURE_textcodec +) +qt_feature_definition("big_codecs" "QT_NO_BIG_CODECS" NEGATE VALUE "1") +qt_feature("easingcurve" PUBLIC + SECTION "Utilities" + LABEL "Easing curve" + PURPOSE "Provides easing curve." +) +qt_feature("animation" PUBLIC + SECTION "Utilities" + LABEL "Animation" + PURPOSE "Provides a framework for animations." + CONDITION QT_FEATURE_properties AND QT_FEATURE_easingcurve +) +qt_feature_definition("animation" "QT_NO_ANIMATION" NEGATE VALUE "1") +qt_feature("statemachine" PUBLIC + SECTION "Utilities" + LABEL "State machine" + PURPOSE "Provides hierarchical finite state machines." + CONDITION QT_FEATURE_properties +) +qt_feature_definition("statemachine" "QT_NO_STATEMACHINE" NEGATE VALUE "1") +qt_feature("qeventtransition" PUBLIC + LABEL "QEventTransition class" + CONDITION QT_FEATURE_statemachine +) +qt_feature("gestures" PUBLIC + SECTION "Utilities" + LABEL "Gesture" + PURPOSE "Provides a framework for gestures." +) +qt_feature_definition("gestures" "QT_NO_GESTURES" NEGATE VALUE "1") +qt_feature("sha3-fast" PRIVATE + SECTION "Utilities" + LABEL "Speed optimized SHA3" + PURPOSE "Optimizes SHA3 for speed instead of size." +) +qt_feature("jalalicalendar" PUBLIC + SECTION "Utilities" + LABEL "QJalaliCalendar" + PURPOSE "Support the Jalali (Persian) calendar" +) +qt_feature("hijricalendar" PRIVATE + SECTION "Utilities" + LABEL "QHijriCalendar" + PURPOSE "Generic basis for Islamic calendars, providing shared locale data" +) +qt_feature("islamiccivilcalendar" PUBLIC + SECTION "Utilities" + LABEL "QIslamicCivilCalendar" + PURPOSE "Support the Islamic Civil calendar" + CONDITION QT_FEATURE_hijricalendar +) +qt_feature("timezone" PUBLIC + SECTION "Utilities" + LABEL "QTimeZone" + PURPOSE "Provides support for time-zone handling." +) +qt_feature("datetimeparser" PRIVATE + SECTION "Utilities" + LABEL "QDateTimeParser" + PURPOSE "Provides support for parsing date-time texts." +) +qt_feature("commandlineparser" PUBLIC + SECTION "Utilities" + LABEL "QCommandlineParser" + PURPOSE "Provides support for command line parsing." +) +qt_feature("lttng" PRIVATE + LABEL "LTTNG" + AUTODETECT OFF + CONDITION LINUX AND LTTNGUST_FOUND + ENABLE INPUT_trace STREQUAL 'lttng' OR ( INPUT_trace STREQUAL 'yes' AND LINUX ) + DISABLE INPUT_trace STREQUAL 'etw' OR INPUT_trace STREQUAL 'no' +) +qt_feature("etw" PRIVATE + LABEL "ETW" + AUTODETECT OFF + CONDITION WIN32 + ENABLE INPUT_trace STREQUAL 'etw' OR ( INPUT_trace STREQUAL 'yes' AND WIN32 ) + DISABLE INPUT_trace STREQUAL 'lttng' OR INPUT_trace STREQUAL 'no' +) +qt_feature("topleveldomain" PUBLIC + SECTION "Utilities" + LABEL "QUrl::topLevelDomain()" + PURPOSE "Provides support for extracting the top level domain from URLs. If enabled, a binary dump of the Public Suffix List (http://www.publicsuffix.org, Mozilla License) is included. The data is then also used in QNetworkCookieJar::validateCookie." +) +qt_feature("win32_system_libs" + LABEL "Windows System Libraries" + CONDITION WIN32 AND libs.advapi32 AND libs.gdi32 AND libs.kernel32 AND libs.netapi32 AND libs.ole32 AND libs.shell32 AND libs.uuid AND libs.user32 AND libs.winmm AND libs.ws2_32 OR FIXME +) +qt_feature("cborstreamreader" PUBLIC + SECTION "Utilities" + LABEL "CBOR stream reading" + PURPOSE "Provides support for reading the CBOR binary format. Note that this is required for plugin loading. Qt GUI needs QPA plugins for basic operation." +) +qt_feature("cborstreamwriter" PUBLIC + SECTION "Utilities" + LABEL "CBOR stream writing" + PURPOSE "Provides support for writing the CBOR binary format." +) +qt_feature("binaryjson" PUBLIC + SECTION "Utilities" + LABEL "Binary JSON (deprecated)" + PURPOSE "Provides support for the deprecated binary JSON format." +) diff --git a/src/corelib/configure.json b/src/corelib/configure.json index c8e650ca9f..b607c300dd 100644 --- a/src/corelib/configure.json +++ b/src/corelib/configure.json @@ -770,11 +770,6 @@ "condition": "libs.pps", "output": [ "privateFeature" ] }, - "qeventtransition": { - "label": "QEventTransition class", - "condition": "features.statemachine", - "output": [ "publicFeature" ] - }, "renameat2": { "label": "renameat2()", "condition": "config.linux && tests.renameat2", @@ -1015,6 +1010,11 @@ "condition": "features.properties", "output": [ "publicFeature", "feature" ] }, + "qeventtransition": { + "label": "QEventTransition class", + "condition": "features.statemachine", + "output": [ "publicFeature" ] + }, "gestures": { "label": "Gesture", "purpose": "Provides a framework for gestures.", @@ -1082,10 +1082,7 @@ }, "topleveldomain": { "label": "QUrl::topLevelDomain()", - "purpose": "Provides support for extracting the top level domain from URLs. - -If enabled, a binary dump of the Public Suffix List (http://www.publicsuffix.org, -Mozilla License) is included. The data is then also used in QNetworkCookieJar::validateCookie.", + "purpose": "Provides support for extracting the top level domain from URLs. If enabled, a binary dump of the Public Suffix List (http://www.publicsuffix.org, Mozilla License) is included. The data is then also used in QNetworkCookieJar::validateCookie.", "section": "Utilities", "output": [ "publicFeature" ] }, @@ -1119,10 +1116,7 @@ Note that this is required for plugin loading. Qt GUI needs QPA plugins for basi { "type": "note", "condition": "features.journald || features.syslog || (config.qnx && features.slog2)", - "message": "journald, syslog or slog2 integration is enabled. -If your users intend to develop applications against this build, -ensure that the IDEs they use either set QT_FORCE_STDERR_LOGGING to 1 -or are able to read the logged output from journald, syslog or slog2." + "message": "journald, syslog or slog2 integration is enabled. If your users intend to develop applications against this build, ensure that the IDEs they use either set QT_FORCE_STDERR_LOGGING to 1 or are able to read the logged output from journald, syslog or slog2." }, { "type": "error", @@ -1132,15 +1126,12 @@ or are able to read the logged output from journald, syslog or slog2." { "type": "error", "condition": "input.doubleconversion == 'no' && !tests.xlocalescanprint", - "message": "Your C library does not provide sscanf_l or snprintf_l. -You need to use libdouble-conversion for double/string conversion." + "message": "Your C library does not provide sscanf_l or snprintf_l. You need to use libdouble-conversion for double/string conversion." }, { "type": "error", "condition": "!tests.atomicfptr", - "message": "detected a std::atomic implementation that fails for function pointers. -Please apply the patch corresponding to your Standard Library vendor, found in - qtbase/config.tests/atomicfptr" + "message": "detected a std::atomic implementation that fails for function pointers. Please apply the patch corresponding to your Standard Library vendor, found in qtbase/config.tests/atomicfptr" }, { "type": "error", diff --git a/src/corelib/global/qconfig.cpp.in b/src/corelib/global/qconfig.cpp.in new file mode 100644 index 0000000000..7fa21bcfed --- /dev/null +++ b/src/corelib/global/qconfig.cpp.in @@ -0,0 +1,32 @@ +/* Installation date */ +static const char qt_configure_installation [12+11] = "qt_instdate=2012-12-20"; +/* Installation Info */ +static const char qt_configure_prefix_path_str [12+256] = "qt_prfxpath=@CMAKE_INSTALL_PREFIX@"; +#ifdef QT_BUILD_QMAKE +static const char qt_configure_ext_prefix_path_str [12+256] = "qt_epfxpath=@CMAKE_INSTALL_PREFIX@"; +static const char qt_configure_host_prefix_path_str [12+256] = "qt_hpfxpath=@CMAKE_INSTALL_PREFIX@"; +#endif +static const short qt_configure_str_offsets[] = { +@QT_CONFIG_STR_OFFSETS_FIRST@ +#ifdef QT_BUILD_QMAKE +@QT_CONFIG_STR_OFFSETS_SECOND@ +#endif +}; +static const char qt_configure_strs[] = +@QT_CONFIG_STRS_FIRST@ +#ifdef QT_BUILD_QMAKE +@QT_CONFIG_STRS_SECOND@ +#endif +; +#define QT_CONFIGURE_SETTINGS_PATH "@QT_DEFAULT_SYS_CONF_DIR@" +#define QT_CONFIGURE_LIBLOCATION_TO_PREFIX_PATH "@QT_CONFIGURE_LIBLOCATION_TO_PREFIX_PATH@" +#define QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH "@QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH@" +#define QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH "@QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH@" +#ifdef QT_BUILD_QMAKE +# define QT_CONFIGURE_SYSROOTIFY_PREFIX false +#endif +#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12 +#ifdef QT_BUILD_QMAKE +# define QT_CONFIGURE_EXT_PREFIX_PATH qt_configure_ext_prefix_path_str + 12 +# define QT_CONFIGURE_HOST_PREFIX_PATH qt_configure_host_prefix_path_str + 12 +#endif diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 73597b6bcc..c8c7c0bf9b 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -670,6 +670,8 @@ static const char *getPrefix( # if QT_CONFIGURE_CROSSBUILD if (group == QLibraryInfo::DevicePaths) return QT_CONFIGURE_PREFIX_PATH; +# else + Q_UNUSED(group); # endif static QByteArray extPrefixPath = getExtPrefixFromHostBinDir().toLatin1(); return extPrefixPath.constData(); diff --git a/src/corelib/io/qfilesystemiterator_unix.cpp b/src/corelib/io/qfilesystemiterator_unix.cpp index ad6dbaba11..ceea3a467c 100644 --- a/src/corelib/io/qfilesystemiterator_unix.cpp +++ b/src/corelib/io/qfilesystemiterator_unix.cpp @@ -85,6 +85,8 @@ static bool checkNameDecodable(const char *d_name, qsizetype len) codec->toUnicode(d_name, len, &cs); return cs.invalidChars == 0 && cs.remainingChars == 0; #else + Q_UNUSED(d_name); + Q_UNUSED(len); // if we have no text codecs, then QString::fromLocal8Bit is fromLatin1 Q_UNUSED(d_name) Q_UNUSED(len) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 26304fcc40..7e3c01d461 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -4128,8 +4128,8 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p) If the QVariant contains a pointer to a type derived from QObject then \c{T} may be any QObject type. If the pointer stored in the QVariant can be qobject_cast to T, then that result is returned. Otherwise \nullptr is - returned. Note that this only works for QObject subclasses which use the - Q_OBJECT macro. + returned. Note that this only works for QObject subclasses which use + the Q_OBJECT macro. If the QVariant contains a sequential container and \c{T} is QVariantList, the elements of the container will be converted into \l {QVariant}s and returned as a QVariantList. diff --git a/src/corelib/mimetypes/mimetypes_resources.cmake b/src/corelib/mimetypes/mimetypes_resources.cmake new file mode 100644 index 0000000000..a91d25cc2c --- /dev/null +++ b/src/corelib/mimetypes/mimetypes_resources.cmake @@ -0,0 +1,21 @@ +# List of files that need to be packaged as resources. +# This file exists solely because of unit tests that need access to this +# information as well. This was previosly handled by referrencing a qrc +# file with the same information + +set(corelib_mimetypes_resource_file + "${CMAKE_CURRENT_LIST_DIR}/mime/packages/freedesktop.org.xml" +) + +function(corelib_add_mimetypes_resources target) + set(source_file "${corelib_mimetypes_resource_file}") + set_source_files_properties("${source_file}" + PROPERTIES QT_RESOURCE_ALIAS "freedesktop.org.xml" + ) + qt_add_resource(${target} "mimetypes" + PREFIX + "/qt-project.org/qmime/packages" + FILES + "${source_file}" + ) +endfunction() |