mirror of https://github.com/odrling/Aegisub
meson: add CSRI support
This commit is contained in:
parent
d8c348e897
commit
7d9feca578
11
meson.build
11
meson.build
|
@ -42,6 +42,10 @@ dataroot = datadir / 'aegisub'
|
|||
|
||||
if host_machine.system() == 'windows'
|
||||
add_project_arguments('-DNOMINMAX', '-D_WIN32_WINNT=0x0601', language: 'cpp')
|
||||
|
||||
if not get_option('csri').disabled()
|
||||
add_global_arguments('-DCSRI_NO_EXPORT', language: 'c')
|
||||
endif
|
||||
endif
|
||||
|
||||
# MSVC sets this automatically with -MDd, but it has a different meaning on other platforms
|
||||
|
@ -300,7 +304,12 @@ endif
|
|||
|
||||
deps += dep_gl
|
||||
|
||||
# TODO: csri
|
||||
if not get_option('csri').disabled()
|
||||
conf.set('WITH_CSRI', 1)
|
||||
|
||||
csri_sp = subproject('csri')
|
||||
deps += csri_sp.get_variable('csri_dep')
|
||||
endif
|
||||
|
||||
acconf = configure_file(output: 'acconf.h', configuration: conf)
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ option('avisynth', type: 'feature', description: 'AviSynth video source')
|
|||
option('fftw3', type: 'feature', description: 'FFTW3 support')
|
||||
option('hunspell', type: 'feature', description: 'Hunspell spell checker')
|
||||
option('uchardet', type: 'feature', description: 'uchardet character encoding detection')
|
||||
option('csri', type: 'feature', description: 'CSRI support')
|
||||
|
||||
option('system_luajit', type: 'boolean', value: false, description: 'Force using system luajit')
|
||||
option('local_boost', type: 'boolean', value: false, description: 'Force using locally compiled Boost')
|
||||
|
|
|
@ -220,6 +220,10 @@ if conf.has('WITH_FONTCONFIG')
|
|||
aegisub_src += 'font_file_lister_fontconfig.cpp'
|
||||
endif
|
||||
|
||||
if conf.has('WITH_CSRI')
|
||||
aegisub_src += 'subtitles_provider_csri.cpp'
|
||||
endif
|
||||
|
||||
opt_src = [
|
||||
['ALSA', 'audio_player_alsa.cpp'],
|
||||
['PortAudio', 'audio_player_portaudio.cpp'],
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
project('csri', 'c')
|
||||
|
||||
csri_sources = [
|
||||
'lib/list.c',
|
||||
'lib/wrap.c',
|
||||
'subhelp/logging.c',
|
||||
]
|
||||
|
||||
csri_inc = [include_directories('include')]
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
csri_inc += include_directories('lib/win32')
|
||||
csri_sources += ['lib/win32/enumerate.c', 'subhelp/win32/openfile.c']
|
||||
else
|
||||
csri_inc += include_directories('lib/posix')
|
||||
csri_sources += ['lib/posix/enumerate.c', 'subhelp/posix/openfile.c']
|
||||
endif
|
||||
|
||||
csri = library('csri', csri_sources, include_directories: csri_inc)
|
||||
csri_dep = declare_dependency(link_with: csri, include_directories: csri_inc)
|
Loading…
Reference in New Issue