Skip to content

Commit

Permalink
Prevent overly deep build dir hierarchy on Windows
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jobor committed Jun 7, 2021
1 parent f6f7d22 commit d23613a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
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
SOURCES qnetworklistmanagernetworkinformationbackend.cpp
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")

0 comments on commit d23613a

Please sign in to comment.