summaryrefslogtreecommitdiff
path: root/configure.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-03-31 14:12:01 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-04-01 21:19:35 +0200
commit7909de1bebe3bac32286513025fc00220cd29ec1 (patch)
treec72354cc0468e47e81c344c6f1a6452b744c7fc0 /configure.cmake
parentc20f23e03b3208f445202f5b071f0b62de1b7d01 (diff)
downloadqtbase-7909de1bebe3bac32286513025fc00220cd29ec1.tar.gz
CMake: Define QT_STATIC for static builds
QT_STATIC must be defined for static builds to have the right import/export symbol macros defined. Originally, this macro is wrapped in a condition. That's why we extend qt_feature_definition to be able to write a prerequisite to qconfig.h. Change-Id: I610e60acc7f5bdc031eff6d53a76e0b229a5c8c2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'configure.cmake')
-rw-r--r--configure.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake
index a842b8b317..eecfd6ddf4 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -321,6 +321,7 @@ qt_feature("shared" PUBLIC
AUTODETECT NOT UIKIT
CONDITION BUILD_SHARED_LIBS
)
+qt_feature_definition("shared" "QT_STATIC" NEGATE PREREQUISITE "!defined(QT_SHARED) && !defined(QT_STATIC)")
qt_feature_config("shared" QMAKE_PUBLIC_QT_CONFIG)
qt_feature_config("shared" QMAKE_PUBLIC_CONFIG)
qt_feature("use_bfd_linker"