aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2022-05-02 17:49:23 +0200
committerCristian Adam <cristian.adam@qt.io>2022-05-03 09:43:12 +0000
commit15611ee82267324f480282d6ca8bbab90dd20f6c (patch)
tree821c0d43058daaa47769e01d02040ddc173fce69
parent27fddc8dc71b77144a8f53fb4837fb3229f937bd (diff)
CMake: Fix static build with a reduce number of plugins
This changeset allows building Qt Creator statically with a reduced number of plugins, especially without QmlDesigner. Change-Id: I0050c72d3959fe43edae60bd47ecab9c0ee544b3 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--src/plugins/designer/CMakeLists.txt2
-rw-r--r--src/plugins/qmldesigner/CMakeLists.txt2
-rw-r--r--src/shared/designerintegrationv2/CMakeLists.txt7
3 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/designer/CMakeLists.txt b/src/plugins/designer/CMakeLists.txt
index 39f72105f3..32fa078e9f 100644
--- a/src/plugins/designer/CMakeLists.txt
+++ b/src/plugins/designer/CMakeLists.txt
@@ -37,7 +37,7 @@ extend_qtc_plugin(Designer
SOURCES gotoslot_test.cpp
)
-if (QTC_STATIC_BUILD)
+if (QTC_STATIC_BUILD AND TARGET Designer)
get_target_property(_designerType Qt5::Designer TYPE)
if (${_designerType} STREQUAL "STATIC_LIBRARY")
extend_qtc_target(Designer PUBLIC_DEFINES QT_DESIGNER_STATIC)
diff --git a/src/plugins/qmldesigner/CMakeLists.txt b/src/plugins/qmldesigner/CMakeLists.txt
index be6f82eda8..786cb7aa86 100644
--- a/src/plugins/qmldesigner/CMakeLists.txt
+++ b/src/plugins/qmldesigner/CMakeLists.txt
@@ -58,7 +58,7 @@ add_qtc_plugin(QmlDesigner
include(qmldesignercore.cmake)
extend_with_qmldesigner_core(QmlDesigner)
-if (QTC_STATIC_BUILD)
+if (QTC_STATIC_BUILD AND TARGET QmlDesigner)
get_target_property(_designerType Qt5::Designer TYPE)
if (${_designerType} STREQUAL "STATIC_LIBRARY")
extend_qtc_target(QmlDesigner PUBLIC_DEFINES QT_DESIGNER_STATIC)
diff --git a/src/shared/designerintegrationv2/CMakeLists.txt b/src/shared/designerintegrationv2/CMakeLists.txt
index b527260fa4..e600141bce 100644
--- a/src/shared/designerintegrationv2/CMakeLists.txt
+++ b/src/shared/designerintegrationv2/CMakeLists.txt
@@ -12,3 +12,10 @@ add_qtc_library(designerintegrationv2 STATIC
widgethostconstants.h
widgethost.cpp widgethost.h
)
+
+if (QTC_STATIC_BUILD)
+ get_target_property(_designerType Qt5::Designer TYPE)
+ if (${_designerType} STREQUAL "STATIC_LIBRARY")
+ extend_qtc_target(designerintegrationv2 PUBLIC_DEFINES QT_DESIGNER_STATIC)
+ endif()
+endif()