"Fossies" - the Fresh Open Source Software Archive

Member "wayland-1.18.0/meson.build" (11 Feb 2020, 2100 Bytes) of package /linux/misc/wayland-1.18.0.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 project(
    2 	'wayland', 'c', 'cpp',
    3 	version: '1.18.0',
    4 	license: 'MIT',
    5 	meson_version: '>= 0.47.0',
    6 	default_options: [
    7 		'warning_level=2',
    8 		'buildtype=debugoptimized'
    9 	]
   10 )
   11 
   12 config_h = configuration_data()
   13 config_h.set_quoted('PACKAGE', meson.project_name())
   14 config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
   15 
   16 compiler_flags = [
   17 	'-Wno-unused-parameter',
   18 	'-Wstrict-prototypes',
   19 	'-Wmissing-prototypes',
   20 	'-fvisibility=hidden',
   21 ]
   22 
   23 cc = meson.get_compiler('c')
   24 add_project_arguments(
   25 	cc.get_supported_arguments(compiler_flags),
   26 	language: 'c'
   27 )
   28 
   29 foreach h: [ 'sys/prctl.h' ]
   30 	config_h.set('HAVE_' + h.underscorify().to_upper(), cc.has_header(h))
   31 endforeach
   32 
   33 have_funcs = [
   34 	'accept4',
   35 	'mkostemp',
   36 	'posix_fallocate',
   37 	'prctl',
   38 	'memfd_create',
   39 	'strndup',
   40 ]
   41 foreach f: have_funcs
   42 	config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f))
   43 endforeach
   44 
   45 if get_option('libraries')
   46 	ffi_dep = dependency('libffi')
   47 
   48 	decls = [
   49 		{ 'header': 'sys/signalfd.h', 'symbol': 'SFD_CLOEXEC' },
   50 		{ 'header': 'sys/timerfd.h', 'symbol': 'TFD_CLOEXEC' },
   51 		{ 'header': 'time.h', 'symbol': 'CLOCK_MONOTONIC' },
   52 	]
   53 
   54 	foreach d: decls
   55 		if not cc.has_header_symbol(d['header'], d['symbol'])
   56 			error('@0@ is needed to compile Wayland libraries'.format(d['symbol']))
   57 		endif
   58 	endforeach
   59 endif
   60 
   61 scanner_deps = [ dependency('expat') ]
   62 
   63 if get_option('dtd_validation')
   64 	scanner_deps += dependency('libxml-2.0')
   65 	config_h.set('HAVE_LIBXML', 1)
   66 endif
   67 
   68 configure_file(
   69 	output: 'config.h',
   70 	configuration: config_h,
   71 )
   72 
   73 pkgconfig = import('pkgconfig')
   74 
   75 wayland_protocol_xml = files('protocol/wayland.xml')
   76 
   77 root_inc = include_directories('.')
   78 protocol_inc = include_directories('protocol')
   79 src_inc = include_directories('src')
   80 
   81 subdir('src')
   82 
   83 if get_option('libraries')
   84 	subdir('cursor')
   85 	subdir('egl')
   86 	subdir('tests')
   87 endif
   88 
   89 if get_option('documentation')
   90 	subdir('doc')
   91 endif
   92 
   93 install_data([
   94 	'wayland-scanner.mk',
   95 	'protocol/wayland.xml',
   96 	'protocol/wayland.dtd',
   97 ])
   98 
   99 install_data(
  100 	[ 'wayland-scanner.m4' ],
  101 	install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'aclocal'),
  102 )