summaryrefslogtreecommitdiffstats
path: root/src/corelib/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/CMakeLists.txt')
-rw-r--r--src/corelib/CMakeLists.txt460
1 files changed, 279 insertions, 181 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
index d9519bd003..b4c47e8bad 100644
--- a/src/corelib/CMakeLists.txt
+++ b/src/corelib/CMakeLists.txt
@@ -1,25 +1,9 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from corelib.pro.
-
-# special case begin
-qt_find_package(Threads PROVIDED_TARGETS Threads::Threads)
qt_find_package(WrapPCRE2 PROVIDED_TARGETS WrapPCRE2::WrapPCRE2)
qt_find_package(WrapZLIB PROVIDED_TARGETS WrapZLIB::WrapZLIB)
-
-# 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
- "${QT_BUILD_INTERNALS_RELOCATABLE_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}" "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}")
-
if(ANDROID)
set(corelib_extra_cmake_files
"${CMAKE_CURRENT_SOURCE_DIR}/${QT_CMAKE_EXPORT_NAMESPACE}AndroidMacros.cmake")
@@ -29,18 +13,10 @@ if(WASM)
"${CMAKE_CURRENT_SOURCE_DIR}/${QT_CMAKE_EXPORT_NAMESPACE}WasmMacros.cmake")
endif()
-qt_path_join(config_build_dir ${QT_CONFIG_BUILD_DIR} "${INSTALL_CMAKE_NAMESPACE}Core")
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/QtInstallPaths.cmake.in"
- "${config_build_dir}/QtInstallPaths.cmake" @ONLY)
-# special case end
-
#####################################################################
## Core Module:
#####################################################################
-set(core_version_tagging_files
- global/qversiontagging.cpp
- global/qversiontagging.h)
qt_internal_add_module(Core
QMAKE_MODULE_CONFIG moc resources
NO_GENERATE_METATYPES # metatypes are extracted manually below
@@ -56,7 +32,8 @@ qt_internal_add_module(Core
global/archdetect.cpp
global/qassert.cpp global/qassert.h
global/qcompare_impl.h
- global/qcompare.h
+ global/qcompare.cpp global/qcompare.h
+ global/qcomparehelpers.h
global/qcompilerdetection.h
global/qconstructormacros.h
global/qcontainerinfo.h
@@ -94,22 +71,28 @@ qt_internal_add_module(Core
global/qtpreprocessorsupport.h
global/qtrace_p.h
global/qtresource.h
+ global/qtsymbolmacros.h
global/qttranslation.h
global/qttypetraits.h
global/qtversionchecks.h
global/qtversion.h
global/qtypeinfo.h
global/qtypes.cpp global/qtypes.h
- ${core_version_tagging_files}
global/qvolatile_p.h
global/q20algorithm.h
+ global/q20chrono.h
global/q20functional.h
global/q20iterator.h
+ global/q20map.h
global/q20memory.h
global/q20type_traits.h
+ global/q20vector.h
global/q23functional.h
+ global/q23utility.cpp # remove once we have a user that tests this
+ global/q23utility.h
global/qxpfunctional.h
global/qxptype_traits.h
+ global/qversiontagging.h
ipc/qsharedmemory.cpp ipc/qsharedmemory.h ipc/qsharedmemory_p.h
ipc/qsystemsemaphore.cpp ipc/qsystemsemaphore.h ipc/qsystemsemaphore_p.h
ipc/qtipccommon.cpp ipc/qtipccommon.h ipc/qtipccommon_p.h
@@ -118,6 +101,7 @@ qt_internal_add_module(Core
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/qdirlisting.cpp io/qdirlisting.h io/qdirentryinfo_p.h
io/qdiriterator.cpp io/qdiriterator.h
io/qfile.cpp io/qfile.h io/qfile_p.h
io/qfiledevice.cpp io/qfiledevice.h io/qfiledevice_p.h
@@ -127,6 +111,7 @@ qt_internal_add_module(Core
io/qfilesystementry.cpp io/qfilesystementry_p.h
io/qfilesystemiterator_p.h
io/qfilesystemmetadata_p.h
+ io/qfloat16format.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
@@ -143,21 +128,24 @@ qt_internal_add_module(Core
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/qtformat_impl.h
io/qurl.cpp io/qurl.h io/qurl_p.h
io/qurlidna.cpp
io/qurlquery.cpp io/qurlquery.h
io/qurlrecode.cpp
+ io/qzipreader_p.h io/qzipwriter_p.h io/qzip.cpp
kernel/qabstracteventdispatcher.cpp kernel/qabstracteventdispatcher.h kernel/qabstracteventdispatcher_p.h
kernel/qabstractnativeeventfilter.cpp kernel/qabstractnativeeventfilter.h
kernel/qapplicationstatic.h
kernel/qassociativeiterable.cpp kernel/qassociativeiterable.h
kernel/qbasictimer.cpp kernel/qbasictimer.h
kernel/qbindingstorage.h
+ kernel/qchronotimer.cpp kernel/qchronotimer.h
kernel/qcoreapplication.cpp kernel/qcoreapplication.h kernel/qcoreapplication_p.h
kernel/qcoreapplication_platform.h
kernel/qcorecmdlineargs_p.h
- kernel/qcoreevent.cpp kernel/qcoreevent.h
- kernel/qdeadlinetimer.cpp kernel/qdeadlinetimer.h kernel/qdeadlinetimer_p.h
+ kernel/qcoreevent.cpp kernel/qcoreevent.h kernel/qcoreevent_p.h
+ kernel/qdeadlinetimer.cpp kernel/qdeadlinetimer.h
kernel/qelapsedtimer.cpp kernel/qelapsedtimer.h
kernel/qeventloop.cpp kernel/qeventloop.h kernel/qeventloop_p.h
kernel/qfunctions_p.h
@@ -175,7 +163,7 @@ qt_internal_add_module(Core
kernel/qobjectcleanuphandler.cpp kernel/qobjectcleanuphandler.h
kernel/qobjectdefs.h
kernel/qobjectdefs_impl.h
- kernel/qpointer.cpp kernel/qpointer.h
+ kernel/qpointer.h
kernel/qproperty.cpp kernel/qproperty.h kernel/qproperty_p.h
kernel/qpropertyprivate.h
kernel/qsequentialiterable.cpp kernel/qsequentialiterable.h
@@ -183,9 +171,10 @@ qt_internal_add_module(Core
kernel/qsocketnotifier.cpp kernel/qsocketnotifier.h
kernel/qsystemerror.cpp kernel/qsystemerror_p.h
kernel/qtestsupport_core.cpp kernel/qtestsupport_core.h
+ kernel/qsingleshottimer_p.h
kernel/qtimer.cpp kernel/qtimer.h kernel/qtimer_p.h
kernel/qtranslator.cpp kernel/qtranslator.h kernel/qtranslator_p.h
- kernel/qvariant.cpp kernel/qvariant.h
+ kernel/qvariant.cpp kernel/qvariant.h kernel/qvariant_p.h
kernel/qvariantmap.h kernel/qvarianthash.h kernel/qvariantlist.h
plugin/qfactoryinterface.cpp plugin/qfactoryinterface.h
plugin/qfactoryloader.cpp plugin/qfactoryloader_p.h
@@ -208,12 +197,9 @@ qt_internal_add_module(Core
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/qxmlstreamgrammar.cpp serialization/qxmlstreamgrammar_p.h
- serialization/qxmlstreamparser_p.h
serialization/qxmlutils.cpp serialization/qxmlutils_p.h
- text/qanystringview.h
- text/qbytearray.cpp text/qbytearray.h text/qbytearray_p.h
+ text/qanystringview.cpp text/qanystringview.h
+ text/qbytearray.cpp text/qbytearray.h
text/qbytearrayalgorithms.h
text/qbytearraylist.cpp text/qbytearraylist.h
text/qbytearraymatcher.cpp text/qbytearraymatcher.h
@@ -227,6 +213,7 @@ qt_internal_add_module(Core
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/qstaticlatin1stringmatcher.h
text/qstring.cpp text/qstring.h
text/qstringalgorithms.h text/qstringalgorithms_p.h
text/qstringbuilder.cpp text/qstringbuilder.h
@@ -257,6 +244,7 @@ qt_internal_add_module(Core
thread/qthreadstorage.h
thread/qtsan_impl.h
thread/qwaitcondition.h thread/qwaitcondition_p.h
+ thread/qyieldcpu.h
time/qcalendar.cpp time/qcalendar.h
time/qcalendarbackend_p.h
time/qcalendarmath_p.h
@@ -272,7 +260,7 @@ qt_internal_add_module(Core
tools/qarraydata.cpp tools/qarraydata.h
tools/qarraydataops.h
tools/qarraydatapointer.h
- tools/qatomicscopedvaluerollback_p.h
+ tools/qatomicscopedvaluerollback.h
tools/qbitarray.cpp tools/qbitarray.h
tools/qcache.h
tools/qcontainerfwd.h
@@ -282,6 +270,7 @@ qt_internal_add_module(Core
tools/qduplicatetracker_p.h
tools/qflatmap_p.h
tools/qfreelist.cpp tools/qfreelist_p.h
+ tools/qfunctionaltools_impl.cpp tools/qfunctionaltools_impl.h
tools/qhashfunctions.h
tools/qiterator.h
tools/qline.cpp tools/qline.h
@@ -289,7 +278,8 @@ qt_internal_add_module(Core
tools/qmakearray_p.h
tools/qmap.h
tools/qmargins.cpp tools/qmargins.h
- tools/qmessageauthenticationcode.cpp tools/qmessageauthenticationcode.h
+ tools/qmessageauthenticationcode.h
+ tools/qminimalflatset_p.h
tools/qoffsetstringarray_p.h
tools/qpair.h
tools/qpoint.cpp tools/qpoint.h
@@ -306,57 +296,68 @@ qt_internal_add_module(Core
tools/qsharedpointer.cpp tools/qsharedpointer.h
tools/qsharedpointer_impl.h
tools/qsize.cpp tools/qsize.h
+ tools/qspan.h
+ tools/qspan_p.h
tools/qstack.h
tools/qtaggedpointer.h
tools/qtools_p.h
+ tools/qtyperevision.cpp tools/qtyperevision.h
+ tools/quniquehandle_p.h
tools/qvarlengtharray.h
tools/qvector.h
tools/qversionnumber.cpp tools/qversionnumber.h
+ NO_UNITY_BUILD_SOURCES
+ # MinGW complains about `free-nonheap-object` in ~QSharedDataPointer()
+ # despite the fact that appropriate checks are in place to avoid that!
+ tools/qshareddata.cpp tools/qshareddata.h
+ text/qlocale.cpp text/qlocale.h
+ global/qglobal.cpp # undef qFatal
+ global/qlogging.cpp # undef qFatal/qInfo/qDebug
+ global/qrandom.cpp # undef Q_ASSERT/_X
+ text/qstringconverter.cpp # enum Data
+ tools/qcryptographichash.cpp # KeccakNISTInterface/Final
+ io/qdebug.cpp # undef qDebug
+ NO_PCH_SOURCES
+ compat/removed_api.cpp
+ global/qsimd.cpp
DEFINES
+ QT_NO_CONTEXTLESS_CONNECT
QT_NO_FOREACH
+ QT_NO_QPAIR
QT_NO_USING_NAMESPACE
QT_TYPESAFE_FLAGS
+ QT_USE_NODISCARD_FILE_OPEN
INCLUDE_DIRECTORIES
- "${CMAKE_CURRENT_BINARY_DIR}/global" # special case
+ "${CMAKE_CURRENT_BINARY_DIR}/global"
"${CMAKE_CURRENT_BINARY_DIR}/kernel" # for moc_qobject.cpp to be found by qobject.cpp
- # ../3rdparty/md4 # special case remove
- # ../3rdparty/md5 # special case remove
- # ../3rdparty/sha3 # special case remove
../3rdparty/tinycbor/src
LIBRARIES
- Qt::GlobalConfigPrivate # special case
+ Qt::GlobalConfigPrivate
WrapZLIB::WrapZLIB
PRECOMPILED_HEADER
"global/qt_pch.h"
- GENERATE_CPP_EXPORTS
- PUBLIC_LIBRARIES # special case:
- Qt::Platform # special case:
- # special case begin
- # Generated in QtBaseGlobalTargets
+ PUBLIC_LIBRARIES
+ Qt::Platform
EXTRA_CMAKE_FILES
- "${CMAKE_CURRENT_SOURCE_DIR}/Qt6CTestMacros.cmake"
- "${CMAKE_CURRENT_SOURCE_DIR}/Qt6CoreConfigureFileTemplate.in"
- "${CMAKE_CURRENT_SOURCE_DIR}/Qt6CoreDeploySupport.cmake"
- "${config_build_dir}/QtInstallPaths.cmake"
- ${corelib_extra_cmake_files}
- # special case end
+ "${CMAKE_CURRENT_SOURCE_DIR}/Qt6CTestMacros.cmake"
+ "${CMAKE_CURRENT_SOURCE_DIR}/Qt6CoreConfigureFileTemplate.in"
+ "${CMAKE_CURRENT_SOURCE_DIR}/Qt6CoreResourceInit.in.cpp"
+ "${CMAKE_CURRENT_SOURCE_DIR}/Qt6CoreDeploySupport.cmake"
+ ${corelib_extra_cmake_files}
+ POLICIES
+ QTP0002
+ QTP0003
)
_qt_internal_setup_deploy_support()
-set(corelib_no_pch_sources
- compat/removed_api.cpp
- global/qsimd.cpp
-)
-
-foreach(src ${corelib_no_pch_sources})
- qt_update_ignore_pch_source(Core ${src})
-endforeach()
-
-# special case begin
add_dependencies(Core qmodule_pri)
if (NOT QT_NAMESPACE STREQUAL "")
- target_compile_definitions(Core PUBLIC "QT_NAMESPACE=${QT_NAMESPACE}")
+ set(core_namespace_defs "QT_NAMESPACE=${QT_NAMESPACE}")
+ if(QT_INLINE_NAMESPACE)
+ list(APPEND core_namespace_defs QT_INLINE_NAMESPACE)
+ endif()
+ target_compile_definitions(Core PUBLIC ${core_namespace_defs})
set_target_properties(Core PROPERTIES _qt_namespace "${QT_NAMESPACE}")
set_property(TARGET Core APPEND PROPERTY EXPORT_PROPERTIES _qt_namespace)
endif()
@@ -411,7 +412,7 @@ set_source_files_properties(
# Find ELF interpreter and define a macro for that:
if ((LINUX OR HURD) 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
+ execute_process(COMMAND ${CMAKE_COMMAND} -E env LC_ALL=C readelf -l /bin/sh
RESULT_VARIABLE readelf_ok
OUTPUT_VARIABLE readelf_output
)
@@ -427,7 +428,6 @@ if ((LINUX OR HURD) AND NOT CMAKE_CROSSCOMPILING AND BUILD_SHARED_LIBS)
target_compile_definitions(Core PRIVATE ELF_INTERPRETER="${ELF_INTERPRETER}")
endif()
endif()
-# special case end
qt_internal_add_simd_part(Core SIMD mips_dsp
SOURCES
@@ -442,7 +442,7 @@ endif()
if(ANDROID)
set_property(TARGET Core APPEND PROPERTY QT_ANDROID_BUNDLED_JAR_DEPENDENCIES
- jar/Qt${QtBase_VERSION_MAJOR}Android.jar # special case
+ jar/Qt${QtBase_VERSION_MAJOR}Android.jar
)
set_property(TARGET Core APPEND PROPERTY QT_ANDROID_LIB_DEPENDENCIES
${INSTALL_PLUGINSDIR}/platforms/libplugins_platforms_qtforandroid.so
@@ -452,53 +452,25 @@ if(ANDROID)
)
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_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:
-#####################################################################
+# Add version tagging source files if the linker has version script support
+# or the platform supports it.
+set(core_version_tagging_files
+ global/qversiontagging.cpp)
+qt_internal_extend_target(Core
+ CONDITION QT_FEATURE_version_tagging
+ SOURCES ${core_version_tagging_files}
+)
-#### Keys ignored in scope 2:.:.:corelib.pro:QT_FEATURE_gc_binaries:
-# MODULE_CONFIG = "gc_binaries"
-# special case begin
-# remove because it's handled manually
-#qt_internal_extend_target(Core CONDITION NOT QT_NAMESPACE_ISEMPTY
-# PUBLIC_DEFINES
-# QT_NAMESPACE=
-#)
-# special case end
+if(GCC)
+ # Disable LTO, as the symbols disappear somehow under GCC
+ # (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200)
+ # The issue should be fixed in GCC >= 10
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
+ set_source_files_properties(${core_version_tagging_files}
+ PROPERTIES COMPILE_OPTIONS "-fno-lto")
+ endif()
+endif()
qt_internal_extend_target(Core
CONDITION ( TEST_architecture_arch STREQUAL i386 ) OR
@@ -511,7 +483,7 @@ qt_internal_extend_target(Core
qt_internal_extend_target(Core CONDITION ANDROID
DEFINES
- LIBS_SUFFIX="_${ANDROID_ABI}.so" # special case
+ LIBS_SUFFIX="_${ANDROID_ABI}.so"
)
qt_internal_extend_target(Core CONDITION MSVC AND (TEST_architecture_arch STREQUAL "i386")
@@ -519,12 +491,11 @@ qt_internal_extend_target(Core CONDITION MSVC AND (TEST_architecture_arch STREQU
"/BASE:0x67000000"
)
-# QtCore can't be compiled with -Wl,-no-undefined because it uses the
-# "environ" variable and FreeBSD does not include a weak symbol for it
-# in libc.
-qt_internal_extend_target(Core CONDITION FREEBSD
- LINK_OPTIONS
- "LINKER:--warn-unresolved-symbols"
+qt_internal_extend_target(Core CONDITION QT_FEATURE_xmlstream
+ SOURCES
+ serialization/qxmlstream.cpp serialization/qxmlstream.h serialization/qxmlstream_p.h
+ serialization/qxmlstreamgrammar.cpp serialization/qxmlstreamgrammar_p.h
+ serialization/qxmlstreamparser_p.h
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_animation
@@ -544,6 +515,7 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_animation
# from the wrong DLL at runtime and crash!
qt_internal_extend_target(Core CONDITION QT_FEATURE_thread AND WIN32
SOURCES
+ thread/qfutex_win_p.h
thread/qwaitcondition_win.cpp
LIBRARIES
synchronization
@@ -562,7 +534,6 @@ qt_internal_extend_target(Core CONDITION WIN32
io/qwindowspipewriter.cpp io/qwindowspipewriter_p.h
io/qntdll_p.h
kernel/qcoreapplication_win.cpp
- kernel/qelapsedtimer_win.cpp
kernel/qeventdispatcher_win.cpp kernel/qeventdispatcher_win_p.h
kernel/qfunctions_win.cpp kernel/qfunctions_win_p.h kernel/qfunctions_winrt_p.h
ipc/qsharedmemory_win.cpp
@@ -571,7 +542,7 @@ qt_internal_extend_target(Core CONDITION WIN32
kernel/qwinregistry.cpp kernel/qwinregistry_p.h
plugin/qsystemlibrary.cpp plugin/qsystemlibrary_p.h
thread/qthread_win.cpp
- # DEFINES # special case: remove
+ platform/windows/qcomobject_p.h
LIBRARIES
advapi32
authz
@@ -589,6 +560,19 @@ qt_internal_extend_target(Core CONDITION WIN32
userenv
)
+qt_internal_extend_target(Core CONDITION WIN32
+ NO_UNITY_BUILD_SOURCES
+ global/qsimd.cpp # Q_DECL_INIT_PRIORITY
+ serialization/qcborvalue.cpp # various windows.h clashes
+ serialization/qjsoncbor.cpp
+ serialization/qjsonvalue.cpp
+ serialization/qxmlstream.cpp
+ text/qbytearray.cpp
+ text/qlatin1stringmatcher.cpp
+ text/qunicodetools.cpp
+ tools/qhash.cpp # Q_DECL_INIT_PRIORITY
+)
+
if(NOT WIN32)
### Qt7: remove
# Make qwineventnotifier.h available on non-Windows platforms too for code bases that include
@@ -611,13 +595,21 @@ qt_internal_extend_target(Core CONDITION APPLE
kernel/qcore_foundation.mm
kernel/qcore_mac.mm kernel/qcore_mac_p.h
kernel/qcoreapplication_mac.cpp
- kernel/qelapsedtimer_mac.cpp
kernel/qeventdispatcher_cf.mm kernel/qeventdispatcher_cf_p.h
LIBRARIES
${FWCoreFoundation}
${FWFoundation}
PUBLIC_LIBRARIES
${FWIOKit}
+ DEFINES
+ _DARWIN_C_SOURCE # This resolves two issues,
+ # - Provide DT_* macros to qfilesystemengine_unix.cpp
+ # - Enables SOCK_MAXADDRLEN in case its missing during the unity build
+ NO_UNITY_BUILD_SOURCES
+ kernel/qsystemerror.cpp
+ # This makes sure that the tst_qmakelib passes. For some reason,
+ # QtCore ends up returning a corrupted error message in
+ # write_file(): fail
)
qt_internal_extend_target(Core CONDITION MACOS
@@ -647,24 +639,6 @@ qt_internal_extend_target(Core CONDITION QCC AND (CMAKE_CXX_COMPILER_VERSION VER
PUBLIC_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:-Wno-invalid-offsetof>
)
-#### Keys ignored in scope 14:.:.: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 15:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_INSTALL_DATA_DIR):
-# CMAKE_INSTALL_DATA_DIR = "$$[QT_HOST_DATA]/"
-# CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE = "True"
-
-# special case begin
-# Remove this because it's handled manually
-#qt_internal_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_internal_extend_target(Core CONDITION LINUX AND QT_BUILD_SHARED_LIBS
SOURCES
global/minimum-linux_p.h
@@ -680,13 +654,6 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_journald
PkgConfig::Libsystemd
)
-# Disable LTO, as the symbols disappear somehow under GCC
-# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200)
-if(GCC)
- set_source_files_properties(${core_version_tagging_files}
- PROPERTIES COMPILE_OPTIONS "-fno-lto")
-endif()
-
qt_internal_extend_target(Core CONDITION UNIX
SOURCES
io/qfilesystemengine_unix.cpp
@@ -694,11 +661,21 @@ qt_internal_extend_target(Core CONDITION UNIX
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
)
+if(APPLE)
+ set_source_files_properties(io/qfilesystemengine_unix.cpp PROPERTIES LANGUAGE OBJCXX)
+ qt_internal_extend_target(Core CONDITION
+ PUBLIC_LIBRARIES ${FWUniformTypeIdentifiers}
+ )
+endif()
+
+qt_internal_extend_target(Core CONDITION UNIX AND NOT WASM
+ SOURCES
+ kernel/qeventdispatcher_unix.cpp kernel/qeventdispatcher_unix_p.h
+)
qt_internal_extend_target(Core CONDITION QT_FEATURE_thread
SOURCES
@@ -718,6 +695,7 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_thread AND UNIX
qt_internal_extend_target(Core CONDITION APPLE AND QT_FEATURE_thread
SOURCES
+ thread/qfutex_mac_p.h
thread/qmutex_mac.cpp
)
@@ -726,6 +704,16 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_thread AND UNIX AND NOT APPL
thread/qmutex_unix.cpp
)
+qt_internal_extend_target(Core CONDITION QT_FEATURE_thread AND FREEBSD
+ SOURCES
+ thread/qfutex_freebsd_p.h
+)
+
+qt_internal_extend_target(Core CONDITION QT_FEATURE_thread AND LINUX
+ SOURCES
+ thread/qfutex_linux_p.h
+)
+
qt_internal_extend_target(Core CONDITION QT_FEATURE_future
SOURCES
thread/qexception.cpp thread/qexception.h
@@ -809,12 +797,12 @@ qt_internal_extend_target(Core CONDITION UNIX AND NOT HAIKU AND NOT INTEGRITY AN
m
)
-qt_internal_extend_target(Core CONDITION APPLE AND NOT NACL
+qt_internal_extend_target(Core CONDITION APPLE
SOURCES
text/qlocale_mac.mm
)
-qt_internal_extend_target(Core CONDITION UNIX AND (NACL OR NOT APPLE)
+qt_internal_extend_target(Core CONDITION UNIX AND NOT APPLE AND NOT WASM
SOURCES
text/qlocale_unix.cpp
)
@@ -824,8 +812,13 @@ qt_internal_extend_target(Core CONDITION WIN32
text/qlocale_win.cpp
)
+qt_internal_extend_target(Core CONDITION WASM
+ SOURCES
+ text/qlocale_wasm.cpp
+)
+
# On MS-Win, clang has two flavors, one of which immitates MSVC (so claims to be it)
-qt_internal_extend_target(Core CONDITION WIN32 AND MSVC AND NOT CLANG
+qt_internal_extend_target(Core CONDITION MSVC
LIBRARIES
runtimeobject
)
@@ -860,7 +853,7 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_regularexpression
WrapPCRE2::WrapPCRE2
)
-qt_internal_extend_target(Core CONDITION QT_FEATURE_openssl_linked AND QT_FEATURE_opensslv30
+qt_internal_extend_target(Core CONDITION QT_FEATURE_openssl_hash
LIBRARIES
WrapOpenSSL::WrapOpenSSL
)
@@ -888,34 +881,46 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_timezone
time/qtimezoneprivate_data_p.h
)
-qt_internal_extend_target(Core CONDITION APPLE AND QT_FEATURE_timezone AND NOT NACL
+qt_internal_extend_target(Core CONDITION APPLE AND QT_FEATURE_timezone
SOURCES
time/qtimezoneprivate_mac.mm
)
-qt_internal_extend_target(Core CONDITION QT_FEATURE_timezone AND ANDROID AND (NACL OR NOT APPLE)
+qt_internal_extend_target(Core CONDITION QT_FEATURE_timezone AND ANDROID AND NOT APPLE
SOURCES
time/qtimezoneprivate_android.cpp
)
-qt_internal_extend_target(Core CONDITION QT_FEATURE_timezone AND UNIX AND NOT ANDROID AND (NACL OR NOT APPLE)
+qt_internal_extend_target(Core CONDITION QT_FEATURE_timezone AND UNIX AND NOT ANDROID AND NOT APPLE
SOURCES
time/qtimezoneprivate_tz.cpp
)
-qt_internal_extend_target(Core CONDITION QT_FEATURE_icu AND QT_FEATURE_timezone AND UNIX AND NOT ANDROID AND (NACL OR NOT APPLE)
+qt_internal_extend_target(Core
+ CONDITION
+ QT_FEATURE_icu AND QT_FEATURE_timezone AND NOT UNIX
SOURCES
time/qtimezoneprivate_icu.cpp
)
-qt_internal_extend_target(Core CONDITION QT_FEATURE_icu AND QT_FEATURE_timezone AND WIN32 AND NOT ANDROID AND (NACL OR NOT APPLE)
+# Even MS says we should prefer ICU over its APIs for TZ data:
+qt_internal_extend_target(Core
+ CONDITION
+ QT_FEATURE_timezone AND WIN32 AND NOT QT_FEATURE_icu
SOURCES
- time/qtimezoneprivate_icu.cpp
+ time/qtimezoneprivate_win.cpp
)
-qt_internal_extend_target(Core CONDITION QT_FEATURE_timezone AND WIN32 AND NOT QT_FEATURE_icu AND NOT ANDROID AND (NACL OR NOT APPLE)
+qt_internal_extend_target(Core
+ CONDITION QT_FEATURE_timezone_locale
SOURCES
- time/qtimezoneprivate_win.cpp
+ time/qtimezonelocale.cpp time/qtimezonelocale_p.h
+)
+
+qt_internal_extend_target(Core
+ CONDITION QT_FEATURE_timezone_locale AND NOT QT_FEATURE_icu
+ SOURCES
+ time/qtimezonelocale_data_p.h
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_datetimeparser
@@ -979,7 +984,7 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_settings AND WIN32
io/qsettings_win.cpp
)
-qt_internal_extend_target(Core CONDITION APPLE AND QT_FEATURE_settings AND NOT NACL
+qt_internal_extend_target(Core CONDITION APPLE AND QT_FEATURE_settings
SOURCES
io/qsettings_mac.cpp
)
@@ -997,7 +1002,7 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_filesystemiterator AND WIN32
qt_internal_extend_target(Core CONDITION QT_FEATURE_process AND UNIX
SOURCES
../3rdparty/forkfd/forkfd.h
- io/forkfd_qt.cpp
+ io/forkfd_qt.c
INCLUDE_DIRECTORIES
../3rdparty/forkfd
)
@@ -1012,24 +1017,26 @@ qt_internal_extend_target(Core CONDITION APPLE AND NOT MACOS
${FWMobileCoreServices}
)
-qt_internal_extend_target(Core CONDITION UNIX AND NOT APPLE
- SOURCES
- kernel/qelapsedtimer_unix.cpp
-)
-
qt_internal_extend_target(Core CONDITION ANDROID
SOURCES
io/qstandardpaths_android.cpp
- io/qstorageinfo_unix.cpp
- kernel/qjnitypes.h
+ io/qstorageinfo_linux.cpp io/qstorageinfo_linux_p.h
+ kernel/qjniarray.h
+ kernel/qjnitypes.h kernel/qjnitypes_impl.h
kernel/qjnienvironment.cpp kernel/qjnienvironment.h
kernel/qjniobject.cpp kernel/qjniobject.h
kernel/qjnihelpers.cpp kernel/qjnihelpers_p.h
platform/android/qandroidextras_p.h platform/android/qandroidextras.cpp
platform/android/qandroidnativeinterface.cpp
+ NO_UNITY_BUILD_SOURCES
+ platform/android/qandroidextras.cpp
+ # qtNativeClassName conflicts with similar symbols in android headers
+ # TODO: Resolve conflicts between various variables set as,
+ # `org/qtproject/qt/android/QtNative` QtAndroidPrivate might be a good
+ # place to put them.
)
-qt_internal_extend_target(Core CONDITION WIN32
+qt_internal_extend_target(Core CONDITION QT_FEATURE_cpp_winrt
SOURCES
platform/windows/qfactorycacheregistration_p.h
platform/windows/qfactorycacheregistration.cpp
@@ -1044,12 +1051,19 @@ qt_internal_extend_target(Core CONDITION HAIKU AND NOT ANDROID
be
)
-qt_internal_extend_target(Core CONDITION UNIX AND NOT APPLE AND NOT HAIKU AND NOT ANDROID
+qt_internal_extend_target(Core
+ CONDITION UNIX AND NOT LINUX AND NOT APPLE AND NOT HAIKU AND NOT ANDROID AND NOT VXWORKS
SOURCES
io/qstandardpaths_unix.cpp
io/qstorageinfo_unix.cpp
)
+qt_internal_extend_target(Core CONDITION LINUX AND NOT ANDROID AND NOT VXWORKS
+ SOURCES
+ io/qstandardpaths_unix.cpp
+ io/qstorageinfo_linux.cpp
+)
+
qt_internal_extend_target(Core CONDITION QT_FEATURE_itemmodel
SOURCES
itemmodels/qabstractitemmodel.cpp itemmodels/qabstractitemmodel.h itemmodels/qabstractitemmodel_p.h
@@ -1111,7 +1125,7 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_dlopen
${CMAKE_DL_LIBS}
)
-qt_internal_extend_target(Core CONDITION APPLE AND (IOS OR TVOS)
+qt_internal_extend_target(Core CONDITION APPLE AND UIKIT
LIBRARIES
${FWUIKit}
)
@@ -1133,14 +1147,16 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_glib AND UNIX
GLIB2::GLIB2
)
-qt_internal_extend_target(Core CONDITION QT_FEATURE_clock_gettime AND UNIX
+qt_internal_extend_target(Core CONDITION QT_FEATURE_clock_gettime
LIBRARIES
WrapRt::WrapRt
)
-qt_internal_extend_target(Core CONDITION QT_FEATURE_posix_shm
+qt_internal_extend_target(Core CONDITION QT_FEATURE_posix_shm AND UNIX
SOURCES
ipc/qsharedmemory_posix.cpp
+ LIBRARIES
+ WrapRt::WrapRt
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_sysv_shm
SOURCES
@@ -1149,6 +1165,8 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_sysv_shm
qt_internal_extend_target(Core CONDITION QT_FEATURE_posix_sem
SOURCES
ipc/qsystemsemaphore_posix.cpp
+ LIBRARIES
+ WrapRt::WrapRt
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_sysv_sem
SOURCES
@@ -1157,17 +1175,22 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_sysv_sem
qt_internal_extend_target(Core CONDITION VXWORKS
SOURCES
- kernel/qfunctions_vxworks.cpp kernel/qfunctions_vxworks.h
+ io/qstandardpaths_unix.cpp
+ io/qstorageinfo_stub.cpp
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_cborstreamreader
SOURCES
serialization/qcborstreamreader.cpp serialization/qcborstreamreader.h
+ NO_UNITY_BUILD_SOURCES
+ serialization/qcborstreamreader.cpp # some problem with cbor_value_get_type etc
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_cborstreamwriter
SOURCES
serialization/qcborstreamwriter.cpp serialization/qcborstreamwriter.h
+ NO_UNITY_BUILD_SOURCES
+ serialization/qcborstreamwriter.cpp # CBOR macro clashes
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_mimetype
@@ -1336,18 +1359,18 @@ qt_internal_extend_target(Core CONDITION WASM
kernel/qeventdispatcher_wasm.cpp kernel/qeventdispatcher_wasm_p.h
)
-qt_internal_extend_target(Core CONDITION QT_FEATURE_ctf AND QT_FEATURE_library
+qt_internal_extend_target(Core CONDITION QT_FEATURE_ctf
SOURCES
tracing/qctf_p.h tracing/qctf.cpp
PLUGIN_TYPES
tracing
)
+# These files are included by qmutex.cpp
set_source_files_properties(
thread/qmutex_mac.cpp
thread/qmutex_unix.cpp
- PROPERTIES HEADER_FILE_ONLY ON) # special case: These files are included by qmutex.cpp!
-
+ PROPERTIES HEADER_FILE_ONLY ON)
# Remove QT_NO_CAST_TO_ASCII to ensure that the symbols are included in the library.
if(WIN32)
@@ -1360,7 +1383,7 @@ qt_internal_apply_gc_binaries_conditional(Core PUBLIC)
# Add entry-point on platforms that need it. A project can opt-out of using the
# entrypoint by setting the qt_no_entrypoint property to TRUE on a target.
-if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
+if(WIN32 OR UIKIT)
# find_package(Qt6Core) should call find_package(Qt6EntryPointPrivate) so that we can
# link against EntryPointPrivate. Normally this is handled automatically for deps, but
# for some reason it doesn't work for the EntryPointPrivate, so we need to add it manually.
@@ -1388,9 +1411,16 @@ if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET)
set_property(TARGET Core APPEND PROPERTY
EXPORT_PROPERTIES "QT_DARWIN_MIN_DEPLOYMENT_TARGET")
endif()
-# special case end
-qt_internal_create_tracepoints(Core qtcore.tracepoints)
+qt_internal_generate_tracepoints(Core core
+ SOURCES
+ kernel/qcoreapplication.cpp
+ kernel/qcoreevent.cpp
+ kernel/qobject.cpp
+ plugin/qfactoryloader.cpp
+ plugin/qlibrary.cpp
+ global/qlogging.cpp
+)
qt_internal_add_docs(Core
doc/qtcore.qdocconf
)
@@ -1423,3 +1453,71 @@ if(APPLE AND QT_FEATURE_framework AND QT_FEATURE_separate_debug_info)
DESTINATION "${dsym_script_install_dir}"
)
endif()
+
+if(IOS)
+ qt_internal_set_apple_privacy_manifest(Core
+ "${CMAKE_CURRENT_SOURCE_DIR}/platform/ios/PrivacyInfo.xcprivacy")
+endif()
+
+set(linker_script_contents "")
+if (QT_NAMESPACE STREQUAL "")
+ set(tag_symbol "qt_version_tag")
+else()
+ set(tag_symbol "qt_version_tag_${QT_NAMESPACE}")
+endif()
+foreach(minor_version RANGE ${PROJECT_VERSION_MINOR})
+ set(previous "${current}")
+ set(current "Qt_${PROJECT_VERSION_MAJOR}.${minor_version}")
+ if (minor_version EQUAL ${PROJECT_VERSION_MINOR})
+ string(APPEND linker_script_contents "${current} { ${tag_symbol}; } ${previous};\n")
+ else()
+ string(APPEND linker_script_contents "${current} {} ${previous};\n")
+ endif()
+endforeach()
+qt_internal_extend_target(Core
+ EXTRA_LINKER_SCRIPT_CONTENT "${linker_script_contents}"
+
+ # Workaround for QTBUG-117514:
+ # Function called by inline methods taking a pointer to a private class as a parameter
+ EXTRA_LINKER_SCRIPT_EXPORTS
+ # QFutureInterfaceBase::setContinuation(std::function<void (QFutureInterfaceBase const&)>, QFutureInterfaceBasePrivate*)
+ "_ZN*20QFutureInterfaceBase15setContinuationE*27QFutureInterfaceBasePrivate*"
+ # QReadWriteLock::destroyRecursive(QReadWriteLockPrivate*)
+ "_ZN*14QReadWriteLock16destroyRecursiveEP*21QReadWriteLockPrivate*"
+)
+
+function(qt_internal_library_deprecation_level)
+ # QT_DISABLE_DEPRECATED_UP_TO controls which version we use as a cut-off
+ # compiling in to the library. E.g. if it is set to QT_VERSION then no
+ # code which was deprecated before QT_VERSION will be compiled in.
+ if(NOT DEFINED QT_DISABLE_DEPRECATED_UP_TO)
+ if(WIN32)
+ # On Windows, due to the way DLLs work, we need to export all functions,
+ # including the inlines
+ set(QT_DISABLE_DEPRECATED_UP_TO "0x040800")
+ else()
+ # On other platforms, Qt's own compilation does need to compile the Qt 5.0 API
+ set(QT_DISABLE_DEPRECATED_UP_TO "0x050000")
+ endif()
+ elseif(NOT QT_DISABLE_DEPRECATED_UP_TO MATCHES "^0x[0-9][0-9][0-9][0-9][0-9][0-9]$")
+ message(FATAL_ERROR "Ivalid format of the QT_DISABLE_DEPRECATED_UP_TO macro:"
+ " ${QT_DISABLE_DEPRECATED_UP_TO}. The expected format is the hexadecimal number,"
+ " e.g. 0x060102")
+ endif()
+ # QT_WARN_DEPRECATED_UP_TO controls the upper-bound of deprecation
+ # warnings that are emitted. E.g. if it is set to 0x060500 then all use of
+ # things deprecated in or before 6.5.0 will be warned against.
+ set(QT_WARN_DEPRECATED_UP_TO 0x070000)
+
+ set(output_header "${CMAKE_CURRENT_BINARY_DIR}/global/qtdeprecationdefinitions.h")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/global/qtdeprecationdefinitions.h.in"
+ "${output_header}"
+ @ONLY
+ NEWLINE_STYLE UNIX
+ )
+
+ target_sources(Core PRIVATE "${output_header}")
+ set_source_files_properties("${output_header}" PROPERTIES GENERATED TRUE)
+endfunction()
+qt_internal_library_deprecation_level()