7 'c_std=gnu99', 'cpp_std=c++20',
12 cc = meson.get_compiler('c')
14 add_project_arguments(cc.get_supported_arguments([
15 '-Wno-missing-field-initializers',
16 '-Wno-unused-parameter',
18 '-Wno-missing-braces',
19 ]), language: ['c', 'cpp'])
21 # Compute the relative path used by compiler invocations.
22 source_root = meson.current_source_dir().split('/')
23 build_root = meson.global_build_root().split('/')
24 relative_dir_parts = []
28 if i >= source_root.length() or not in_prefix or p != source_root[i]
30 relative_dir_parts += '..'
36 foreach p : source_root
37 if i >= build_root.length() or not in_prefix or build_root[i] != p
39 relative_dir_parts += p
43 relative_dir = join_paths(relative_dir_parts) + '/'
45 if cc.has_argument('-fmacro-prefix-map=/prefix/to/hide=')
46 add_project_arguments(
47 '-fmacro-prefix-map=@0@='.format(relative_dir),
51 add_project_arguments(
52 '-D_DS_REL_SRC_DIR="@0@"'.format(relative_dir),
57 libds_tizen_version = meson.project_version()
58 version_arr = libds_tizen_version.split('.')
59 libds_tizen_version_major = version_arr[0]
60 libds_tizen_version_minor = version_arr[1]
61 libds_tizen_version_patch = version_arr[2]
63 dir_prefix = get_option('prefix')
64 libds_tizen_bindir = join_paths(dir_prefix, get_option('bindir'))
66 libds_tizen_inc = include_directories('include')
68 cdata = configuration_data()
69 cdata.set('LIBDS_VERSION_MAJOR', libds_tizen_version_major)
70 cdata.set('LIBDS_VERSION_MINOR', libds_tizen_version_minor)
71 cdata.set('LIBDS_VERSION_PATCH', libds_tizen_version_patch)
73 wayland_protos = dependency('wayland-protocols',
74 fallback: ['wayland-protocols', 'wayland_protocols'],
75 default_options: ['tests=false'],
77 wl_protocol_dir = wayland_protos.get_variable('pkgdatadir')
79 wayland_scanner_dep = dependency('wayland-scanner', native: true)
80 wayland_scanner = find_program(
81 wayland_scanner_dep.get_variable('wayland_scanner'),
91 configure_file(output: 'config.h', install: false, configuration: cdata)