use dependency fallbacks, use system reproc if available

This commit is contained in:
Jan200101 2021-08-23 19:10:13 +02:00 committed by Francesco Abbate
parent fb907c9bf4
commit fc4c7a29ee
2 changed files with 3 additions and 16 deletions

View File

@ -1,10 +1,6 @@
freetype_dep = dependency('freetype2')
libagg_dep = dependency('libagg', required: false)
if not libagg_dep.found()
libagg_subproject = subproject('libagg')
libagg_dep = libagg_subproject.get_variable('libagg_dep')
endif
libagg_dep = dependency('libagg', fallback: ['libagg', 'libagg_dep'])
font_renderer_sources = [
'agg_font_freetype.cpp',

View File

@ -51,24 +51,15 @@ endif
#===============================================================================
libm = cc.find_library('m', required : false)
libdl = cc.find_library('dl', required : false)
lua_dep = dependency('lua5.2', required : false)
lua_dep = dependency('lua5.2', fallback: ['lua', 'lua_dep'])
pcre2_dep = dependency('libpcre2-8')
sdl_dep = dependency('sdl2', method: 'config-tool')
if not lua_dep.found()
lua_subproject = subproject('lua',
default_options: ['shared=false', 'use_readline=false', 'app=false']
)
lua_dep = lua_subproject.get_variable('lua_dep')
endif
reproc_subproject = subproject('reproc',
reproc_dep = dependency('reproc', fallback: ['reproc', 'reproc_dep'],
default_options: [
'default_library=static', 'multithreaded=false',
'reproc-cpp=false', 'examples=false'
]
)
reproc_dep = reproc_subproject.get_variable('reproc_dep')
lite_deps = [lua_dep, sdl_dep, reproc_dep, pcre2_dep, libm, libdl]