shell: implement wl_shell_interface
[platform/core/uifw/libds-tizen.git] / src / libds / meson.build
1 libds_files = [
2   'log.c',
3   'addon.c',
4   'buffer.c',
5   'allocator.c',
6   'swapchain.c',
7   'output.c',
8   'compositor.c',
9   'subcompositor.c',
10   'region.c',
11   'util/time.c',
12   'util/shm.c',
13   'surface/surface.c',
14   'surface/subsurface.c',
15   'client_buffer/shm_client_buffer.c',
16   'xdg_shell/xdg_shell.c',
17   'xdg_shell/xdg_surface.c',
18   'xdg_shell/xdg_toplevel.c',
19   'pixel_format.c',
20   'backend.c',
21   'input_device.c',
22   'pointer.c',
23   'keyboard.c',
24   'touch.c',
25   'seat/seat.c',
26   'seat/seat_pointer.c',
27   'seat/seat_keyboard.c',
28   'seat/seat_touch.c',
29   'shell.c',
30   'shell_surface.c',
31 ]
32
33 protocols = {
34   'xdg-shell': wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml',
35 }
36
37 protocols_code = {}
38 protocols_server_header = {}
39
40 foreach name, path : protocols
41   code = custom_target(
42     name.underscorify() + '_c',
43     input: path,
44     output: '@BASENAME@-protocol.c',
45     command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
46   )
47   libds_files += code
48
49   server_header = custom_target(
50     name.underscorify() + '_server_h',
51     input: path,
52     output: '@BASENAME@-server-protocol.h',
53     command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'],
54     build_by_default: false,
55   )
56   libds_files += server_header
57 endforeach
58
59 math = meson.get_compiler('c').find_library('m')
60 wayland_server = dependency('wayland-server', required: true)
61 pixman = dependency('pixman-1', required: true)
62 libdrm = dependency('libdrm', required: true)
63 xkbcommon = dependency('xkbcommon', required: true)
64 rt = meson.get_compiler('c').find_library('rt')
65
66 if wayland_server.version().version_compare('>= 1.19')
67   cdata.set('HAVE_WL_SEAT_ERROR_MISSING_CAPABILITY', '1')
68 endif
69
70 libds_deps = [
71   math,
72   wayland_server,
73   pixman,
74   libdrm,
75   xkbcommon,
76   rt,
77 ]
78
79 subdir('backend')
80 subdir('allocator')
81
82 lib_libds = shared_library('ds', libds_files,
83   dependencies: libds_deps,
84   include_directories: [ common_inc, include_directories('.') ],
85   version: meson.project_version(),
86   install: true
87 )
88
89 dep_libds = declare_dependency(
90   link_with: lib_libds,
91   dependencies: libds_deps,
92   include_directories: [ common_inc, include_directories('.') ],
93 )
94
95 pkgconfig = import('pkgconfig')
96 pkgconfig.generate(lib_libds,
97   version: meson.project_version(),
98   filebase: meson.project_name(),
99   name: meson.project_name(),
100   description: 'Wayland compositor library',
101 )