meson: Fix decklink building on Windows
Needs comsuppw, and does not need libdl or pthread.
This commit is contained in:
parent
09fe080e6a
commit
e8e639081a
@ -8,34 +8,44 @@ decklink_sources = [
|
|||||||
|
|
||||||
build_decklink = false
|
build_decklink = false
|
||||||
decklink_ldflags = []
|
decklink_ldflags = []
|
||||||
|
decklink_libs = []
|
||||||
|
|
||||||
libdl = cc.find_library('dl', required: false)
|
if host_machine.system() == 'windows'
|
||||||
have_pthread_h = cdata.has('HAVE_PTHREAD_H')
|
decklink_sources += ['win/DeckLinkAPIDispatch.cpp', 'win/DeckLinkAPI_i.c']
|
||||||
|
# Only used by MSVC. On MinGW, this is all inlined.
|
||||||
if libdl.found() and have_pthread_h
|
# FIXME: Use commsuppwd.lib for debug builds?
|
||||||
if host_machine.system() == 'linux'
|
comutil_dep = cxx.find_library('comsuppw', required : false)
|
||||||
decklink_sources += ['linux/DeckLinkAPIDispatch.cpp']
|
if comutil_dep.found()
|
||||||
build_decklink = true
|
build_decklink = true
|
||||||
elif host_machine.system() == 'darwin'
|
decklink_libs = [comutil_dep]
|
||||||
decklink_sources += ['osx/DeckLinkAPIDispatch.cpp']
|
endif
|
||||||
decklink_ldflags = ['-Wl,-framework,CoreFoundation']
|
else
|
||||||
build_decklink = true
|
libdl = cc.find_library('dl', required: false)
|
||||||
elif host_machine.system() == 'windows'
|
have_pthread_h = cdata.has('HAVE_PTHREAD_H')
|
||||||
decklink_sources += ['win/DeckLinkAPIDispatch.cpp', 'win/DeckLinkAPI_i.c']
|
if libdl.found() and have_pthread_h
|
||||||
build_decklink = true
|
decklink_libs = [libm, libdl, dependency('threads')]
|
||||||
else
|
if host_machine.system() == 'linux'
|
||||||
message('Not building decklink plugin for system ' + host_machine.system())
|
decklink_sources += ['linux/DeckLinkAPIDispatch.cpp']
|
||||||
|
build_decklink = true
|
||||||
|
elif host_machine.system() == 'darwin'
|
||||||
|
decklink_sources += ['osx/DeckLinkAPIDispatch.cpp']
|
||||||
|
decklink_ldflags = ['-Wl,-framework,CoreFoundation']
|
||||||
|
build_decklink = true
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if build_decklink
|
if build_decklink
|
||||||
|
message('Building decklink plugin')
|
||||||
decklink = library('gstdecklink',
|
decklink = library('gstdecklink',
|
||||||
decklink_sources,
|
decklink_sources,
|
||||||
cpp_args : gst_plugins_bad_args + [ '-DGST_USE_UNSTABLE_API' ],
|
cpp_args : gst_plugins_bad_args + [ '-DGST_USE_UNSTABLE_API' ],
|
||||||
link_args : decklink_ldflags + noseh_link_args,
|
link_args : decklink_ldflags + noseh_link_args,
|
||||||
include_directories : [configinc],
|
include_directories : [configinc],
|
||||||
dependencies : [gstvideo_dep, gstaudio_dep, gstbase_dep, gst_dep, libm, libdl, dependency('threads')],
|
dependencies : [gstvideo_dep, gstaudio_dep, gstbase_dep, gst_dep] + decklink_libs,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : plugins_install_dir,
|
install_dir : plugins_install_dir,
|
||||||
)
|
)
|
||||||
|
else
|
||||||
|
message('Not building decklink plugin for "@0@'.format(host_machine.system()))
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user