Move ds_backend implementation
[platform/core/uifw/libds-tizen.git] / src / libds / meson.build
1 libds_files = [
2   'log.c',
3   'addon.c',
4   'buffer.c',
5   'allocator/allocator.c',
6   'allocator/shm.c',
7   'allocator/tbm.c',
8   'swapchain.c',
9   'output.c',
10   'compositor.c',
11   'subcompositor.c',
12   'region.c',
13   'util/time.c',
14   'util/shm.c',
15   'surface/surface.c',
16   'surface/subsurface.c',
17   'client_buffer/shm_client_buffer.c',
18   'xdg_shell/xdg_shell.c',
19   'xdg_shell/xdg_surface.c',
20   'xdg_shell/xdg_toplevel.c',
21   'pixel_format.c',
22   'backend.c',
23 ]
24
25 protocols = {
26   'xdg-shell': wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml',
27 }
28
29 protocols_code = {}
30 protocols_server_header = {}
31
32 foreach name, path : protocols
33   code = custom_target(
34     name.underscorify() + '_c',
35     input: path,
36     output: '@BASENAME@-protocol.c',
37     command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
38   )
39   libds_files += code
40
41   server_header = custom_target(
42     name.underscorify() + '_server_h',
43     input: path,
44     output: '@BASENAME@-server-protocol.h',
45     command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'],
46     build_by_default: false,
47   )
48   libds_files += server_header
49 endforeach
50
51 math = meson.get_compiler('c').find_library('m')
52 wayland_server = dependency('wayland-server', required: true)
53 pixman = dependency('pixman-1', required: true)
54 libdrm = dependency('libdrm', required: true)
55 libtbm = dependency('libtbm', required: true)
56
57 libds_deps = [
58   math,
59   wayland_server,
60   pixman,
61   libdrm,
62 ]
63
64 subdir('backend')
65
66 lib_libds = shared_library('ds', libds_files,
67   dependencies: libds_deps,
68   include_directories: [ common_inc, include_directories('.') ],
69   version: meson.project_version(),
70   install: true
71 )
72
73 dep_libds = declare_dependency(
74   link_with: lib_libds,
75   dependencies: libds_deps,
76   include_directories: [ common_inc, include_directories('.') ],
77 )