meson.build (4989B)
1 xorg_inc = include_directories( 2 'common', 3 'ddc', 4 'dri2', 5 'i2c', 6 'int10', 7 'loader', 8 'modes', 9 'os-support', 10 'os-support/bus', 11 'parser', 12 'ramdac', 13 'vgahw', 14 ) 15 16 xorg_c_args = [] 17 xorg_c_args += '-DHAVE_XORG_CONFIG_H' 18 xorg_c_args += '-DXORG_NO_SDKSYMS' 19 20 pciaccess_dep = [] 21 if get_option('pciaccess') 22 pciaccess_dep = dependency('pciaccess', version: '>= 0.12.901') 23 endif 24 25 # subdirs for convenience libraries statically linked into Xorg 26 subdir('common') 27 subdir('ddc') 28 if build_dri1 29 subdir('dri') 30 endif 31 if build_dri2 32 subdir('dri2') 33 endif 34 subdir('i2c') 35 subdir('loader') 36 subdir('modes') 37 subdir('os-support') 38 subdir('parser') 39 subdir('ramdac') 40 subdir('xkb') 41 42 srcs_xorg = [ 43 '../../mi/miinitext.c', 44 '../../mi/miinitext.h', 45 ] 46 47 # Extract all the objects so that all symbols get brought into the 48 # server. This prevents us from needing a global table of all symbols 49 # that should be exported to Xorg modules, at the expense of all 50 # symbols being included and public 51 52 xorg_link = [ 53 libxserver, 54 libglxvnd, 55 xorg_common, 56 xorg_loader, 57 xorg_ddc, 58 xorg_xkb, 59 xorg_i2c, 60 xorg_modes, 61 xorg_os_support, 62 xorg_parser, 63 xorg_ramdac, 64 libxserver_fb, 65 libxserver_xext_vidmode, 66 libxserver_main, 67 libxserver_config, 68 ] 69 if build_dri1 70 xorg_link += xorg_dri 71 endif 72 if build_dri2 73 xorg_link += xorg_dri2 74 endif 75 76 if host_machine.system() == 'cygwin' or host_machine.system() == 'windows' 77 linker_export_flags = '-Wl,--export-all-symbols' 78 elif host_machine.system() == 'sunos' 79 linker_export_flags = [] 80 else 81 linker_export_flags = '-Wl,--export-dynamic' 82 endif 83 84 xorg_deps = [ 85 pixman_dep, 86 m_dep, 87 dl_dep, 88 pciaccess_dep, 89 sha1_dep, 90 dependency('xau'), 91 xdmcp_dep, 92 xfont2_dep, 93 xshmfence_dep, 94 config_dep, 95 libdrm_dep, 96 ] 97 98 if get_option('suid_wrapper') 99 xorg_install_dir = get_option('libexecdir') 100 else 101 xorg_install_dir = get_option('bindir') 102 endif 103 104 e = executable( 105 'Xorg', 106 srcs_xorg, 107 include_directories: [inc, xorg_inc], 108 link_whole: xorg_link, 109 dependencies: xorg_deps, 110 link_args: linker_export_flags, 111 c_args: xorg_c_args, 112 install: true, 113 install_dir: xorg_install_dir, 114 implib: true, 115 ) 116 117 # subdirs for modules loadable by Xorg 118 subdir('dixmods') 119 subdir('exa') 120 subdir('fbdevhw') 121 if gbm_dep.found() 122 subdir('glamor_egl') 123 endif 124 if int10 != 'false' 125 if int10 == 'x86emu' 126 subdir('x86emu') 127 endif 128 subdir('int10') 129 endif 130 subdir('shadowfb') 131 if build_vgahw 132 subdir('vgahw') 133 endif 134 if build_modesetting 135 subdir('drivers/modesetting') 136 endif 137 if get_option('xf86-input-inputtest') 138 subdir('drivers/inputtest') 139 endif 140 141 meson.add_install_script( 142 'sh', '-c', 143 'ln -fs Xorg @0@@1@'.format( 144 '${DESTDIR}', 145 join_paths(get_option('prefix'), get_option('bindir'), 'X'))) 146 147 if get_option('suid_wrapper') 148 executable('Xorg.wrap', 149 'xorg-wrapper.c', 150 include_directories: [inc, xorg_inc], 151 dependencies: xorg_deps, 152 c_args: xorg_c_args, 153 install: true, 154 install_dir: get_option('libexecdir'), 155 install_mode: ['r-sr-xr-x', 0, 0], 156 ) 157 158 # meson gets confused when there are two targets of the same name 159 # within the same directory, so we use a different intermediate name. 160 xorg_sh = configure_file( 161 input: 'Xorg.sh.in', 162 output: 'Xorg.sh', 163 configuration: conf_data, 164 ) 165 166 install_data( 167 xorg_sh, 168 install_mode: 'rwxr-xr-x', 169 install_dir: join_paths(get_option('prefix'), get_option('bindir')), 170 rename: ['Xorg'] 171 ) 172 endif 173 174 executable('gtf', 175 'utils/gtf/gtf.c', 176 include_directories: [inc, xorg_inc], 177 dependencies: xorg_deps, 178 c_args: xorg_c_args, 179 install: true, 180 ) 181 182 # For symbol presence testing only 183 xorgserver_lib = shared_library( 184 'xorgserver', 185 srcs_xorg, 186 include_directories: [inc, xorg_inc], 187 link_whole: xorg_link, 188 dependencies: xorg_deps, 189 link_args: linker_export_flags, 190 c_args: xorg_c_args, 191 install: false, 192 ) 193 194 xorgserver_dep = declare_dependency(link_with: xorgserver_lib) 195 196 install_man(configure_file( 197 input: 'man/Xorg.man', 198 output: 'Xorg.1', 199 configuration: manpage_config, 200 )) 201 202 if get_option('suid_wrapper') 203 install_man(configure_file( 204 input: 'man/Xorg.wrap.man', 205 output: 'Xorg.wrap.1', 206 configuration: manpage_config, 207 )) 208 209 install_man(configure_file( 210 input: 'man/Xwrapper.config.man', 211 output: 'Xwrapper.config.5', 212 configuration: manpage_config, 213 )) 214 endif 215 216 install_man(configure_file( 217 input: 'man/xorg.conf.man', 218 output: 'xorg.conf.5', 219 configuration: manpage_config, 220 )) 221 222 install_man(configure_file( 223 input: 'man/xorg.conf.d.man', 224 output: 'xorg.conf.d.5', 225 configuration: manpage_config, 226 )) 227 228 install_man(configure_file( 229 input: 'utils/man/gtf.man', 230 output: 'gtf.1', 231 configuration: manpage_config, 232 )) 233 234 subdir('doc')