2016-08-12 15:51:45 +00:00
|
|
|
flite_sources = [
|
|
|
|
'gstflite.c',
|
|
|
|
'gstflitetestsrc.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
flite_libs = [
|
|
|
|
'flite',
|
|
|
|
'flite_cmu_us_kal',
|
|
|
|
'flite_usenglish',
|
|
|
|
'flite_cmulex'
|
|
|
|
]
|
|
|
|
|
2018-07-27 13:29:23 +00:00
|
|
|
if get_option('flite').disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2016-08-12 15:51:45 +00:00
|
|
|
flite_deps = [ ]
|
|
|
|
foreach flite_lib : flite_libs
|
2018-07-27 13:29:23 +00:00
|
|
|
flite_lib_dep = cc.find_library(flite_lib, required : get_option('flite'))
|
2016-08-12 15:51:45 +00:00
|
|
|
if flite_lib_dep.found()
|
|
|
|
flite_deps += [flite_lib_dep]
|
|
|
|
endif
|
|
|
|
endforeach
|
2018-07-27 13:29:23 +00:00
|
|
|
have_flite_h = cc.has_header_symbol('flite/flite.h', 'flite_init')
|
|
|
|
if not have_flite_h and get_option('flite').enabled()
|
|
|
|
error('flite plugin enabled, but flite.h not found')
|
|
|
|
endif
|
2016-08-12 15:51:45 +00:00
|
|
|
|
2018-07-27 13:29:23 +00:00
|
|
|
if flite_deps.length() == flite_libs.length() and have_flite_h
|
2016-08-12 15:51:45 +00:00
|
|
|
gstflite = library('gstflite',
|
|
|
|
flite_sources,
|
|
|
|
c_args : gst_plugins_bad_args,
|
|
|
|
include_directories : [configinc],
|
|
|
|
dependencies : [gstaudio_dep] + flite_deps,
|
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
2018-10-22 09:30:45 +00:00
|
|
|
plugins += [gstflite]
|
2016-08-12 15:51:45 +00:00
|
|
|
endif
|