2020-05-11 23:37:47 +00:00
|
|
|
sidplay_option = get_option('sidplay')
|
|
|
|
if sidplay_option.disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not add_languages('cpp', native: false, required: sidplay_option)
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not cxx.has_header('sidplay/player.h', required: sidplay_option)
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
sidplay_dep = cxx.find_library('sidplay', required: sidplay_option)
|
|
|
|
if not sidplay_dep.found()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2017-06-23 17:33:24 +00:00
|
|
|
# sidplay plugin works with libsidplay 1.36.x (not 2.x.x)
|
2020-05-11 23:37:47 +00:00
|
|
|
sid_code = '''#include <sidplay/player.h>
|
|
|
|
void somefunc (void) {
|
|
|
|
sidTune tune = sidTune(0);
|
|
|
|
}'''
|
|
|
|
if not cxx.compiles(sid_code, dependencies: sidplay_dep, name : 'sidplay usage')
|
|
|
|
if sidplay_option.enabled()
|
|
|
|
error('sidplay headers and libraries were found, but were not usable')
|
2017-06-23 17:33:24 +00:00
|
|
|
endif
|
2020-05-11 23:37:47 +00:00
|
|
|
subdir_done()
|
2017-06-23 17:33:24 +00:00
|
|
|
endif
|
|
|
|
|
2020-05-11 23:37:47 +00:00
|
|
|
gstsid = library('gstsid', 'gstsiddec.cc',
|
|
|
|
cpp_args : ugly_args,
|
|
|
|
include_directories : [configinc],
|
|
|
|
dependencies : [gstaudio_dep, sidplay_dep],
|
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir)
|
|
|
|
pkgconfig.generate(gstsid, install_dir : plugins_pkgconfig_install_dir)
|
|
|
|
plugins += [gstsid]
|