summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/CMakeLists.txt13
-rw-r--r--src/corelib/global/qtconfigmacros.h5
-rw-r--r--src/corelib/global/qtversionchecks.h5
3 files changed, 17 insertions, 6 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
index cd698a57ef..1b41c659dc 100644
--- a/src/corelib/CMakeLists.txt
+++ b/src/corelib/CMakeLists.txt
@@ -377,10 +377,15 @@ endif()
# additional json files.
qt6_extract_metatypes(Core ${core_metatype_args})
-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")
+target_sources(Core PRIVATE
+ "${CMAKE_CURRENT_BINARY_DIR}/global/qconfig.h"
+ "${CMAKE_CURRENT_BINARY_DIR}/global/qconfig_p.h"
+)
+set_source_files_properties(
+ "${CMAKE_CURRENT_BINARY_DIR}/global/qconfig.h"
+ "${CMAKE_CURRENT_BINARY_DIR}/global/qconfig_p.h"
+ PROPERTIES GENERATED TRUE
+)
# Find ELF interpreter and define a macro for that:
if ((LINUX OR HURD) AND NOT CMAKE_CROSSCOMPILING AND BUILD_SHARED_LIBS)
diff --git a/src/corelib/global/qtconfigmacros.h b/src/corelib/global/qtconfigmacros.h
index 0ff6e2955a..51f6e651bc 100644
--- a/src/corelib/global/qtconfigmacros.h
+++ b/src/corelib/global/qtconfigmacros.h
@@ -5,7 +5,10 @@
#define QTCONFIGMACROS_H
#ifdef QT_BOOTSTRAPPED
-#include <QtCore/qconfig-bootstrapped.h>
+// qconfig-bootstrapped.h is not supposed to be a part of the synced header files. So we find it by
+// the include path specified for Bootstrap library in the source tree instead of the build tree as
+// it's done for regular header files.
+#include "qconfig-bootstrapped.h"
#else
#include <QtCore/qconfig.h>
#include <QtCore/qtcore-config.h>
diff --git a/src/corelib/global/qtversionchecks.h b/src/corelib/global/qtversionchecks.h
index d6fad1ed6c..8f3bd8b371 100644
--- a/src/corelib/global/qtversionchecks.h
+++ b/src/corelib/global/qtversionchecks.h
@@ -10,7 +10,10 @@
#endif
#ifdef QT_BOOTSTRAPPED
-#include <QtCore/qconfig-bootstrapped.h>
+// qconfig-bootstrapped.h is not supposed to be a part of the synced header files. So we find it by
+// the include path specified for Bootstrap library in the source tree instead of the build tree as
+// it's done for regular header files.
+#include "qconfig-bootstrapped.h"
#else
#include <QtCore/qconfig.h>
#include <QtCore/qtcore-config.h>