diff --git a/examples/network/bearermonitor/bearermonitor.pro b/examples/network/bearermonitor/bearermonitor.pro index 7d90b408e0..16ac41298a 100644 --- a/examples/network/bearermonitor/bearermonitor.pro +++ b/examples/network/bearermonitor/bearermonitor.pro @@ -13,7 +13,7 @@ FORMS = bearermonitor_240_320.ui \ bearermonitor_640_480.ui \ sessionwidget.ui -win32:LIBS += -lws2_32 +win32: QMAKE_USE += ws2_32 CONFIG += console diff --git a/src/corelib/configure.json b/src/corelib/configure.json index a6091d4825..d24867ffa0 100644 --- a/src/corelib/configure.json +++ b/src/corelib/configure.json @@ -235,6 +235,66 @@ "sources": [ "-lslog2" ] + }, + "advapi32": { + "label": "advapi32", + "sources": [ + "-ladvapi32" + ] + }, + "gdi32": { + "label": "gdi32", + "sources": [ + "-lgdi32" + ] + }, + "kernel32": { + "label": "kernel32", + "sources": [ + "-lkernel32" + ] + }, + "netapi32": { + "label": "netapi32", + "sources": [ + "-lnetapi32" + ] + }, + "ole32": { + "label": "ole32", + "sources": [ + "-lole32" + ] + }, + "shell32": { + "label": "shell32", + "sources": [ + "-lshell32" + ] + }, + "uuid": { + "label": "uuid", + "sources": [ + "-luuid" + ] + }, + "user32": { + "label": "user32", + "sources": [ + "-luser32" + ] + }, + "winmm": { + "label": "winmm", + "sources": [ + "-lwinmm" + ] + }, + "ws2_32": { + "label": "ws2_32", + "sources": [ + "-lws2_32" + ] } }, @@ -1017,6 +1077,10 @@ If enabled, a binary dump of the Public Suffix List (http://www.publicsuffix.org Mozilla License) is included. The data is then also used in QNetworkCookieJar::validateCookie.", "section": "Utilities", "output": [ "publicFeature" ] + }, + "win32_system_libs": { + "label": "Windows System Libraries", + "condition": "config.win32 && libs.advapi32 && libs.gdi32 && libs.kernel32 && libs.netapi32 && libs.ole32 && libs.shell32 && libs.uuid && libs.user32 && libs.winmm && libs.ws2_32" } }, diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index dc43e56836..6babbac8f5 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -47,10 +47,8 @@ include(mimetypes/mimetypes.pri) include(platform/platform.pri) win32 { - LIBS_PRIVATE += -lws2_32 - !winrt { - LIBS_PRIVATE += -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lwinmm - } + QMAKE_USE_PRIVATE += ws2_32 + !winrt: QMAKE_USE_PRIVATE += advapi32 kernel32 ole32 shell32 uuid user32 winmm } darwin { diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri index 9b6044752f..13b43ad8f7 100644 --- a/src/corelib/io/io.pri +++ b/src/corelib/io/io.pri @@ -158,7 +158,8 @@ win32 { io/qwindowspipereader.cpp \ io/qwindowspipewriter.cpp - LIBS += -lmpr -lnetapi32 -luserenv + LIBS += -lmpr -luserenv + QMAKE_USE_PRIVATE += netapi32 } else { SOURCES += \ io/qstandardpaths_winrt.cpp \ diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro index 920a04315d..2cfd7e086c 100644 --- a/src/dbus/dbus.pro +++ b/src/dbus/dbus.pro @@ -9,11 +9,11 @@ qtConfig(dbus-linked) { } win32 { - LIBS_PRIVATE += \ - -lws2_32 \ - -ladvapi32 \ - -lnetapi32 \ - -luser32 + QMAKE_USE_PRIVATE += \ + advapi32 \ + netapi32 \ + user32 \ + ws2_32 } DEFINES += QT_NO_FOREACH diff --git a/src/network/socket/socket.pri b/src/network/socket/socket.pri index 44ff5b7b39..c3a98ea31a 100644 --- a/src/network/socket/socket.pri +++ b/src/network/socket/socket.pri @@ -58,7 +58,7 @@ unix { msvc: QMAKE_MOC_OPTIONS += -D_WINSOCK_DEPRECATED_NO_WARNINGS win32:!winrt:SOURCES += socket/qnativesocketengine_win.cpp -win32:!winrt:LIBS_PRIVATE += -ladvapi32 +win32:!winrt: QMAKE_USE_PRIVATE += advapi32 winrt { SOURCES += socket/qnativesocketengine_winrt.cpp diff --git a/src/platformsupport/fontdatabases/windows/windows.pri b/src/platformsupport/fontdatabases/windows/windows.pri index 9c529f55ea..7ddfb2c281 100644 --- a/src/platformsupport/fontdatabases/windows/windows.pri +++ b/src/platformsupport/fontdatabases/windows/windows.pri @@ -30,5 +30,5 @@ qtConfig(directwrite):qtConfig(direct2d) { DEFINES *= QT_NO_DIRECTWRITE } -LIBS += -lole32 -lgdi32 -luser32 -ladvapi32 -mingw: LIBS += -luuid +QMAKE_USE_PRIVATE += advapi32 ole32 user32 gdi32 +mingw: QMAKE_USE_PRIVATE += uuid diff --git a/src/platformsupport/fontdatabases/winrt/winrt.pri b/src/platformsupport/fontdatabases/winrt/winrt.pri index 7617df2e7a..1cd417c1fd 100644 --- a/src/platformsupport/fontdatabases/winrt/winrt.pri +++ b/src/platformsupport/fontdatabases/winrt/winrt.pri @@ -8,6 +8,4 @@ HEADERS += \ DEFINES += __WRL_NO_DEFAULT_LIB__ -LIBS += -lws2_32 - -QMAKE_USE_PRIVATE += dwrite_1 +QMAKE_USE_PRIVATE += dwrite_1 ws2_32 diff --git a/src/plugins/bearer/nla/nla.pro b/src/plugins/bearer/nla/nla.pro index 113d0667d2..76f3279d25 100644 --- a/src/plugins/bearer/nla/nla.pro +++ b/src/plugins/bearer/nla/nla.pro @@ -2,7 +2,7 @@ TARGET = qnlabearer QT = core core-private network network-private -LIBS += -lws2_32 +QMAKE_USE_PRIVATE += ws2_32 HEADERS += qnlaengine.h \ ../platformdefs_win.h \ diff --git a/src/plugins/platforms/direct2d/direct2d.pro b/src/plugins/platforms/direct2d/direct2d.pro index 9764272632..6e73bd14f9 100644 --- a/src/plugins/platforms/direct2d/direct2d.pro +++ b/src/plugins/platforms/direct2d/direct2d.pro @@ -8,8 +8,8 @@ QT += \ qtConfig(accessibility): QT += accessibility_support-private qtConfig(vulkan): QT += vulkan_support-private -LIBS += -ldwmapi -lversion -lgdi32 -QMAKE_USE_PRIVATE += dwrite_1 d2d1_1 d3d11_1 dxgi1_2 +LIBS += -ldwmapi -lversion +QMAKE_USE_PRIVATE += gdi32 dwrite_1 d2d1_1 d3d11_1 dxgi1_2 include(../windows/windows.pri) diff --git a/src/plugins/platforms/windows/uiautomation/uiautomation.pri b/src/plugins/platforms/windows/uiautomation/uiautomation.pri index e3071766d9..b79e42cdec 100644 --- a/src/plugins/platforms/windows/uiautomation/uiautomation.pri +++ b/src/plugins/platforms/windows/uiautomation/uiautomation.pri @@ -39,5 +39,4 @@ HEADERS += \ $$PWD/qwindowsuiagriditemprovider.h \ $$PWD/qwindowsuiautils.h -mingw: LIBS *= -luuid - +mingw: QMAKE_USE *= uuid diff --git a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms/windows/windows.pri index 7004d7e854..95ba961df1 100644 --- a/src/plugins/platforms/windows/windows.pri +++ b/src/plugins/platforms/windows/windows.pri @@ -1,15 +1,21 @@ # Note: OpenGL32 must precede Gdi32 as it overwrites some functions. -LIBS += -lole32 -luser32 -lwinspool -limm32 -lwinmm -loleaut32 +LIBS += -lwinspool -limm32 -loleaut32 QT_FOR_CONFIG += gui qtConfig(opengl):!qtConfig(opengles2):!qtConfig(dynamicgl): LIBS *= -lopengl32 -mingw: LIBS *= -luuid +mingw: QMAKE_USE *= uuid # For the dialog helpers: -LIBS += -lshlwapi -lshell32 -ladvapi32 -lwtsapi32 +LIBS += -lshlwapi -lwtsapi32 -QMAKE_USE_PRIVATE += d3d9/nolink +QMAKE_USE_PRIVATE += \ + advapi32 \ + d3d9/nolink \ + ole32 \ + shell32 \ + user32 \ + winmm DEFINES *= QT_NO_CAST_FROM_ASCII QT_NO_FOREACH diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro index 174bc7b609..50a3bb41a9 100644 --- a/src/plugins/platforms/windows/windows.pro +++ b/src/plugins/platforms/windows/windows.pro @@ -8,7 +8,8 @@ QT += \ qtConfig(accessibility): QT += accessibility_support-private qtConfig(vulkan): QT += vulkan_support-private -LIBS += -lgdi32 -ldwmapi +LIBS += -ldwmapi +QMAKE_USE_PRIVATE += gdi32 include(windows.pri) diff --git a/src/plugins/platforms/winrt/winrt.pro b/src/plugins/platforms/winrt/winrt.pro index 43132a1a76..43dc8f074c 100644 --- a/src/plugins/platforms/winrt/winrt.pro +++ b/src/plugins/platforms/winrt/winrt.pro @@ -8,8 +8,7 @@ QT += \ DEFINES *= QT_NO_CAST_FROM_ASCII __WRL_NO_DEFAULT_LIB__ -LIBS += -lws2_32 -QMAKE_USE_PRIVATE += d3d11 +QMAKE_USE_PRIVATE += d3d11 ws2_32 SOURCES = \ main.cpp \ diff --git a/src/plugins/printsupport/windows/windows.pro b/src/plugins/printsupport/windows/windows.pro index 06694fb7fe..6ca601b2a4 100644 --- a/src/plugins/printsupport/windows/windows.pro +++ b/src/plugins/printsupport/windows/windows.pro @@ -18,7 +18,8 @@ HEADERS += \ OTHER_FILES += windows.json -LIBS += -lwinspool -lcomdlg32 -lgdi32 -luser32 +LIBS += -lwinspool -lcomdlg32 +QMAKE_USE_PRIVATE += user32 gdi32 PLUGIN_TYPE = printsupport PLUGIN_CLASS_NAME = QWindowsPrinterSupportPlugin diff --git a/src/plugins/styles/windowsvista/windowsvista.pro b/src/plugins/styles/windowsvista/windowsvista.pro index f82bcfc91b..c08db7f533 100644 --- a/src/plugins/styles/windowsvista/windowsvista.pro +++ b/src/plugins/styles/windowsvista/windowsvista.pro @@ -10,7 +10,7 @@ SOURCES += qwindowsvistastyle.cpp HEADERS += qwindowsxpstyle_p.h qwindowsxpstyle_p_p.h SOURCES += qwindowsxpstyle.cpp -LIBS_PRIVATE += -lgdi32 -luser32 +QMAKE_USE_PRIVATE += user32 gdi32 # DEFINES/LIBS needed for qwizard_win.cpp and the styles include(../../../widgets/kernel/win.pri) diff --git a/src/printsupport/kernel/kernel.pri b/src/printsupport/kernel/kernel.pri index ea7b4b9780..2ceaf152eb 100644 --- a/src/printsupport/kernel/kernel.pri +++ b/src/printsupport/kernel/kernel.pri @@ -33,7 +33,10 @@ win32 { $$PWD/qprintengine_win_p.h SOURCES += \ $$PWD/qprintengine_win.cpp - !winrt: LIBS_PRIVATE += -lwinspool -lcomdlg32 -lgdi32 -luser32 + !winrt { + LIBS_PRIVATE += -lwinspool -lcomdlg32 + QMAKE_USE_PRIVATE += user32 gdi32 + } } unix:!darwin:qtConfig(cups) { diff --git a/src/widgets/kernel/win.pri b/src/widgets/kernel/win.pri index f6877b02db..3b3170beb1 100644 --- a/src/widgets/kernel/win.pri +++ b/src/widgets/kernel/win.pri @@ -2,4 +2,7 @@ # -------------------------------------------------------------------- INCLUDEPATH += ../3rdparty/wintab -!winrt: LIBS_PRIVATE *= -lshell32 -luxtheme -ldwmapi +!winrt { + LIBS_PRIVATE *= -luxtheme -ldwmapi + QMAKE_USE_PRIVATE += shell32 +} diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro index 9cb6ab0c59..1f54c846ec 100644 --- a/src/winmain/winmain.pro +++ b/src/winmain/winmain.pro @@ -23,7 +23,7 @@ winrt { } else { CONFIG -= qt SOURCES = qtmain_win.cpp - LIBS += -lshell32 + QMAKE_USE_PRIVATE += shell32 } load(qt_installs) diff --git a/tests/auto/corelib/io/qfile/test.pro b/tests/auto/corelib/io/qfile/test.pro index 95389ab3e2..7a2767bf3c 100644 --- a/tests/auto/corelib/io/qfile/test.pro +++ b/tests/auto/corelib/io/qfile/test.pro @@ -23,4 +23,4 @@ TESTDATA += \ Makefile forCopying.txt forRenaming.txt \ resources/file1.ext1 -win32:!winrt: LIBS += -lole32 -luuid +win32:!winrt: QMAKE_USE += ole32 uuid diff --git a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro index 496729f9f1..d181d16a3e 100644 --- a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro +++ b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro @@ -5,4 +5,4 @@ SOURCES = tst_qfileinfo.cpp RESOURCES += qfileinfo.qrc \ testdata.qrc -win32:!winrt: LIBS += -ladvapi32 -lnetapi32 +win32:!winrt: QMAKE_USE += advapi32 netapi32 diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro b/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro index da2660fd02..e33e22b36f 100644 --- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro +++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro @@ -3,4 +3,4 @@ TARGET = tst_qlockfile SOURCES += tst_qlockfile.cpp QT = core-private testlib concurrent -win32:!winrt:LIBS += -ladvapi32 +win32:!winrt: QMAKE_USE += advapi32 diff --git a/tests/auto/corelib/io/qprocess/testProcessEchoGui/testProcessEchoGui.pro b/tests/auto/corelib/io/qprocess/testProcessEchoGui/testProcessEchoGui.pro index 935f43630c..e41ed0a425 100644 --- a/tests/auto/corelib/io/qprocess/testProcessEchoGui/testProcessEchoGui.pro +++ b/tests/auto/corelib/io/qprocess/testProcessEchoGui/testProcessEchoGui.pro @@ -1,6 +1,6 @@ win32 { SOURCES = main_win.cpp - LIBS += -luser32 + QMAKE_USE += user32 } CONFIG -= qt app_bundle diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro index 2cfcb4794e..964c47f6ae 100644 --- a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro +++ b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro @@ -1,6 +1,6 @@ win32 { SOURCES = main_win.cpp - LIBS += -luser32 + QMAKE_USE += user32 } unix { SOURCES = main_unix.cpp diff --git a/tests/auto/corelib/io/qsettings/qsettings.pro b/tests/auto/corelib/io/qsettings/qsettings.pro index 79552b62df..98ea337e7f 100644 --- a/tests/auto/corelib/io/qsettings/qsettings.pro +++ b/tests/auto/corelib/io/qsettings/qsettings.pro @@ -5,7 +5,7 @@ SOURCES = tst_qsettings.cpp RESOURCES += qsettings.qrc INCLUDEPATH += $$PWD/../../kernel/qmetatype -msvc: LIBS += advapi32.lib +msvc: QMAKE_USE += advapi32 darwin: LIBS += -framework CoreFoundation DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro index 295a42aa9c..159761c0c6 100644 --- a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro +++ b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro @@ -3,6 +3,6 @@ TARGET = tst_qeventloop QT = core network testlib core-private SOURCES = $$PWD/tst_qeventloop.cpp -win32:!winrt: LIBS += -luser32 +win32:!winrt: QMAKE_USE += user32 qtConfig(glib): DEFINES += HAVE_GLIB diff --git a/tests/auto/gui/image/qimage/qimage.pro b/tests/auto/gui/image/qimage/qimage.pro index b40866892e..0593cfbc23 100644 --- a/tests/auto/gui/image/qimage/qimage.pro +++ b/tests/auto/gui/image/qimage/qimage.pro @@ -7,7 +7,7 @@ qtConfig(c++11): CONFIG += c++11 android:!android-embedded: RESOURCES += qimage.qrc -win32:!winrt: LIBS += -lgdi32 -luser32 +win32:!winrt: QMAKE_USE += user32 gdi32 darwin: LIBS += -framework CoreGraphics TESTDATA += images/* diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro index e6a020af1a..c9219dad1d 100644 --- a/tests/auto/gui/image/qpixmap/qpixmap.pro +++ b/tests/auto/gui/image/qpixmap/qpixmap.pro @@ -5,7 +5,7 @@ QT += core-private gui-private testlib qtHaveModule(widgets): QT += widgets widgets-private SOURCES += tst_qpixmap.cpp -win32:!winrt:LIBS += -lgdi32 -luser32 +win32:!winrt: QMAKE_USE += user32 gdi32 RESOURCES += qpixmap.qrc TESTDATA += convertFromImage/* convertFromToHICON/* loadFromData/* images/* diff --git a/tests/auto/gui/kernel/noqteventloop/noqteventloop.pro b/tests/auto/gui/kernel/noqteventloop/noqteventloop.pro index 7e98704aea..293a6a8581 100644 --- a/tests/auto/gui/kernel/noqteventloop/noqteventloop.pro +++ b/tests/auto/gui/kernel/noqteventloop/noqteventloop.pro @@ -5,4 +5,4 @@ QT += core-private network gui-private testlib SOURCES += tst_noqteventloop.cpp -qtConfig(dynamicgl):win32:!winrt: LIBS += -luser32 +qtConfig(dynamicgl):win32:!winrt: QMAKE_USE += user32 diff --git a/tests/auto/gui/kernel/qwindow/qwindow.pro b/tests/auto/gui/kernel/qwindow/qwindow.pro index 844b3e8507..e7931ca773 100644 --- a/tests/auto/gui/kernel/qwindow/qwindow.pro +++ b/tests/auto/gui/kernel/qwindow/qwindow.pro @@ -5,4 +5,4 @@ QT += core-private gui-private testlib SOURCES += tst_qwindow.cpp -qtConfig(dynamicgl):win32:!winrt: LIBS += -luser32 +qtConfig(dynamicgl):win32:!winrt: QMAKE_USE += user32 diff --git a/tests/auto/network/kernel/qhostaddress/qhostaddress.pro b/tests/auto/network/kernel/qhostaddress/qhostaddress.pro index b5d6ea6459..d170d879e6 100644 --- a/tests/auto/network/kernel/qhostaddress/qhostaddress.pro +++ b/tests/auto/network/kernel/qhostaddress/qhostaddress.pro @@ -4,4 +4,4 @@ SOURCES += tst_qhostaddress.cpp QT = core network-private testlib -win32:LIBS += -lws2_32 +win32: QMAKE_USE += ws2_32 diff --git a/tests/auto/network/kernel/qhostinfo/qhostinfo.pro b/tests/auto/network/kernel/qhostinfo/qhostinfo.pro index 3d8457dd46..d358cdf52c 100644 --- a/tests/auto/network/kernel/qhostinfo/qhostinfo.pro +++ b/tests/auto/network/kernel/qhostinfo/qhostinfo.pro @@ -6,6 +6,6 @@ SOURCES += tst_qhostinfo.cpp requires(qtConfig(private_tests)) QT = core-private network-private testlib -win32:LIBS += -lws2_32 +win32: QMAKE_USE += ws2_32 winrt: WINRT_MANIFEST.capabilities += internetClientServer diff --git a/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri b/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri index 46c722deba..868439de6a 100644 --- a/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri +++ b/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri @@ -4,7 +4,7 @@ QNETWORK_SRC = $$QT_SOURCE_TREE/src/network INCLUDEPATH += $$QNETWORK_SRC -win32:LIBS += -lws2_32 +win32: QMAKE_USE += ws2_32 unix:qtConfig(reduce_exports) { SOURCES += $$QNETWORK_SRC/socket/qnativesocketengine_unix.cpp diff --git a/tests/auto/network/socket/qtcpserver/test/test.pro b/tests/auto/network/socket/qtcpserver/test/test.pro index de02fb032d..7e2e60a1e3 100644 --- a/tests/auto/network/socket/qtcpserver/test/test.pro +++ b/tests/auto/network/socket/qtcpserver/test/test.pro @@ -1,7 +1,7 @@ CONFIG += testcase SOURCES += ../tst_qtcpserver.cpp -win32:LIBS += -lws2_32 +win32: QMAKE_USE += ws2_32 TARGET = ../tst_qtcpserver diff --git a/tests/auto/network/socket/qtcpsocket/test/test.pro b/tests/auto/network/socket/qtcpsocket/test/test.pro index 05699bbe4e..4c07b1ec66 100644 --- a/tests/auto/network/socket/qtcpsocket/test/test.pro +++ b/tests/auto/network/socket/qtcpsocket/test/test.pro @@ -2,8 +2,8 @@ CONFIG += testcase QT = core-private network-private testlib SOURCES += ../tst_qtcpsocket.cpp -win32:LIBS += -lws2_32 +win32: QMAKE_USE += ws2_32 TARGET = tst_qtcpsocket win32 { diff --git a/tests/auto/other/qaccessibility/qaccessibility.pro b/tests/auto/other/qaccessibility/qaccessibility.pro index 3587c38e76..6f3740a24f 100644 --- a/tests/auto/other/qaccessibility/qaccessibility.pro +++ b/tests/auto/other/qaccessibility/qaccessibility.pro @@ -11,5 +11,6 @@ win32 { !winrt { QT += windowsuiautomation_support-private } - LIBS += -luuid -loleacc -loleaut32 -lole32 + LIBS += -loleacc -loleaut32 + QMAKE_USE += ole32 uuid } diff --git a/tests/auto/tools/qmakelib/qmakelib.pro b/tests/auto/tools/qmakelib/qmakelib.pro index 29f17f6a14..5e9e9fe637 100644 --- a/tests/auto/tools/qmakelib/qmakelib.pro +++ b/tests/auto/tools/qmakelib/qmakelib.pro @@ -1,7 +1,7 @@ CONFIG += testcase TARGET = tst_qmakelib QT = core testlib -win32: LIBS += -ladvapi32 +win32: QMAKE_USE += advapi32 INCLUDEPATH += ../../../../qmake/library VPATH += ../../../../qmake/library diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro b/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro index ae6de48195..16818a98f9 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro @@ -5,4 +5,4 @@ QT += core-private gui-private SOURCES += tst_qgraphicsitem.cpp DEFINES += QT_NO_CAST_TO_ASCII -win32:!winrt: LIBS += -luser32 +win32:!winrt: QMAKE_USE += user32 diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro index 351cecd92e..2f648a2212 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro @@ -4,7 +4,7 @@ QT += widgets widgets-private testlib QT += core-private gui-private SOURCES += tst_qgraphicsscene.cpp RESOURCES += images.qrc -win32:!winrt: LIBS += -luser32 +win32:!winrt: QMAKE_USE += user32 DEFINES += SRCDIR=\\\"$$PWD\\\" DEFINES += QT_NO_CAST_TO_ASCII diff --git a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro index 10cd1dcc54..916694fd0f 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro +++ b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro @@ -3,4 +3,4 @@ TARGET = tst_qitemdelegate QT += widgets widgets-private testlib SOURCES += tst_qitemdelegate.cpp -win32:!winrt: LIBS += -luser32 +win32:!winrt: QMAKE_USE += user32 diff --git a/tests/auto/widgets/itemviews/qlistview/qlistview.pro b/tests/auto/widgets/itemviews/qlistview/qlistview.pro index 75f45ab432..c3e19adc81 100644 --- a/tests/auto/widgets/itemviews/qlistview/qlistview.pro +++ b/tests/auto/widgets/itemviews/qlistview/qlistview.pro @@ -2,4 +2,4 @@ CONFIG += testcase TARGET = tst_qlistview QT += widgets gui-private widgets-private core-private testlib testlib-private SOURCES += tst_qlistview.cpp -win32:!winrt: LIBS += -luser32 +win32:!winrt: QMAKE_USE += user32 diff --git a/tests/auto/widgets/kernel/qwidget/qwidget.pro b/tests/auto/widgets/kernel/qwidget/qwidget.pro index c1908af2a2..d3fbd6d0d9 100644 --- a/tests/auto/widgets/kernel/qwidget/qwidget.pro +++ b/tests/auto/widgets/kernel/qwidget/qwidget.pro @@ -16,4 +16,4 @@ mac { OBJECTIVE_SOURCES += tst_qwidget_mac_helpers.mm } -win32:!winrt: LIBS += -luser32 -lgdi32 +win32:!winrt: QMAKE_USE += user32 gdi32 diff --git a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro index 6523209c32..b61cc8fa13 100644 --- a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro +++ b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro @@ -8,4 +8,4 @@ INCLUDEPATH += ../ HEADERS += SOURCES += tst_qtabwidget.cpp -win32:!winrt: LIBS += -luser32 +win32:!winrt: QMAKE_USE += user32 diff --git a/tests/manual/diaglib/diaglib.pri b/tests/manual/diaglib/diaglib.pri index 9f10167136..b57ee75841 100644 --- a/tests/manual/diaglib/diaglib.pri +++ b/tests/manual/diaglib/diaglib.pri @@ -12,7 +12,7 @@ HEADERS += \ win32:!winrt: { SOURCES += $$PWD/nativewindowdump_win.cpp - LIBS *= -luser32 + QMAKE_USE += user32 } else { SOURCES += $$PWD/nativewindowdump.cpp }