diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-10-26 16:15:20 +0200 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@qt.io> | 2016-11-14 17:03:21 +0000 |
commit | f0ea26416a73e9ed60e0e0440275e73081f601a2 (patch) | |
tree | fc757ae3e14e32be4bd4bcd3629d79527308907a /src | |
parent | d5ab3ab8703ef04cc06d78983bf1a39ecfe99bb4 (diff) |
Move qtmultimedia over to the new config system
Use the new configuration system to define external
libraries, configure tests and features. Don't use
pkg-config outside of the configuration step. And
move all command line options over from qtbase, so
that we can remove them from there in a second step.
Change-Id: I1aa4b557a6aee17eeceb00602005a2d28b426a26
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Diffstat (limited to 'src')
21 files changed, 386 insertions, 102 deletions
diff --git a/src/gsttools/gsttools.pro b/src/gsttools/gsttools.pro index 216189d9a..3f955c185 100644 --- a/src/gsttools/gsttools.pro +++ b/src/gsttools/gsttools.pro @@ -8,29 +8,16 @@ QT = core-private multimedia-private gui-private !static:DEFINES += QT_MAKEDLL DEFINES += GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -unix:!maemo*:contains(QT_CONFIG, alsa) { -DEFINES += HAVE_ALSA -LIBS_PRIVATE += \ - -lasound +qtConfig(alsa) { + DEFINES += HAVE_ALSA + QMAKE_USE += alsa } -CONFIG += link_pkgconfig +QMAKE_USE += gstreamer -PKGCONFIG += \ - gstreamer-$$GST_VERSION \ - gstreamer-base-$$GST_VERSION \ - gstreamer-audio-$$GST_VERSION \ - gstreamer-video-$$GST_VERSION \ - gstreamer-pbutils-$$GST_VERSION - -equals(GST_VERSION,"0.10") { - PKGCONFIG_PRIVATE += gstreamer-interfaces-0.10 - maemo*: PKGCONFIG_PRIVATE +=gstreamer-plugins-bad-0.10 -} - -config_resourcepolicy { +qtConfig(resourcepolicy) { DEFINES += HAVE_RESOURCE_POLICY - PKGCONFIG_PRIVATE += libresourceqt5 + QMAKE_USE += libresourceqt5 } # Header files must go inside source directory of a module @@ -44,7 +31,6 @@ PRIVATE_HEADERS += \ qgstreamermessage_p.h \ qgstutils_p.h \ qgstvideobuffer_p.h \ - qvideosurfacegstsink_p.h \ qgstreamerbufferprobe_p.h \ qgstreamervideorendererinterface_p.h \ qgstreameraudioinputselector_p.h \ @@ -82,10 +68,11 @@ qtHaveModule(widgets) { qgstreamervideowidget.cpp } -equals(GST_VERSION,"0.10") { +qtConfig(gstreamer_0_10) { PRIVATE_HEADERS += \ qgstbufferpoolinterface_p.h \ - gstvideoconnector_p.h \ + qvideosurfacegstsink_p.h \ + gstvideoconnector_p.h SOURCES += \ qgstbufferpoolinterface.cpp \ @@ -122,17 +109,14 @@ mir: { DEFINES += HAVE_MIR } -config_gstreamer_appsrc { - PKGCONFIG_PRIVATE += gstreamer-app-$$GST_VERSION +qtConfig(gstreamer_app) { + QMAKE_USE += gstreamer_app PRIVATE_HEADERS += qgstappsrc_p.h SOURCES += qgstappsrc.cpp - DEFINES += HAVE_GST_APPSRC - - LIBS_PRIVATE += -lgstapp-$$GST_VERSION } -config_linux_v4l: DEFINES += USE_V4L +qtConfig(linux_v4l): DEFINES += USE_V4L HEADERS += $$PRIVATE_HEADERS diff --git a/src/imports/audioengine/audioengine.pro b/src/imports/audioengine/audioengine.pro index c00a6ec6b..1d46dfa33 100644 --- a/src/imports/audioengine/audioengine.pro +++ b/src/imports/audioengine/audioengine.pro @@ -5,10 +5,7 @@ IMPORT_VERSION = 1.1 QT += quick qml multimedia-private -win32: LIBS += -lOpenAL32 -unix:!mac:!blackberry: LIBS += -lopenal -blackberry: LIBS += -lOpenAL -mac: LIBS += -framework OpenAL +QMAKE_USE += openal mac: DEFINES += HEADER_OPENAL_PREFIX INCLUDEPATH += ../../multimedia/audio diff --git a/src/imports/imports.pro b/src/imports/imports.pro index d24bba59f..fcd9e3466 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -1,5 +1,6 @@ TEMPLATE = subdirs +QT_FOR_CONFIG += multimedia-private SUBDIRS += multimedia -config_openal: SUBDIRS += audioengine +qtConfig(openal): SUBDIRS += audioengine diff --git a/src/multimedia/audio/audio.pri b/src/multimedia/audio/audio.pri index 4706fd23e..d6d6f9c54 100644 --- a/src/multimedia/audio/audio.pri +++ b/src/multimedia/audio/audio.pri @@ -40,20 +40,13 @@ SOURCES += \ audio/qaudiodecoder.cpp \ audio/qaudiohelpers.cpp -unix:!mac { - config_pulseaudio { - CONFIG += link_pkgconfig - PKGCONFIG_PRIVATE += libpulse +qtConfig(pulseaudio) { + QMAKE_USE += pulseaudio - DEFINES += QT_MULTIMEDIA_PULSEAUDIO - PRIVATE_HEADERS += audio/qsoundeffect_pulse_p.h - SOURCES += audio/qsoundeffect_pulse_p.cpp - !maemo*:DEFINES += QTM_PULSEAUDIO_DEFAULTBUFFER - } else { - DEFINES += QT_MULTIMEDIA_QAUDIO - PRIVATE_HEADERS += audio/qsoundeffect_qaudio_p.h - SOURCES += audio/qsoundeffect_qaudio_p.cpp - } + DEFINES += QT_MULTIMEDIA_PULSEAUDIO + PRIVATE_HEADERS += audio/qsoundeffect_pulse_p.h + SOURCES += audio/qsoundeffect_pulse_p.cpp + !maemo*:DEFINES += QTM_PULSEAUDIO_DEFAULTBUFFER } else { DEFINES += QT_MULTIMEDIA_QAUDIO PRIVATE_HEADERS += audio/qsoundeffect_qaudio_p.h diff --git a/src/multimedia/configure.json b/src/multimedia/configure.json new file mode 100644 index 000000000..19812d19b --- /dev/null +++ b/src/multimedia/configure.json @@ -0,0 +1,314 @@ +{ + "module": "multimedia", + "depends": [ + "gui" + ], + "testDir": "../../config.tests", + + "commandline": { + "options": { + "alsa": "boolean", + "gstreamer": { "type": "optionalString", "values": [ "no", "yes", "0.10", "1.0" ] }, + "pulseaudio": "boolean", + "wmf-backend": "boolean" + } + }, + + "libraries": { + "alsa": { + "label": "ALSA", + "test": "alsa", + "sources": [ + "-lasound" + ] + }, + "avfoundation": { + "label": "AVFoundation", + "test": "avfoundation", + "sources": [ + { "libs": "-framework AVFoundation -framework Foundation" } + ] + }, + "directshow": { + "label": "DirectShow", + "test": "directshow", + "sources": [ + { "libs": "-lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32" } + ] + }, + "gstreamer_0_10": { + "label": "GStreamer 0.10", + "export": "gstreamer", + "test": "gstreamer", + "sources": [ + { "type": "pkgConfig", + "args": "gstreamer-0.10 gstreamer-base-0.10 gstreamer-audio-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gstreamer-interfaces-0.10" } + ] + }, + "gstreamer_1_0": { + "label": "GStreamer 1.0", + "export": "gstreamer", + "test": "gstreamer", + "sources": [ + { "type": "pkgConfig", + "args": "gstreamer-1.0 gstreamer-base-1.0 gstreamer-audio-1.0 gstreamer-video-1.0 gstreamer-pbutils-1.0" } + ] + }, + "gstreamer_app_0_10": { + "label": "GStreamer App 0.10", + "export": "gstreamer_app", + "test": "gstreamer_appsrc", + "use": "gstreamer_0_10", + "sources": [ + { "type": "pkgConfig", "args": "gstreamer-app-0.10" } + ] + }, + "gstreamer_app_1_0": { + "label": "GStreamer App 1.0", + "export": "gstreamer_app", + "test": "gstreamer_appsrc", + "use": "gstreamer_1_0", + "sources": [ + { "type": "pkgConfig", "args": "gstreamer-app-1.0" } + ] + }, + "gstreamer_photography_0_10": { + "label": "GStreamer Photography 0.10", + "export": "gstreamer_photography", + "test": "gstreamer_photography", + "use": "gstreamer_0_10", + "sources": [ + { "libs": "-lgstphotography-0.10" } + ] + }, + "gstreamer_photography_1_0": { + "label": "GStreamer Photography 1.0", + "export": "gstreamer_photography", + "test": "gstreamer_photography", + "use": "gstreamer_1_0", + "sources": [ + { "libs": "-lgstphotography-1.0" } + ] + }, + "libresourceqt5": { + "label": "libresourceqt5", + "test": "resourcepolicy", + "sources": [ + { "type": "pkgConfig", "args": "libresourceqt5" } + ] + }, + "mmrenderer": { + "label": "MMRenderer", + "test": "mmrenderer", + "sources": [ + { "libs": "-lmmrndclient -lstrm" } + ] + }, + "openal": { + "label": "OpenAL", + "test": "openal", + "sources": [ + { "type": "pkgConfig", "args": "openal" }, + { "libs": "-lOpenAL32", "condition": "config.win32" }, + { "libs": "-framework OpenAL", "condition": "config.darwin" }, + { "libs": "-lopenal", "condition": "config.unix && !config.darwin" } + ] + }, + "pulseaudio": { + "label": "PulseAudio >= 0.9.10", + "test": "pulseaudio", + "sources": [ + { "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" } + ] + }, + "wmf": { + "label": "WMF", + "test": "wmf", + "sources": [ + { "libs": "-lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32 -lMf -lMfuuid -lMfplat -lPropsys" } + ] + } + }, + + "tests": { + "evr": { + "label": "evr.h", + "type": "compile", + "test": "evr" + }, + "gstreamer_encodingprofiles_1_0": { + "label": "GStreamer encoding-profile.h", + "type": "compile", + "use": "gstreamer_1_0", + "test": "gstreamer_encodingprofiles" + }, + "gstreamer_encodingprofiles_0_10": { + "label": "GStreamer encoding-profile.h", + "type": "compile", + "use": "gstreamer_0_10", + "test": "gstreamer_encodingprofiles" + }, + "gpu_vivante": { + "label": "Vivante GPU", + "type": "compile", + "test": "gpu_vivante" + }, + "linux_v4l": { + "label": "Video for Linux", + "type": "compile", + "test": "linux_v4l" + }, + "wasapi": { + "label": "Windows Audio Services", + "type": "compile", + "test": "wasapi" + }, + "wmsdk": { + "label": "wmsdk.h", + "type": "compile", + "test": "wmsdk" + }, + "wshellitem": { + "label": "WShellItem", + "type": "compile", + "test": "wshellitem" + } + }, + + "features": { + "alsa": { + "label": "ALSA", + "condition": "config.unix && libs.alsa", + "output": [ "feature", "privateFeature" ] + }, + "avfoundation": { + "label": "AVFoundation", + "emitIf": "config.darwin", + "condition": "libs.avfoundation", + "output": [ "feature", "privateFeature" ] + }, + "directshow": { + "label": "DirectShow", + "condition": "config.win32 && libs.directshow", + "output": [ "feature", "privateFeature" ] + }, + "evr": { + "label": "evr.h", + "condition": "config.win32 && tests.evr", + "output": [ "feature", "privateFeature" ] + }, + "gstreamer_0_10": { + "label": "GStreamer 0.10", + "disable": "input.gstreamer == '1.0' || input.gstreamer == 'no'", + "enable": "input.gstreamer == '0.10'", + "condition": "!features.gstreamer_1_0 && libs.gstreamer_0_10", + "output": [ "privateFeature" ] + }, + "gstreamer_1_0": { + "label": "GStreamer 1.0", + "disable": "input.gstreamer == '0.10' || input.gstreamer == 'no'", + "enable": "input.gstreamer == '1.0'", + "condition": "libs.gstreamer_1_0", + "output": [ "privateFeature" ] + }, + "gstreamer": { + "condition": "features.gstreamer_1_0 || features.gstreamer_0_10", + "output": [ "privateFeature" ] + }, + "gstreamer_app": { + "label": "GStreamer App", + "condition": "(features.gstreamer_1_0 && libs.gstreamer_app_1_0) + || (features.gstreamer_0_10 && libs.gstreamer_app_0_10)", + "output": [ "privateFeature" ] + }, + "gstreamer_encodingprofiles": { + "label": "GStreamer encoding-profile.h", + "condition": "(features.gstreamer_1_0 && tests.gstreamer_encodingprofiles_1_0) + || (features.gstreamer_0_10 && tests.gstreamer_encodingprofiles_0_10)", + "output": [ "privateFeature" ] + }, + "gstreamer_photography": { + "label": "GStreamer Photography", + "condition": "(features.gstreamer_1_0 && libs.gstreamer_photography_1_0) + || (features.gstreamer_0_10 && libs.gstreamer_photography_0_10)", + "output": [ "privateFeature" ] + }, + "gpu_vivante": { + "label": "Vivante GPU", + "condition": "features.opengles2 && tests.gpu_vivante", + "output": [ "privateFeature" ] + }, + "resourcepolicy": { + "label": "Resource Policy (libresourceqt5)", + "condition": "libs.libresourceqt5", + "output": [ "privateFeature" ] + }, + "linux_v4l": { + "label": "Video for Linux", + "condition": "config.unix && tests.linux_v4l", + "output": [ "privateFeature" ] + }, + "mmrenderer": { + "label": "MMRenderer", + "emitIf": "config.qnx", + "condition": "libs.mmrenderer", + "output": [ "feature", "privateFeature" ] + }, + "openal": { + "label": "OpenAL", + "condition": "libs.openal", + "output": [ "feature", "privateFeature" ] + }, + "pulseaudio": { + "label": "PulseAudio", + "autoDetect": "config.unix", + "condition": "libs.pulseaudio", + "output": [ "feature", "privateFeature" ] + }, + "wasapi": { + "label": "Windows Audio Services", + "autoDetect": "false", + "condition": "config.win32 && tests.wasapi", + "output": [ "privateFeature" ] + }, + "wmsdk": { + "label": "wmsdk.h", + "condition": "config.win32 && tests.wmsdk", + "output": [ "feature", "privateFeature" ] + }, + "wshellitem": { + "label": "WShellItem", + "condition": "config.win32 && features.directshow && tests.wshellitem", + "output": [ "feature", "privateFeature" ] + }, + "wmf-backend": { + "label": "Windows Media Foundation backend for Qt Multimedia", + "emitIf": "config.win32", + "autoDetect": false, + "condition": "libraries.wmf", + "output": [ "privateFeature" ] + } + }, + + "report": [ + ], + + "summary": [ + { + "section": "Qt Multimedia", + "entries": [ + "alsa", + "gstreamer_1_0", + "gstreamer_0_10", + "linux_v4l", + "openal", + "pulseaudio", + "resourcepolicy", + "mmrenderer", + "avfoundation", + "directshow", + "wmf-backend" + ] + } + ] +} diff --git a/src/plugins/avfoundation/camera/camera.pro b/src/plugins/avfoundation/camera/camera.pro index a17ff5a73..ab70c25c3 100644 --- a/src/plugins/avfoundation/camera/camera.pro +++ b/src/plugins/avfoundation/camera/camera.pro @@ -8,12 +8,13 @@ QT += multimedia-private network LIBS += -framework AudioToolbox \ -framework CoreAudio \ -framework QuartzCore \ - -framework AVFoundation \ -framework CoreMedia osx:LIBS += -framework AppKit \ -framework AudioUnit ios:LIBS += -framework CoreVideo +QMAKE_USE += avfoundation + OTHER_FILES += avfcamera.json DEFINES += QMEDIA_AVF_CAMERA diff --git a/src/plugins/avfoundation/mediaplayer/mediaplayer.pro b/src/plugins/avfoundation/mediaplayer/mediaplayer.pro index 29e231066..f9a086b33 100644 --- a/src/plugins/avfoundation/mediaplayer/mediaplayer.pro +++ b/src/plugins/avfoundation/mediaplayer/mediaplayer.pro @@ -6,7 +6,9 @@ CONFIG += no_keywords QT += multimedia-private network -LIBS += -framework AVFoundation -framework CoreMedia -framework CoreVideo -framework QuartzCore +LIBS += -framework CoreMedia -framework CoreVideo -framework QuartzCore + +QMAKE_USE += avfoundation DEFINES += QMEDIA_AVF_MEDIAPLAYER diff --git a/src/plugins/directshow/camera/camera.pri b/src/plugins/directshow/camera/camera.pri index 6c67a8fe2..fb7fbd3f5 100644 --- a/src/plugins/directshow/camera/camera.pri +++ b/src/plugins/directshow/camera/camera.pri @@ -28,4 +28,4 @@ SOURCES += \ $$PWD/dscameraimageprocessingcontrol.cpp *-msvc*:INCLUDEPATH += $$(DXSDK_DIR)/include -LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32 +QMAKE_USE += directshow diff --git a/src/plugins/directshow/directshow.pro b/src/plugins/directshow/directshow.pro index 918a14210..5eb4fbc96 100644 --- a/src/plugins/directshow/directshow.pro +++ b/src/plugins/directshow/directshow.pro @@ -1,19 +1,19 @@ TARGET = dsengine +QT += multimedia-private + win32:!qtHaveModule(opengl)|qtConfig(dynamicgl) { LIBS_PRIVATE += -lgdi32 -luser32 } -QT += multimedia-private - HEADERS += dsserviceplugin.h SOURCES += dsserviceplugin.cpp -!config_wmsdk: DEFINES += QT_NO_WMSDK +!qtConfig(wmsdk): DEFINES += QT_NO_WMSDK mingw: DEFINES += NO_DSHOW_STRSAFE include(helpers/helpers.pri) -!config_wmf|!contains(QT_CONFIG, wmf-backend): include(player/player.pri) +!qtConfig(wmf-backend): include(player/player.pri) include(camera/camera.pri) OTHER_FILES += \ diff --git a/src/plugins/directshow/player/player.pri b/src/plugins/directshow/player/player.pri index 8b4bb70b7..7391ec7f0 100644 --- a/src/plugins/directshow/player/player.pri +++ b/src/plugins/directshow/player/player.pri @@ -1,7 +1,7 @@ INCLUDEPATH += $$PWD -LIBS += -lstrmiids -ldmoguids -luuid -lole32 -loleaut32 -lmsdmo -lgdi32 - +QMAKE_USE += directshow +LIBS += -lgdi32 qtHaveModule(widgets): QT += widgets @@ -29,7 +29,7 @@ SOURCES += \ $$PWD/directshowmetadatacontrol.cpp \ $$PWD/vmr9videowindowcontrol.cpp -config_evr { +qtConfig(evr) { DEFINES += HAVE_EVR include($$PWD/../../common/evr.pri) @@ -41,7 +41,7 @@ config_evr { $$PWD/directshowevrvideowindowcontrol.cpp } -config_wshellitem { +qtConfig(wshellitem) { QT += core-private } else { DEFINES += QT_NO_SHELLITEM diff --git a/src/plugins/gstreamer/camerabin/camerabin.pro b/src/plugins/gstreamer/camerabin/camerabin.pro index 214489f3e..3a5fcc02f 100644 --- a/src/plugins/gstreamer/camerabin/camerabin.pro +++ b/src/plugins/gstreamer/camerabin/camerabin.pro @@ -62,7 +62,7 @@ maemo6 { CONFIG += have_gst_photography } -config_gstreamer_photography { +qtConfig(gstreamer_photography) { DEFINES += HAVE_GST_PHOTOGRAPHY HEADERS += \ @@ -77,15 +77,15 @@ config_gstreamer_photography { $$PWD/camerabinfocus.cpp \ $$PWD/camerabinlocks.cpp - LIBS += -lgstphotography-$$GST_VERSION + QMAKE_USE += gstreamer_photography DEFINES += GST_USE_UNSTABLE_API #prevents warnings because of unstable photography API } -config_gstreamer_encodingprofiles { +qtConfig(gstreamer_encodingprofiles) { DEFINES += HAVE_GST_ENCODING_PROFILES } -config_linux_v4l: { +qtConfig(linux_v4l) { DEFINES += USE_V4L HEADERS += \ diff --git a/src/plugins/gstreamer/common.pri b/src/plugins/gstreamer/common.pri index babdb7cfb..7faf9b111 100644 --- a/src/plugins/gstreamer/common.pri +++ b/src/plugins/gstreamer/common.pri @@ -1,4 +1,3 @@ - QT += core-private multimedia-private network qtHaveModule(widgets) { @@ -8,30 +7,19 @@ qtHaveModule(widgets) { LIBS += -lqgsttools_p -CONFIG += link_pkgconfig - -PKGCONFIG += \ - gstreamer-$$GST_VERSION \ - gstreamer-base-$$GST_VERSION \ - gstreamer-audio-$$GST_VERSION \ - gstreamer-video-$$GST_VERSION \ - gstreamer-pbutils-$$GST_VERSION - -maemo*:PKGCONFIG +=gstreamer-plugins-bad-$$GST_VERSION +QMAKE_USE += gstreamer mir: { DEFINES += HAVE_MIR } - -config_resourcepolicy { +qtConfig(resourcepolicy) { + QMAKE_USE += libresourceqt5 DEFINES += HAVE_RESOURCE_POLICY - PKGCONFIG += libresourceqt5 } -config_gstreamer_appsrc { - PKGCONFIG += gstreamer-app-$$GST_VERSION +qtConfig(gstreamer_app) { + QMAKE_USE += gstreamer_app DEFINES += HAVE_GST_APPSRC - LIBS += -lgstapp-$$GST_VERSION } diff --git a/src/plugins/gstreamer/mediacapture/mediacapture.pro b/src/plugins/gstreamer/mediacapture/mediacapture.pro index db5210d4d..17248a495 100644 --- a/src/plugins/gstreamer/mediacapture/mediacapture.pro +++ b/src/plugins/gstreamer/mediacapture/mediacapture.pro @@ -31,7 +31,7 @@ SOURCES += $$PWD/qgstreamercaptureservice.cpp \ # Camera usage with gstreamer needs to have #CONFIG += use_gstreamer_camera -use_gstreamer_camera:config_linux_v4l { +use_gstreamer_camera:qtConfig(linux_v4l) { DEFINES += USE_GSTREAMER_CAMERA OTHER_FILES += \ diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index f113f68b3..b0c5101b6 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -5,6 +5,7 @@ ###################################################################### TEMPLATE = subdirs +QT_FOR_CONFIG += multimedia-private SUBDIRS += m3u @@ -17,7 +18,7 @@ android { } qnx { - config_mmrenderer: SUBDIRS += qnx + qtConfig(mmrenderer): SUBDIRS += qnx SUBDIRS += audiocapture } @@ -26,44 +27,44 @@ qnx:!blackberry { } win32 { - config_wasapi: SUBDIRS += wasapi + qtConfig(wasapi): SUBDIRS += wasapi } win32:!winrt { SUBDIRS += audiocapture \ windowsaudio - config_directshow: SUBDIRS += directshow - config_wmf: SUBDIRS += wmf + qtConfig(directshow): SUBDIRS += directshow + qtConfig(wmf-backend): SUBDIRS += wmf } + winrt { SUBDIRS += winrt } unix:!mac:!android { - config_gstreamer { + qtConfig(gstreamer) { SUBDIRS += gstreamer } else { SUBDIRS += audiocapture } - config_pulseaudio: SUBDIRS += pulseaudio - config_alsa: SUBDIRS += alsa + qtConfig(pulseaudio): SUBDIRS += pulseaudio + qtConfig(alsa): SUBDIRS += alsa # v4l is turned off because it is not supported in Qt 5 - # config_linux_v4l { + # qtConfig(linux_v4l) { # !maemo*:SUBDIRS += v4l # } } darwin:!watchos { SUBDIRS += audiocapture coreaudio - - config_avfoundation: SUBDIRS += avfoundation + qtConfig(avfoundation): SUBDIRS += avfoundation } -config_resourcepolicy { +qtConfig(resourcepolicy) { SUBDIRS += resourcepolicy } diff --git a/src/plugins/pulseaudio/pulseaudio.pro b/src/plugins/pulseaudio/pulseaudio.pro index 7f4d3de22..c6339e9e8 100644 --- a/src/plugins/pulseaudio/pulseaudio.pro +++ b/src/plugins/pulseaudio/pulseaudio.pro @@ -1,8 +1,7 @@ TARGET = qtmedia_pulse QT += multimedia-private -CONFIG += link_pkgconfig -PKGCONFIG += libpulse +QMAKE_USE += pulseaudio HEADERS += qpulseaudioplugin.h \ qaudiodeviceinfo_pulse.h \ diff --git a/src/plugins/qnx/mediaplayer/mediaplayer.pri b/src/plugins/qnx/mediaplayer/mediaplayer.pri index 9dedab0fd..9d74dd481 100644 --- a/src/plugins/qnx/mediaplayer/mediaplayer.pri +++ b/src/plugins/qnx/mediaplayer/mediaplayer.pri @@ -18,7 +18,7 @@ SOURCES += \ $$PWD/mmrendererutil.cpp \ $$PWD/mmrenderervideowindowcontrol.cpp -LIBS += -lmmrndclient -lstrm +QMAKE_USE += mmrenderer blackberry { HEADERS += $$PWD/bpsmediaplayercontrol.h diff --git a/src/plugins/resourcepolicy/resourcepolicy.pro b/src/plugins/resourcepolicy/resourcepolicy.pro index 91a946665..89e75be1b 100644 --- a/src/plugins/resourcepolicy/resourcepolicy.pro +++ b/src/plugins/resourcepolicy/resourcepolicy.pro @@ -1,8 +1,8 @@ TARGET = resourceqt QT += multimedia-private -CONFIG += link_pkgconfig -PKGCONFIG += libresourceqt5 + +QMAKE_USE += libresourceqt5 INCLUDEPATH += $$PWD \ $${SOURCE_DIR}/src/multimedia diff --git a/src/plugins/videonode/videonode.pro b/src/plugins/videonode/videonode.pro index 5fbcaecd4..ab7295406 100644 --- a/src/plugins/videonode/videonode.pro +++ b/src/plugins/videonode/videonode.pro @@ -1,7 +1,7 @@ TEMPLATE = subdirs -QT_FOR_CONFIG += gui-private +QT_FOR_CONFIG += gui-private multimedia-private -config_gpu_vivante { +qtConfig(gpu_vivante) { SUBDIRS += imx6 } diff --git a/src/plugins/wmf/decoder/decoder.pri b/src/plugins/wmf/decoder/decoder.pri index 992e710fe..7637ac848 100644 --- a/src/plugins/wmf/decoder/decoder.pri +++ b/src/plugins/wmf/decoder/decoder.pri @@ -1,7 +1,7 @@ INCLUDEPATH += $$PWD -LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32 -lMf -lMfuuid -lMfplat \ - -lPropsys -lmfreadwrite -lwmcodecdspuuid +LIBS += -lmfreadwrite -lwmcodecdspuuid +QMAKE_USE += wmf HEADERS += \ $$PWD/mfdecoderservice.h \ @@ -11,4 +11,4 @@ HEADERS += \ SOURCES += \ $$PWD/mfdecoderservice.cpp \ $$PWD/mfdecodersourcereader.cpp \ - $$PWD/mfaudiodecodercontrol.cpp
\ No newline at end of file + $$PWD/mfaudiodecodercontrol.cpp diff --git a/src/plugins/wmf/player/player.pri b/src/plugins/wmf/player/player.pri index a10e2df60..38ccb82a6 100644 --- a/src/plugins/wmf/player/player.pri +++ b/src/plugins/wmf/player/player.pri @@ -1,6 +1,7 @@ INCLUDEPATH += $$PWD -LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lgdi32 -luser32 -lole32 -loleaut32 -lMf -lMfuuid -lMfplat -lPropsys +LIBS += -lgdi32 -luser32 +QMAKE_USE += wmf DEFINES += QMEDIA_MEDIAFOUNDATION_PLAYER diff --git a/src/src.pro b/src/src.pro index 17f3266c5..97a053379 100644 --- a/src/src.pro +++ b/src/src.pro @@ -2,6 +2,9 @@ TEMPLATE = subdirs SUBDIRS += multimedia +include($$OUT_PWD/multimedia/qtmultimedia-config.pri) +QT_FOR_CONFIG += multimedia-private + # Everything else depends on multimedia src_qgsttools.subdir = gsttools src_qgsttools.depends = multimedia @@ -39,7 +42,7 @@ qtHaveModule(widgets) { src_qgsttools.depends += src_qtmmwidgets } -config_gstreamer { +qtConfig(gstreamer) { SUBDIRS += src_qgsttools # If gstreamer is present, then plugins should depend on it |