From 7e7f8a5740e93762b494a292db075b68e614b1f5 Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 16 Feb 2024 17:40:14 +0100 Subject: [PATCH] Fix configuring macro for network information plugins The actual name of these plugins differs from the name of the CMake target. --- cmake/modules/QtConfig.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/modules/QtConfig.cmake b/cmake/modules/QtConfig.cmake index f7dd114..994ed06 100644 --- a/cmake/modules/QtConfig.cmake +++ b/cmake/modules/QtConfig.cmake @@ -280,6 +280,7 @@ if (STATIC_LINKAGE OR QT_TARGET_TYPE STREQUAL STATIC_LIBRARY) endif () endif () + # enable network information support for projects setting NETWORK_INFORMATION_SUPPORT explicitly if (NETWORK_INFORMATION_SUPPORT) set(KNOWN_NETWORK_INFORMATION_PLUGINS ${META_NETWORK_INFORMATION_PLUGINS} NetworkManagerNetworkInformation GlibNetworkInformation NLMNI @@ -297,13 +298,16 @@ if (STATIC_LINKAGE OR QT_TARGET_TYPE STREQUAL STATIC_LIBRARY) PLUGINS ${PLUGIN} ONLY_PLUGINS) + if (PLUGIN STREQUAL NLMNI) + set(PLUGIN NetworkListManagerNetworkInformation) + endif () list(APPEND USED_NETWORK_INFORMATION_PLUGINS "${PLUGIN}") endif () endforeach () # allow importing network information plugins via qtconfig.h if (USED_NETWORK_INFORMATION_PLUGINS) - list_to_string(" " "\\\n Q_IMPORT_PLUGIN(Q" ")" "${USED_NETWORK_INFORMATION_PLUGINS}" + list_to_string(" " "\\\n Q_IMPORT_PLUGIN(Q" "BackendFactory)" "${USED_NETWORK_INFORMATION_PLUGINS}" USED_NETWORK_INFORMATION_PLUGINS_ARRAY) endif () endif ()