wayland/meson.build

141 lines
3.6 KiB
Meson
Raw Normal View History

Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
project(
'wayland', 'c',
version: '1.22.90',
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
license: 'MIT',
meson_version: '>= 0.56.0',
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
default_options: [
'warning_level=2',
'buildtype=debugoptimized',
'c_std=c99',
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
]
)
wayland_version = meson.project_version().split('.')
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
config_h = configuration_data()
config_h.set_quoted('PACKAGE', meson.project_name())
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
cc_args = []
if host_machine.system() != 'freebsd'
cc_args += ['-D_POSIX_C_SOURCE=200809L']
endif
add_project_arguments(cc_args, language: 'c')
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
compiler_flags = [
'-Wno-unused-parameter',
'-Wstrict-prototypes',
'-Wmissing-prototypes',
'-fvisibility=hidden',
]
cc = meson.get_compiler('c')
add_project_arguments(
cc.get_supported_arguments(compiler_flags),
language: 'c'
)
foreach h: [ 'sys/prctl.h', 'sys/procctl.h', 'sys/ucred.h' ]
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
config_h.set('HAVE_' + h.underscorify().to_upper(), cc.has_header(h))
endforeach
have_funcs = [
'accept4',
'mkostemp',
'posix_fallocate',
'prctl',
'memfd_create',
'mremap',
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
'strndup',
]
foreach f: have_funcs
config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f))
endforeach
config_h.set10('HAVE_XUCRED_CR_PID', cc.has_member('struct xucred', 'cr_pid', prefix : '#include <sys/ucred.h>'))
have_broken_msg_cmsg_cloexec = false
if host_machine.system() == 'freebsd'
have_broken_msg_cmsg_cloexec = not cc.compiles('''
#include <sys/param.h> /* To get __FreeBSD_version. */
#if __FreeBSD_version < 1300502 || \
(__FreeBSD_version >= 1400000 && __FreeBSD_version < 1400006)
/*
* FreeBSD had a broken implementation of MSG_CMSG_CLOEXEC between 2015 and
* 2021. Check if we are compiling against a version that includes the fix
* (https://cgit.freebsd.org/src/commit/?id=6ceacebdf52211).
*/
#error "Broken MSG_CMSG_CLOEXEC"
#endif
''', name : 'MSG_CMSG_CLOEXEC works correctly')
endif
config_h.set10('HAVE_BROKEN_MSG_CMSG_CLOEXEC', have_broken_msg_cmsg_cloexec)
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
if get_option('libraries')
if host_machine.system() == 'freebsd'
# When building for FreeBSD, epoll(7) is provided by a userspace
# wrapper around kqueue(2).
epoll_dep = dependency('epoll-shim')
else
# Otherwise, assume that epoll(7) is supported natively.
epoll_dep = []
endif
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
ffi_dep = dependency('libffi')
decls = [
{ 'header': 'sys/signalfd.h', 'symbol': 'SFD_CLOEXEC' },
{ 'header': 'sys/timerfd.h', 'symbol': 'TFD_CLOEXEC' },
{ 'header': 'time.h', 'symbol': 'CLOCK_MONOTONIC' },
]
foreach d: decls
if not cc.has_header_symbol(d['header'], d['symbol'], dependencies: epoll_dep, args: cc_args)
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
error('@0@ is needed to compile Wayland libraries'.format(d['symbol']))
endif
endforeach
rt_dep = []
if not cc.has_function('clock_gettime', prefix: '#include <time.h>')
rt_dep = cc.find_library('rt')
if not cc.has_function('clock_gettime', prefix: '#include <time.h>', dependencies: rt_dep, args: cc_args)
error('clock_gettime not found')
endif
endif
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
endif
configure_file(
output: 'config.h',
configuration: config_h,
)
pkgconfig = import('pkgconfig')
wayland_protocol_xml = files('protocol/wayland.xml')
root_inc = include_directories('.')
protocol_inc = include_directories('protocol')
src_inc = include_directories('src')
subdir('src')
if get_option('libraries')
subdir('cursor')
subdir('egl')
endif
if get_option('tests')
subdir('tests')
endif
if get_option('documentation')
subdir('doc')
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
endif
if get_option('scanner')
install_data([
'wayland-scanner.mk',
'protocol/wayland.xml',
'protocol/wayland.dtd',
])
install_data(
[ 'wayland-scanner.m4' ],
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'aclocal'),
)
Add Meson build Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>
2018-04-23 21:29:16 +08:00
endif