summaryrefslogtreecommitdiffstats
path: root/configure.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-04-17 17:12:40 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-04-23 10:09:15 +0200
commit4545eadd3e28be4b04537cc71a8697da4421d918 (patch)
tree7784381372b51e27da11f25ee34ccfb34e297096 /configure.cmake
parent1c7950081f926475bbdaa18379c2f51f99fcb3bb (diff)
CMake: Port the 'static_runtime' feature
This feature is Windows-only and must be turned on manually. For MSVC it sets the MSVC_RUNTIME_LIBRARY target property. For MinGW it adds the -static linker flag. Change-Id: I9da3b88d545b34bc34a3a80301b2dd1b5986fa88 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'configure.cmake')
-rw-r--r--configure.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake
index ddb28060b6..d262882bb5 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -794,6 +794,14 @@ qt_feature("ccache"
CONDITION QT_USE_CCACHE
)
qt_feature_config("ccache" QMAKE_PRIVATE_CONFIG)
+qt_feature("static_runtime"
+ LABEL "Statically link the C/C++ runtime library"
+ AUTODETECT OFF
+ CONDITION NOT QT_FEATURE_shared
+ EMIT_IF WIN32
+)
+qt_feature_config("static_runtime" QMAKE_PUBLIC_CONFIG)
+qt_feature_config("static_runtime" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("dlopen" PRIVATE
LABEL "dlopen()"
CONDITION UNIX