From 4b288e30efda67212b54d7f2e084d0f3acc594ae Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 12 Aug 2016 20:19:33 +0200 Subject: employ QMAKE_USE: LIBS += -lfoo this switches all instances of LIBS[_PRIVATE] += -lfoo where a config tests exists for foo. this removes some code duplication between tests and project files (in case of conditionals), and ensures that the projects always actually use the libraries configure has found. Change-Id: Ia7e80c8db5f329290c7f1a4e03a8bf78882a687e Reviewed-by: Lars Knoll Reviewed-by: Oswald Buddenhagen --- .../platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro | 8 +------- .../eglfs_kms_egldevice/eglfs_kms_egldevice.pro | 8 +------- .../deviceintegration/eglfs_kms_support/eglfs_kms_support.pro | 8 +------- .../platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro | 2 +- src/plugins/platforms/openwfd/openwf.pro | 3 ++- src/plugins/platforms/qnx/qnx.pro | 6 +++--- .../xcb/gl_integrations/gl_integrations_plugin_base.pri | 2 +- src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro | 5 ++--- src/plugins/platforms/xcb/xcb_qpa_lib.pro | 10 +++++----- 9 files changed, 17 insertions(+), 35 deletions(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro index 6670a4c0bc..70ff054172 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro @@ -11,13 +11,7 @@ INCLUDEPATH += $$PWD/../.. $$PWD/../eglfs_kms_support # Avoid X11 header collision, use generic EGL native types DEFINES += QT_EGL_NO_X11 -CONFIG += link_pkgconfig -!contains(QT_CONFIG, no-pkg-config) { - PKGCONFIG += libdrm gbm -} else { - LIBS += -ldrm -lgbm -} - +QMAKE_USE += gbm drm CONFIG += egl QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro index f613d68ecb..5f47b98369 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro @@ -7,13 +7,7 @@ INCLUDEPATH += $$PWD/../.. $$PWD/../eglfs_kms_support # Avoid X11 header collision, use generic EGL native types DEFINES += QT_EGL_NO_X11 -CONFIG += link_pkgconfig -!contains(QT_CONFIG, no-pkg-config) { - PKGCONFIG += libdrm -} else { - LIBS += -ldrm -} - +QMAKE_USE += drm CONFIG += egl QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro index cc77810793..464c64539f 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro @@ -9,13 +9,7 @@ INCLUDEPATH += $$PWD/../.. # Avoid X11 header collision, use generic EGL native types DEFINES += QT_EGL_NO_X11 -CONFIG += link_pkgconfig -!contains(QT_CONFIG, no-pkg-config) { - PKGCONFIG += libdrm -} else { - LIBS += -ldrm -} - +QMAKE_USE += drm CONFIG += egl QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro index 17be384955..10af57e487 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro @@ -8,7 +8,7 @@ DEFINES += QT_EGL_NO_X11 INCLUDEPATH += $$PWD/../.. CONFIG += egl -LIBS += -lX11 -lX11-xcb -lxcb +QMAKE_USE += xcb_xlib QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF SOURCES += $$PWD/qeglfsx11main.cpp \ diff --git a/src/plugins/platforms/openwfd/openwf.pro b/src/plugins/platforms/openwfd/openwf.pro index 152e4f57d7..79f349f472 100644 --- a/src/plugins/platforms/openwfd/openwf.pro +++ b/src/plugins/platforms/openwfd/openwf.pro @@ -31,7 +31,8 @@ SOURCES += \ qopenwfdportmode.cpp \ qopenwfdwindow.cpp -LIBS += -lWFD -lgbm -lGLESv2 -lEGL +LIBS += -lWFD +QMAKE_USE += gbm opengl_es2 egl PLUGIN_TYPE = platforms PLUGIN_CLASS_NAME = QOpenWFDIntegrationPlugin diff --git a/src/plugins/platforms/qnx/qnx.pro b/src/plugins/platforms/qnx/qnx.pro index 5a0f4f5c98..51ffa5624f 100644 --- a/src/plugins/platforms/qnx/qnx.pro +++ b/src/plugins/platforms/qnx/qnx.pro @@ -82,7 +82,7 @@ contains(QT_CONFIG, opengles2) { HEADERS += qqnxglcontext.h \ qqnxeglwindow.h - LIBS += -lEGL + QMAKE_USE += egl } CONFIG(qqnx_pps) { @@ -100,7 +100,7 @@ CONFIG(qqnx_pps) { qqnxnavigatoreventnotifier.h \ qqnxvirtualkeyboardpps.h - LIBS += -lpps + QMAKE_USE += pps !contains(DEFINES, QT_NO_CLIPBOARD): LIBS += -lclipboard CONFIG(qqnx_imf) { @@ -116,7 +116,7 @@ CONFIG(qqnx_pps) { lgmon { DEFINES += QQNX_LGMON SOURCES += qqnxlgmon.cpp - LIBS += -llgmon + QMAKE_USE += lgmon } OTHER_FILES += qnx.json diff --git a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri index 8fd57da29d..b60de79fa0 100644 --- a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri +++ b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri @@ -30,6 +30,6 @@ contains(QT_CONFIG, xcb-qt) { LIBS += -L$$MODULE_BASE_OUTDIR/lib -lxcb-static$$qtPlatformTargetSuffix() QMAKE_USE += xcb } else { - !contains(DEFINES, QT_NO_XKB):LIBS += -lxcb-xkb + !contains(DEFINES, QT_NO_XKB): QMAKE_USE += xcb_xkb QMAKE_USE += xcb_syslibs } diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro index 67fd68765a..adac4b2e22 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro @@ -5,12 +5,11 @@ include(../gl_integrations_plugin_base.pri) #should be removed from the sources DEFINES += XCB_USE_GLX XCB_USE_XLIB -LIBS += -lxcb - contains(QT_CONFIG, xcb-glx) { DEFINES += XCB_HAS_XCB_GLX - LIBS += -lxcb-glx + QMAKE_USE += xcb_glx } +QMAKE_USE += xcb LIBS += $$QMAKE_LIBS_DYNLOAD diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index 1cf13c7795..b81d38fab1 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -42,12 +42,12 @@ DEFINES += QT_BUILD_XCB_PLUGIN # needed by Xcursor ... contains(QT_CONFIG, xcb-xlib) { DEFINES += XCB_USE_XLIB - LIBS += -lX11 -lX11-xcb + QMAKE_USE += xcb_xlib contains(QT_CONFIG, xinput2) { DEFINES += XCB_USE_XINPUT2 SOURCES += qxcbconnection_xi2.cpp - LIBS += -lXi + QMAKE_USE += xinput2 !isEmpty(QMAKE_XINPUT2_VERSION_MAJOR) { DEFINES += LIBXI_MAJOR=$$QMAKE_XINPUT2_VERSION_MAJOR \ LIBXI_MINOR=$$QMAKE_XINPUT2_VERSION_MINOR \ @@ -59,13 +59,13 @@ contains(QT_CONFIG, xcb-xlib) { # to support custom cursors with depth > 1 contains(QT_CONFIG, xcb-render) { DEFINES += XCB_USE_RENDER - LIBS += -lxcb-render -lxcb-render-util + QMAKE_USE += xcb_render } # build with session management support contains(QT_CONFIG, xcb-sm) { DEFINES += XCB_USE_SM - LIBS += -lSM -lICE + QMAKE_USE += x11sm SOURCES += qxcbsessionmanager.cpp HEADERS += qxcbsessionmanager.h } @@ -86,7 +86,7 @@ contains(QT_CONFIG, xcb-qt) { QMAKE_USE += xcb } else { LIBS += -lxcb-xinerama ### there is no configure test for this! - !contains(DEFINES, QT_NO_XKB):LIBS += -lxcb-xkb + !contains(DEFINES, QT_NO_XKB): QMAKE_USE += xcb_xkb QMAKE_USE += xcb_syslibs } -- cgit v1.2.3