diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/CMakeLists.txt | 781 | ||||
-rw-r--r-- | src/corelib/configure.cmake | 712 | ||||
-rw-r--r-- | src/corelib/configure.json | 27 | ||||
-rw-r--r-- | src/corelib/global/qconfig.cpp.in | 65 |
4 files changed, 1567 insertions, 18 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt new file mode 100644 index 0000000000..eaa2ab8654 --- /dev/null +++ b/src/corelib/CMakeLists.txt @@ -0,0 +1,781 @@ + +find_package(Threads) +find_package(WrapDoubleConversion REQUIRED) + +find_library(FWAppKit AppKit) +find_library(FWApplicationServices ApplicationServices) +find_library(FWCoreFoundation CoreFoundation) +find_library(FWCoreServices CoreServices) +find_library(FWDiskArbitration DiskArbitration) +find_library(FWFoundation Foundation) +find_library(FWIOKit IOKit) +find_library(FWMobileCoreServices MobileCoreServices) +find_library(FWSecurity Security) +find_library(FWUIKit UIKit) +find_library(FWWatchKit WatchKit) + +## Evaluation helper target: +# FIXME: How does this work? +add_library(Qt_Evaluation INTERFACE) +target_sources(Qt_Evaluation INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/kernel/qtcore_eval.cpp") +target_include_directories(Qt_Evaluation INTERFACE global) + +##################################################################### +## Core Module: +##################################################################### + +add_qt_module(Core + 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 + codecs/qisciicodec.cpp codecs/qisciicodec_p.h + codecs/qlatincodec.cpp codecs/qlatincodec_p.h + codecs/qsimplecodec.cpp codecs/qsimplecodec_p.h + codecs/qtextcodec.cpp codecs/qtextcodec.h codecs/qtextcodec_p.h + codecs/qtsciicodec.cpp codecs/qtsciicodec_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/qfloat16_p.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/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.cpp 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/qfilesystemwatcher.cpp io/qfilesystemwatcher.h io/qfilesystemwatcher_p.h + io/qfilesystemwatcher_polling.cpp io/qfilesystemwatcher_polling_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/qsettings.cpp io/qsettings.h io/qsettings_p.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 + 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.h + serialization/qcbordiagnostic.cpp + serialization/qcbormap.h + serialization/qcborstream.cpp 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.cpp 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 + thread/qmutex.h + thread/qreadwritelock.h + thread/qrunnable.cpp thread/qrunnable.h + thread/qthread.cpp thread/qthread.h + thread/qthreadstorage.h + thread/qwaitcondition.h + tools/qalgorithms.h + tools/qarraydata.cpp tools/qarraydata.h + tools/qarraydataops.h + tools/qarraydatapointer.h + tools/qbitarray.cpp tools/qbitarray.h + tools/qbytearray.cpp tools/qbytearray.h tools/qbytearray_p.h + tools/qbytearraylist.cpp tools/qbytearraylist.h + tools/qbytearraymatcher.cpp tools/qbytearraymatcher.h + tools/qbytedata_p.h + tools/qcache.h + tools/qchar.h + tools/qcollator.cpp tools/qcollator.h tools/qcollator_p.h + tools/qcontainerfwd.h + tools/qcontiguouscache.cpp tools/qcontiguouscache.h + tools/qcryptographichash.cpp tools/qcryptographichash.h + tools/qdatetime.cpp tools/qdatetime.h tools/qdatetime_p.h + tools/qdoublescanprint_p.h + tools/qeasingcurve.cpp tools/qeasingcurve.h + tools/qfreelist.cpp tools/qfreelist_p.h + tools/qharfbuzz.cpp + 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/qlocale.cpp tools/qlocale.h tools/qlocale_p.h + tools/qlocale_data_p.h + tools/qlocale_tools.cpp tools/qlocale_tools_p.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/qregexp.cpp tools/qregexp.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/qstring.cpp tools/qstring.h + tools/qstringalgorithms.h tools/qstringalgorithms_p.h + tools/qstringbuilder.cpp tools/qstringbuilder.h + tools/qstringiterator_p.h + tools/qstringlist.cpp tools/qstringlist.h + tools/qstringliteral.h + tools/qstringmatcher.h + tools/qstringview.cpp tools/qstringview.h + tools/qtextboundaryfinder.cpp tools/qtextboundaryfinder.h + tools/qtimeline.cpp tools/qtimeline.h + tools/qtools_p.h + tools/qunicodetables_p.h + tools/qunicodetools.cpp tools/qunicodetools_p.h + tools/qvarlengtharray.h + tools/qvector.h + tools/qversionnumber.cpp tools/qversionnumber.h + tools/qvsnprintf.cpp + LIBRARIES + WrapDoubleConversion + tinycbor Threads::Threads ZLIB::ZLIB + QtHarfBuzz + PUBLIC_LIBRARIES Qt::Platform + DEFINES + QT_NO_USING_NAMESPACE + QT_NO_FOREACH +) + +# As a special feature, the global features are attached to QtCore as +# custom properties. That's symmetric to qconfig.cpp/h being part of +# QtCore and not of a QtGlobal library. + +foreach(visibility PUBLIC PRIVATE) + foreach(state ENABLED DISABLED) + get_target_property(props Qt_global_Config INTERFACE_QT_${state}_${visibility}_FEATURES) + set(propertyName "QT_GLOBAL_${state}_${visibility}_FEATURES") + set_property(TARGET Core PROPERTY ${propertyName} "${props}") + set_property(TARGET Core APPEND PROPERTY EXPORT_PROPERTIES "${propertyName}") + endforeach() +endforeach() + +configure_file(global/qconfig.cpp.in global/qconfig.cpp) + +# FIXME: tools still have a lot of special stuff that is not ported! + +# FIXME: qmake condition: (linux*|hurd*):!cross_compile:!static:!*-armcc* +# FIXME: qmake gets the elf interpreter out of /bin/ls +find_program(HOST_ELF_INTERPRETER NAMES ld-linux-x86-64.so.2 PATHS /lib /lib64 NO_DEFAULT_PATH) +if (LINUX AND NOT CMAKE_CROSSCOMPILING AND HOST_ELF_INTERPRETER_FOUND) + qt_internal_add_link_flags(Core "-Wl,-e,qt_core_boilerplate") + target_compile_definitions(Core PRIVATE ELF_INTERPRETER="${HOST_ELF_INTERPRETER}") +endif() + + +### Platform support: +##################################################################### + +# Windows + +### All Windows: +extend_target(Core CONDITION WIN32 + SOURCES + io/qfilesystemengine_win.cpp + io/qfilesystemwatcher_win.cpp io/qfilesystemwatcher_win_p.h + 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 + tools/qlocale_win.cpp + global/qoperatingsystemversion_win.cpp + LIBRARIES kernel32 user32 shell32 uuid ole32 advapi32 winmm version ws2_32 +) + +### Classic windows: +extend_target(Core CONDITION WIN32 AND NOT WINRT + SOURCES + io/qsettings_win.cpp + 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 + LIBRARIES mpr netapi32 userenv +) + +### WinRT +extend_target(Core CONDITION WIN32 AND WINRT + SOURCES + io/qsettings_winrt.cpp + 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 +) + +### All Apple: +extend_target(Core CONDITION APPLE + SOURCES + io/qsettings_mac.cpp + io/qstandardpaths_mac.mm + io/qstorageinfo_mac.cpp + kernel/qcfsocketnotifier.cpp kernel/qcfsocketnotifier_p.h + kernel/qcoreapplication_mac.cpp + kernel/qcore_foundation.mm + kernel/qcore_mac_objc.mm + kernel/qcore_mac_objc.mm kernel/qcore_mac.cpp kernel/qcore_mac_p.h + kernel/qelapsedtimer_mac.cpp + kernel/qeventdispatcher_cf.mm kernel/qeventdispatcher_cf_p.h + global/qoperatingsystemversion_darwin.mm + LIBRARIES ${FWCoreFoundation} ${FWFoundation} +) + +### Apple desktop machines: +extend_target(Core CONDITION APPLE_OSX + SOURCES + io/qfilesystemwatcher_fsevents.mm io/qfilesystemwatcher_fsevents_p.h + tools/qlocale_mac.mm + LIBRARIES + ${FWCoreServices} ${FWAppKit} ${FWSecurity} + ${FWApplicationServices} ${FWDiskArbitration} ${FWIOKit} +) + +### Apple mobile machines: +extend_target(Core CONDITION APPLE AND NOT APPLE_OSX + LIBRARIES ${FWMobileCoreServices} +) + +extend_target(Core CONDITION APPLE_WATCHOS LIBRARIES ${FWWatchKit}) +extend_target(Core CONDITION APPLE_TVOS LIBRARIES ${FWUIKit}) + +extend_target(Core CONDITION INTEGRITY + SOURCES tools/qlocale_unix.cpp + LIBRARIES posix ivfs socket net shm_client +) + +extend_target(Core CONDITION UNIX + SOURCES + io/qfilesystemengine_unix.cpp + io/qfsfileengine_unix.cpp + io/qlockfile_unix.cpp + thread/qthread_unix.cpp +) + +extend_target(Core CONDITION UNIX AND NOT APPLE + SOURCES + tools/qlocale_unix.cpp +) + +extend_target(Core CONDITION ANDROID + 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 +) + +extend_target(Core CONDITION HAIKU + SOURCES + io/qstandardpaths_haiku.cpp + io/qstorageinfo_unix.cpp + LIBRARIES be +) + +extend_target(Core CONDITION BSD + SOURCES io/qfilesystemwatcher_kqueue.cpp io/qfilesystemwatcher_kqueue_p.h +) + +extend_target(Core CONDITION VXWORKS + SOURCES kernel/qfunctions_vxworks.cpp kernel/qfunctions_vxworks.h +) + +extend_target(Core CONDITION NACL + SOURCES kernel/qfunctions_nacl.cpp kernel/qfunctions_nacl.h +) + +extend_target(Core CONDITION NOT WIN32 AND NOT APPLE AND NOT ANDROID AND NOT HAIKU + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + +### standardpaths, storageinfo and settings: +if (WIN32) + if (WINRT) + target_sources(Core PRIVATE + io/qsettings_winrt.cpp + io/qstandardpaths_winrt.cpp + io/qstorageinfo_stub.cpp + ) + else() + target_sources(Core PRIVATE + io/qsettings_win.cpp + io/qstandardpaths_win.cpp + io/qstorageinfo_win.cpp + ) + endif() +elseif (UNIX) + if (NOT INTEGRITY AND NOT UIKIT) + target_sources(Core PRIVATE io/forkfd_qt.cpp) + target_include_directories(Core PRIVATE ../3rdparty/forkfd) + endif() + if (NOT NACL AND APPLE) + target_sources(Core PRIVATE io/qsettings_mac.cpp) + endif() + if (APPLE) + target_sources(Core PRIVATE + io/qstandardpaths_mac.mm + io/qstorageinfo_mac.cpp + ) + elseif(ANDROID AND NOT ANDROID_EMBEDDED) + target_sources(Core PRIVATE + io/qstandardpaths_android.cpp + io/qstorageinfo_unix.cpp + ) + elseif(HAIKU) + target_sources(Core PRIVATE + io/qstandardpaths_haiku.cpp + io/qstorageinfo_unix.cpp + ) + else() + target_sources(Core PRIVATE + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp + ) + endif() +endif() + +### kernel stuff: +if (UNIX OR INTEGRITY) + extend_target(Core SOURCES + 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 + ) + if (NOT APPLE OR NACL) + target_sources(Core PRIVATE kernel/qelapsedtimer_unix.cpp) + endif() + + if (ANDROID) + target_sources(Core PRIVATE + kernel/qsharedmemory_android.cpp + kernel/qsystemsemaphore_android.cpp + ) + else() + target_sources(Core PRIVATE + kernel/qsharedmemory_posix.cpp + kernel/qsharedmemory_systemv.cpp + kernel/qsharedmemory_unix.cpp + kernel/qsystemsemaphore_posix.cpp + kernel/qsystemsemaphore_systemv.cpp + kernel/qsystemsemaphore_unix.cpp + ) + endif() + + # FIXME: Implement this! + # This is needed by QMetaType::typeName array implementation + #integrity: QMAKE_CXXFLAGS += --pending_instantiations=128 +elseif(NOT WIN32 AND NOT UNIX AND NOT APPLE) + target_sources(Core PRIVATE kernel/qelapsedtimer_generic.cpp) +endif() + + + +### Feature support: +##################################################################### + +## inotify: +extend_target(Core CONDITION QT_FEATURE_inotify + SOURCES + io/qfilesystemwatcher_inotify.cpp io/qfilesystemwatcher_inotify_p.h +) + +## qqnx_pps: +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 +) + +## clock_gettime: +extend_target(Core CONDITION UNIX AND QT_FEATURE_clock_gettime + LIBRARIES rt +) + +## glib: +extend_target(Core CONDITION QT_FEATURE_glib + SOURCES + kernel/qeventdispatcher_glib.cpp kernel/qeventdispatcher_glib_p.h + LIBRARIES PkgConfig::GLib +) + +## poll_select: +extend_target(Core CONDITION UNIX AND QT_FEATURE_poll_select + SOURCES kernel/qpoll.cpp +) + +## thread: +extend_target(Core CONDITION QT_FEATURE_thread + SOURCES + thread/qatomic_bootstrap.h + thread/qatomic.cpp thread/qatomic.h + thread/qatomic_cxx11.h + thread/qbasicatomic.h + thread/qfutex_p.h + thread/qgenericatomic.h + thread/qmutex.cpp thread/qmutex_p.h + thread/qmutexpool.cpp thread/qmutexpool_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 +) + +extend_target(Core CONDITION QT_FEATURE_thread AND WIN32 + SOURCES + thread/qwaitcondition_win.cpp +) + +extend_target(Core CONDITION QT_FEATURE_thread AND NOT WIN32 + SOURCES thread/qwaitcondition_unix.cpp +) + +## future: +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 +) + +## ICU: +extend_target(Core CONDITION QT_FEATURE_icu + SOURCES + codecs/qicucodec.cpp + tools/qcollator_icu.cpp + tools/qlocale_icu.cpp + LIBRARIES ICU::i18n ICU::uc ICU::data +) + +extend_target(Core CONDITION NOT QT_FEATURE_icu AND WIN32 + SOURCES tools/qcollator_win.cpp +) + +extend_target(Core CONDITION NOT QT_FEATURE_icu AND APPLE + SOURCES tools/qcollator_macx.cpp +) + +extend_target(Core CONDITION NOT QT_FEATURE_icu AND NOT WIN32 AND NOT APPLE + SOURCES tools/qcollator_posix.cpp +) + +extend_target(Core CONDITION 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 +) + +extend_target(Core CONDITION NOT QT_FEATURE_icu AND QT_FEATURE_iconv + SOURCES codecs/qiconvcodec.cpp codecs/qiconvcodec_p.h + LIBRARIES Iconv +) + +extend_target(Core CONDITION NOT QT_FEATURE_icu AND WIN32 + SOURCES codecs/qwindowscodec.cpp codecs/qwindowscodec_p.h +) + +## timezone: +extend_target(Core CONDITION QT_FEATURE_timezone + SOURCES + tools/qtimezone.cpp tools/qtimezone.h + tools/qtimezoneprivate.cpp tools/qtimezoneprivate_p.h + tools/qtimezoneprivate_data_p.h +) + +extend_target(Core CONDITION QT_FEATURE_timezone AND WIN32 + SOURCES tools/qtimezoneprivate_win.cpp +) + +extend_target(Core CONDITION QT_FEATURE_timezone AND APPLE + SOURCES tools/qtimezoneprivate_mac.mm +) + +extend_target(Core CONDITION QT_FEATURE_timezone AND ANDROID + SOURCES tools/qtimezoneprivate_android.cpp +) + +extend_target(Core CONDITION QT_FEATURE_timezone AND UNIX AND NOT APPLE + SOURCES tools/qtimezoneprivate_tz.cpp +) + +extend_target(Core CONDITION QT_FEATURE_timezone AND QT_FEATURE_icu AND NOT WIN32 AND NOT ANDROID AND NOT APPLE + SOURCES tools/qtimezoneprivate_icu.cpp +) + +## datetimeparser: +extend_target(Core CONDITION QT_FEATURE_datetimeparser + SOURCES tools/qdatetimeparser.cpp tools/qdatetimeparser_p.h +) + +## regularexpression: +extend_target(Core CONDITION QT_FEATURE_regularexpression + SOURCES tools/qregularexpression.cpp tools/qregularexpression.h + LIBRARIES PCRE2 +) + +## commandlineparser: +extend_target(Core CONDITION QT_FEATURE_commandlineparser + SOURCES + tools/qcommandlineoption.cpp tools/qcommandlineoption.h + tools/qcommandlineparser.cpp tools/qcommandlineparser.h +) + +## processenvironment: +extend_target(Core CONDITION QT_FEATURE_processenvironment + SOURCES io/qprocess.cpp io/qprocess.h io/qprocess_p.h +) + +extend_target(Core CONDITION QT_FEATURE_processenvironment AND WIN32 AND NOT WINRT + SOURCES io/qprocess_win.cpp +) + +extend_target(Core CONDITION QT_FEATURE_processenvironment AND APPLE + SOURCES io/qprocess_darwin.mm +) + +extend_target(Core CONDITION QT_FEATURE_processenvironment AND UNIX + SOURCES io/qprocess_unix.cpp +) + +## filesystemiterator: +extend_target(Core CONDITION QT_FEATURE_filesystemiterator AND WIN32 + SOURCES io/qfilesystemiterator_win.cpp +) + +extend_target(Core CONDITION QT_FEATURE_filesystemiterator AND UNIX + SOURCES io/qfilesystemiterator_unix.cpp +) + +## itemmodel: +extend_target(Core CONDITION QT_FEATURE_itemmodel + SOURCES + itemmodels/qabstractitemmodel.cpp itemmodels/qabstractitemmodel.h itemmodels/qabstractitemmodel_p.h + itemmodels/qitemselectionmodel.cpp itemmodels/qitemselectionmodel.h itemmodels/qitemselectionmodel_p.h +) + +## proxymodel: +extend_target(Core CONDITION QT_FEATURE_proxymodel + SOURCES itemmodels/qabstractproxymodel.cpp itemmodels/qabstractproxymodel.h itemmodels/qabstractproxymodel_p.h +) + +## identityproxymodel: +extend_target(Core CONDITION QT_FEATURE_identityproxymodel + SOURCES itemmodels/qidentityproxymodel.cpp itemmodels/qidentityproxymodel.h +) + +## identityproxymodel: +extend_target(Core CONDITION QT_FEATURE_sortfilterproxymodel + SOURCES itemmodels/qsortfilterproxymodel.cpp itemmodels/qsortfilterproxymodel.h +) + +## stringlistmodel: +extend_target(Core CONDITION QT_FEATURE_stringlistmodel + SOURCES itemmodels/qstringlistmodel.cpp itemmodels/qstringlistmodel.h +) + +## library: +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 + LIBRARIES ${CMAKE_DL_LIBS} +) + +extend_target(Core CONDITION QT_FEATURE_library AND WIN32 + SOURCES plugin/qlibrary_win.cpp +) + +extend_target(Core CONDITION QT_FEATURE_library AND UNIX + SOURCES plugin/qlibrary_unix.cpp +) + +## statemachine: +extend_target(Core CONDITION QT_FEATURE_statemachine + SOURCES + 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 +) + +# qeventtransition: +extend_target(Core CONDITION QT_FEATURE_qeventtransition + SOURCES statemachine/qeventtransition.cpp statemachine/qeventtransition.h statemachine/qeventtransition_p.h +) + +# mimetype: +extend_target(Core CONDITION QT_FEATURE_mimetype + SOURCES + mimetypes/mimetypes.qrc + 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 +) + +# Enable Evaluation based on QT_EVAL variable being set from the outside: +extend_target(Core CONDITION QT_EVAL LIBRARIES Qt_Evaluation) + +### Extra stuff: +##################################################################### + + +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/global/qfloat16tables.cpp" + COMMAND qfloat16-tables + ARGS "${CMAKE_CURRENT_BINARY_DIR}/global/qfloat16tables.cpp" + DEPENDS global/qfloat16.h + COMMENT qfloat16-tables + VERBATIM) +target_sources(Core PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/global/qfloat16tables.cpp") + +qt_create_tracepoints(Core qtcore.tracepoints) + +# 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() + +add_qt_docs(./doc/qtcore.qdocconf) diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake new file mode 100644 index 0000000000..21886b06aa --- /dev/null +++ b/src/corelib/configure.cmake @@ -0,0 +1,712 @@ + + +#### Inputs + +# input iconv +set(INPUT_iconv "undefined" CACHE STRING "") +set_property(CACHE INPUT_iconv PROPERTY STRINGS undefined no yes posix sun gnu) + + + +#### Libraries + +find_package(GLib) +set_package_properties(GLib PROPERTIES TYPE OPTIONAL) +find_package(ICU COMPONENTS i18n uc data) +set_package_properties(ICU PROPERTIES TYPE OPTIONAL) +find_package(Libsystemd) +set_package_properties(Libsystemd PROPERTIES TYPE OPTIONAL) +find_package(Atomic) +set_package_properties(Atomic PROPERTIES TYPE OPTIONAL) +find_package(PCRE2) +set_package_properties(PCRE2 PROPERTIES TYPE REQUIRED) + + +#### Tests + +# atomicfptr +qt_config_compile_test(atomicfptr + LABEL "working std::atomic for function pointers" +" +#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; +} +"# FIXME: qmake: CONFIG += c++11 +) + +# clock-monotonic +qt_config_compile_test(clock_monotonic + LABEL "POSIX monotonic clock" +" +#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" +"#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 +qt_config_compile_test(cxx11_future + LABEL "C++11 <future>" +" +#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; +} +"# FIXME: qmake: unix:LIBS += -lpthread +) + +# eventfd +qt_config_compile_test(eventfd + LABEL "eventfd" +" +#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; +} +") + +# inotify +qt_config_compile_test(inotify + LABEL "inotify" +" +#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" +" +#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 +qt_config_compile_test(ipc_posix + LABEL "POSIX IPC" +" +#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; +} +"# FIXME: qmake: linux: LIBS += -lpthread -lrt +) + +# linkat +qt_config_compile_test(linkat + LABEL "linkat()" +"#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()" +" +#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()" +" +#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()" +" +#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()" +"#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" +"#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" +" +#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; +} +") + + + +#### Features + +qt_feature("clock_gettime" PRIVATE + LABEL "clock_gettime()" + CONDITION UNIX AND libs.librt OR FIXME +) +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 GLib_FOUND +) +qt_feature_definition("glib" "QT_NO_GLIB" NEGATE VALUE "1") +qt_feature("iconv" PUBLIC PRIVATE + SECTION "Internationalization" + LABEL "iconv" + PURPOSE "Provides internationalization on Unix." + CONDITION NOT QT_FEATURE_icu AND QT_FEATURE_textcodec AND ( QT_FEATURE_posix_libiconv OR TEST_sun_iconv OR QT_FEATURE_gnu_libiconv ) +) +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 + ENABLE INPUT_iconv STREQUAL 'posix' + DISABLE INPUT_iconv STREQUAL 'sun' OR INPUT_iconv STREQUAL 'gnu' OR INPUT_iconv STREQUAL 'no' +) +qt_feature("gnu_libiconv" PRIVATE + LABEL "GNU iconv" + CONDITION NOT WIN32 AND NOT QNX AND NOT ANDROID AND NOT APPLE AND NOT QT_FEATURE_posix_libiconv AND NOT TEST_sun_iconv AND libs.gnu_iconv OR FIXME + ENABLE INPUT_iconv STREQUAL 'gnu' + DISABLE INPUT_iconv STREQUAL 'posix' OR INPUT_iconv STREQUAL 'sun' OR INPUT_iconv STREQUAL 'no' +) +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" PUBLIC + 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("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" PUBLIC 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 libs.pps OR FIXME + EMIT_IF QNX +) +qt_feature("renameat2" PRIVATE + LABEL "renameat2()" + CONDITION LINUX AND TEST_renameat2 +) +qt_feature("slog2" PRIVATE + LABEL "slog2" + CONDITION libs.slog2 OR FIXME +) +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" PUBLIC + LABEL "Threadsafe pipe creation" + CONDITION TEST_cloexec +) +qt_feature_definition("threadsafe_cloexec" "QT_THREADSAFE_CLOEXEC" VALUE "1") +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." +) +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("systemsemaphore" PUBLIC + SECTION "Kernel" + LABEL "QSystemSemaphore" + PURPOSE "Provides a general counting system semaphore." + CONDITION ( NOT INTEGRITY AND NOT VXWORKS ) 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 convertion 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 +) +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 +) +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 UNIX ) +) +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("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("animation" PUBLIC + SECTION "Utilities" + LABEL "Animation" + PURPOSE "Provides a framework for animations." + CONDITION QT_FEATURE_properties +) +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("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 libs.lttng-ust OR FIXME + 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." +) diff --git a/src/corelib/configure.json b/src/corelib/configure.json index f09ef6c1dd..a3a4d8359a 100644 --- a/src/corelib/configure.json +++ b/src/corelib/configure.json @@ -622,11 +622,6 @@ "condition": "libs.pps", "output": [ "privateFeature" ] }, - "qeventtransition": { - "label": "QEventTransition class", - "condition": "features.statemachine", - "output": [ "publicFeature" ] - }, "renameat2": { "label": "renameat2()", "condition": "config.linux && tests.renameat2", @@ -847,6 +842,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.", @@ -895,10 +895,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" ] } @@ -908,10 +905,7 @@ Mozilla License) is included. The data is then also used in QNetworkCookieJar::v { "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", @@ -921,15 +915,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" } ], diff --git a/src/corelib/global/qconfig.cpp.in b/src/corelib/global/qconfig.cpp.in new file mode 100644 index 0000000000..6f589b3771 --- /dev/null +++ b/src/corelib/global/qconfig.cpp.in @@ -0,0 +1,65 @@ +/* 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[] = { + 0, + 4, + 12, + 16, + 24, + 28, + 36, + 44, + 48, + 50, + 52, + 65, + 74, +#ifdef QT_BUILD_QMAKE + 80, + 81, + 87, + 91, + 95, + 97, + 107, +#endif +}; +static const char qt_configure_strs[] = + "doc\0" + "include\0" + "lib\0" + "libexec\0" + "bin\0" + "plugins\0" + "imports\0" + "qml\0" + ".\0" + ".\0" + "translations\0" + "examples\0" + "tests\0" +#ifdef QT_BUILD_QMAKE + "\0" + "false\0" + "bin\0" + "lib\0" + ".\0" + "linux-g++\0" + "linux-g++\0" +#endif +; +#define QT_CONFIGURE_SETTINGS_PATH "etc/xdg" +#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 |