project('camu', ['c', 'cpp'], # Marking cpp here is required for subproject cross-builds. version: '0.01', meson_version: '>=0.63.0', # Wrap diff_files (0.63.0). default_options: ['warning_level=2', 'c_std=c99'], license: 'GPL-3.0-only') # Fail early if 'Compiler for build machine not found'. add_languages('c', native: true) add_languages('cpp', native: true) compiler = meson.get_compiler('c') cmake = import('cmake') is_debug = get_option('debug') is_minsize = get_option('optimization') == 's' is_linux = host_machine.system() == 'linux' is_windows = host_machine.system() == 'windows' is_msvc = compiler.get_id() == 'msvc' or compiler.get_id() == 'clang-cl' is_android = host_machine.system() == 'android' alabaster = subproject('libalabaster') naunet_opts = [] if get_option('portal').enabled() naunet_opts += ['json=enabled', 'curl=enabled'] endif naunet = subproject('libnaunet', default_options: naunet_opts) naunet_has_curl = naunet.get_variable('naunet_has_curl') naunet_has_mmap = naunet.get_variable('naunet_has_mmap') common_deps = [alabaster.get_variable('alabaster'), naunet.get_variable('naunet')] no_video = meson.is_subproject() # @TODO: Does it make sense for stela to be a dependency for server-side (headless) transcode. #if not no_video stela_opts = ['poll=inline', 'event-buffer=false', 'pause=true', 'window=' + get_option('window')] if get_option('renderer-api') == 'vulkan' stela_opts += ['api=vulkan'] elif get_option('renderer-api') == 'dx11' stela_opts += ['api=dx11'] else stela_opts += [is_android ? 'api=gles' : 'api=gl'] if get_option('renderer-api') == 'gl-rpi' stela_opts += ['egl-brcm=true'] endif endif stela = subproject('stela', default_options: stela_opts).get_variable('stela') #endif subdir('src/util') common_deps += [util] subdir('src/cache') subdir('src/codec') subdir('src/liana') if get_option('portal').enabled() subdir('src/portal') endif if get_option('server').enabled() subdir('src/server') endif if get_option('client').enabled() subdir('src/libclient') endif if get_option('sink').enabled() subdir('src/buffer') subdir('src/mixer') if not no_video subdir('src/render') subdir('src/screen') endif subdir('src/libsink') endif if not meson.is_subproject() subdir('src/fruits') endif if get_option('tests').allowed() and not meson.is_subproject() subdir('tests') endif