Skip to content

Commit 7e7f8a5

Browse files
committed
Fix configuring macro for network information plugins
The actual name of these plugins differs from the name of the CMake target.
1 parent 6dd9836 commit 7e7f8a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/modules/QtConfig.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ if (STATIC_LINKAGE OR QT_TARGET_TYPE STREQUAL STATIC_LIBRARY)
280280
endif ()
281281
endif ()
282282

283+
# enable network information support for projects setting NETWORK_INFORMATION_SUPPORT explicitly
283284
if (NETWORK_INFORMATION_SUPPORT)
284285
set(KNOWN_NETWORK_INFORMATION_PLUGINS
285286
${META_NETWORK_INFORMATION_PLUGINS} NetworkManagerNetworkInformation GlibNetworkInformation NLMNI
@@ -297,13 +298,16 @@ if (STATIC_LINKAGE OR QT_TARGET_TYPE STREQUAL STATIC_LIBRARY)
297298
PLUGINS
298299
${PLUGIN}
299300
ONLY_PLUGINS)
301+
if (PLUGIN STREQUAL NLMNI)
302+
set(PLUGIN NetworkListManagerNetworkInformation)
303+
endif ()
300304
list(APPEND USED_NETWORK_INFORMATION_PLUGINS "${PLUGIN}")
301305
endif ()
302306
endforeach ()
303307

304308
# allow importing network information plugins via qtconfig.h
305309
if (USED_NETWORK_INFORMATION_PLUGINS)
306-
list_to_string(" " "\\\n Q_IMPORT_PLUGIN(Q" ")" "${USED_NETWORK_INFORMATION_PLUGINS}"
310+
list_to_string(" " "\\\n Q_IMPORT_PLUGIN(Q" "BackendFactory)" "${USED_NETWORK_INFORMATION_PLUGINS}"
307311
USED_NETWORK_INFORMATION_PLUGINS_ARRAY)
308312
endif ()
309313
endif ()

0 commit comments

Comments
 (0)