Skip to content

Commit

Permalink
meson.build: fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
sinsanction committed Mar 24, 2024
1 parent 2b21858 commit 234209d
Showing 1 changed file with 4 additions and 43 deletions.
47 changes: 4 additions & 43 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,10 @@ project('vs-placebo', ['c', 'cpp'],

win32 = host_machine.system() == 'windows' or host_machine.system() == 'cygwin'

if win32
add_project_link_arguments('-static', language: ['c', 'cpp'])
endif

libplacebo_default_options = [
'default_library=static',
'vulkan=enabled',
'opengl=disabled',
'd3d11=disabled',
'glslang=enabled',
'shaderc=enabled',
'lcms=enabled',
'demos=false',
]
if win32
libplacebo_default_options += ['shaderc=enabled']
endif

placebo = subproject('libplacebo', default_options: libplacebo_default_options).get_variable('libplacebo')

cargo = find_program('cargo', required: false)
cargo_c = find_program('cargo-cinstall', required: false)
use_dovi = cargo.found() and cargo_c.found()

if use_dovi
dovi_src = join_paths(meson.current_source_dir(), 'dovi_tool', 'dolby_vision', 'Cargo.toml')
dovi_dst = join_paths(meson.current_build_dir(), 'libdovi.d')
run_command('cargo', 'cinstall', '--release', '--manifest-path=@0@'.format(dovi_src), '--prefix=@0@'.format(dovi_dst))
endif

placebo = dependency('libplacebo', required: true, version: '>=5.229.0', static: win32)
vapoursynth_dep = dependency('vapoursynth', static: win32).partial_dependency(includes: true, compile_args: true)
dovi = dependency('dovi', required: false)

if win32 and not dovi.found()
cc = meson.get_compiler('c')
dovi = cc.find_library('dovi', required : false)
endif

use_dovi = dovi.found()

config_vsplacebo = configuration_data()
Expand All @@ -59,16 +26,10 @@ sources = []

subdir('src')

if win32
subdir('vulkan')
vulkan = declare_dependency(link_args: 'vulkan/libvulkan-1.a')
else
vulkan = declare_dependency()
endif

shared_module('vs_placebo', sources,
dependencies: [placebo, vulkan, dovi],
dependencies: [placebo, vapoursynth_dep, dovi],
link_with: [p2p],
name_prefix: 'lib',
install_dir : join_paths(vapoursynth_dep.get_variable(pkgconfig: 'libdir'), 'vapoursynth'),
install: true
)

0 comments on commit 234209d

Please sign in to comment.