1if with_tools
2  executable('intel-virtual-output',
3	     sources : 'virtual.c',
4	     dependencies : [
5	       dependency('x11', required : true),
6	       dependency('xext', required : true),
7	       dependency('xfixes', required : true),
8	       dependency('xrender', required : true),
9	       dependency('xdamage', required : true),
10	       dependency('xrandr', required : true),
11	       dependency('xrender', required : true),
12	       dependency('xcursor', required : true),
13	       dependency('xscrnsaver', required : true),
14	       dependency('xinerama', required : true),
15	       dependency('xtst', required : true),
16	       dependency('pixman-1', required : true),
17	     ],
18	     c_args : [
19	       '-Wno-unused-parameter',
20	       '-Wno-sign-compare',
21	     ],
22	     install : true)
23
24  configure_file(input : 'intel-virtual-output.man',
25		 output : 'intel-virtual-output.4',
26		 command : [
27		 'sed',
28		 '-e',
29		 's/__appmansuffix__/@0@/g'.format(man_config.get('appmansuffix')),
30		 '-e',
31		 's/__filemansuffix__/@0@/g'.format(man_config.get('filemansuffix')),
32		 '-e',
33		 's/__drivermansuffix__/@0@/g'.format(man_config.get('drivermansuffix')),
34		 '-e',
35		 's/__miscmansuffix__/@0@/g'.format(man_config.get('miscmansuffix')),
36		 '-e',
37		 's/__xservername__/@0@/g'.format(man_config.get('xservername')),
38		 '-e',
39		 's/__xconfigfile__/@0@/g'.format(man_config.get('xconfigfile')),
40		 '-e',
41		 's/__vendorversion__/@0@/g'.format(man_config.get('vendorversion')),
42		 '@INPUT@'
43	       ],
44	       capture : true,
45	       install_dir: join_paths(get_option('mandir'), 'man4'),
46	       install : true)
47
48  executable('cursor',
49	     sources : 'cursor.c',
50	     dependencies : [
51	       dependency('x11', required : true),
52	       dependency('xfixes', required : true),
53	       dependency('libpng', required : true),
54	     ],
55	     c_args : [
56	       '-Wno-unused-parameter',
57	     ],
58	     install : false)
59endif
60
61if with_tools and with_dri3
62  executable('dri3info',
63	     sources : 'dri3info.c',
64	     dependencies : [
65	       dependency('x11-xcb', required : true),
66	       dependency('xcb-dri3', required : true),
67	       dependency('x11', required : true),
68	       dependency('xrandr', required : true),
69	       dependency('xxf86vm', required : true),
70	       dependency('dri3proto', required : true),
71	       dependency('dri', required : true),
72	       dependency('libdrm', required : true),
73	     ],
74	     install : false)
75endif
76
77if with_backlight_helper
78  executable('xf86-video-intel-backlight-helper',
79	     sources : 'backlight_helper.c',
80	     install_dir : get_option('libexecdir'),
81	     install_mode : [ 'rws--x--x', 'root', 'root' ],
82	     c_args : [
83	       '-DMAJOR_IN_SYSMACROS',
84	       '-Wno-sign-compare',
85	     ],
86	     install : true)
87
88  polkit_config = configuration_data()
89  polkit_config.set('LIBEXEC_PATH',
90		    join_paths(get_option('prefix'),
91			       get_option('libexecdir')))
92
93  configure_file(input : 'org.x.xf86-video-intel.backlight-helper.policy.in',
94		 output : 'org.x.xf86-video-intel.backlight-helper.policy',
95		 configuration : polkit_config,
96		 install_dir : join_paths(get_option('datadir'), 'polkit-1/actions'),
97		 install : true)
98endif
99