summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-06-04 09:43:32 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-06-07 14:17:46 +0200
commitd23613acf7bfe37c1c78eb9aadc489e888e34dfb (patch)
treea21afb7cd245e37e1b30733fb47b91ba4add8d10
parentf6f7d22c6cb6a6e3b4ab280fc1b2ed534bbbde09 (diff)
Prevent overly deep build dir hierarchy on Windows
On Windows, building Qt with Ninja Multi-Config failed in a reasonably named build dir. The reason for that is our deep build dir hierarchy, created with add_subdirectory, and long target names like QNetworkListManagerNetworkInformationBackend within that hierarchy. Rename said target to QNLMNIBackend, and set AUTOGEN_BUILD_DIR to a short string that does not repeat the target name. Pick-to: 6.1 Fixes: QTBUG-94211 Change-Id: Iea6fee012fa46d9bfb01142b60e6cb5273893c50 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--src/plugins/networkinformationbackends/networklistmanager/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/networkinformationbackends/networklistmanager/CMakeLists.txt b/src/plugins/networkinformationbackends/networklistmanager/CMakeLists.txt
index a932f51270..862ee67fa2 100644
--- a/src/plugins/networkinformationbackends/networklistmanager/CMakeLists.txt
+++ b/src/plugins/networkinformationbackends/networklistmanager/CMakeLists.txt
@@ -1,5 +1,5 @@
-qt_internal_add_plugin(QNetworkListManagerNetworkInformationBackendPlugin
- OUTPUT_NAME networklistmanagernetworkinformationbackend
+qt_internal_add_plugin(QNLMNIPlugin
+ OUTPUT_NAME networklistmanager
CLASS_NAME QNetworkListManagerNetworkInformationBackendFactory
TYPE networkinformationbackends
DEFAULT_IF WINDOWS AND QT_FEATURE_networklistmanager
@@ -7,3 +7,7 @@ qt_internal_add_plugin(QNetworkListManagerNetworkInformationBackendPlugin
PUBLIC_LIBRARIES
Qt::NetworkPrivate
)
+
+# Don't repeat the target name in AUTOGEN_BUILD_DIR to work around issues with overlong paths.
+set_property(TARGET QNLMNIPlugin PROPERTY
+ AUTOGEN_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/autogen")