mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
subprojects: webview2: Fix warning with meson 1.4.0
Meson 1.4.0 will warn if include dir is absolute path Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6618>
This commit is contained in:
parent
111cc8d796
commit
d00d8fff6b
1 changed files with 11 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
|||
project('webview2', version : '1.0.2420.47')
|
||||
project('webview2', 'c', version : '1.0.2420.47')
|
||||
|
||||
py3 = import('python3').find_python()
|
||||
|
||||
|
@ -9,28 +9,28 @@ endif
|
|||
message('Downloading and extracting webview2 nuget package')
|
||||
|
||||
arch = target_machine.cpu_family()
|
||||
if arch != 'x86_64' and arch != 'x86' and arch != 'aarch64'
|
||||
error('Unexpected architecture' + arch)
|
||||
if arch not in ['x86_64', 'x86', 'aarch64']
|
||||
error(f'Unexpected architecture @arch@')
|
||||
endif
|
||||
|
||||
zip_hash = '8e5a7307d71507edbbe02cac27215d71058bbd82cd256cef60f06b945907610a'
|
||||
version = meson.project_version()
|
||||
ret = run_command(py3, files('download-binary.py'), meson.project_version(), zip_hash,
|
||||
ret = run_command(py3, files('download-binary.py'), version, zip_hash,
|
||||
check: true)
|
||||
|
||||
base_path = join_paths(meson.current_source_dir(), 'webview2-@0@'.format(version),
|
||||
'build', 'native')
|
||||
inc_dir = include_directories(join_paths(base_path, 'include'))
|
||||
base_path = f'webview2-@version@' / 'build' / 'native'
|
||||
inc_dir = include_directories(base_path / 'include')
|
||||
lib_base_path = meson.current_source_dir() / base_path
|
||||
lib_path = ''
|
||||
if arch == 'x86_64'
|
||||
lib_path = join_paths(base_path, 'x64')
|
||||
lib_path = lib_base_path / 'x64'
|
||||
elif arch == 'x86'
|
||||
lib_path = join_paths(base_path, 'x86')
|
||||
lib_path = lib_base_path / 'x86'
|
||||
else
|
||||
lib_path = join_paths(base_path, 'arm64')
|
||||
lib_path = lib_base_path / 'arm64'
|
||||
endif
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
loader_static = cc.find_library('WebView2LoaderStatic', dirs: [lib_path])
|
||||
loader_static = cc.find_library('WebView2LoaderStatic', dirs: lib_path)
|
||||
webview2_dep = declare_dependency(include_directories: inc_dir,
|
||||
dependencies: loader_static)
|
||||
|
|
Loading…
Reference in a new issue