X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=meson.build;h=6a79093cb0822ba933d47e7663901e56b969e981;hb=e7f02d322a529c100764808a54447b26320dbe5f;hp=6fe391b5824a70bba615d38e78525266fb85c639;hpb=e5444f41954ad4c58878e0eaf2fb8270aefa1126;p=platform%2Fupstream%2Flibxkbcommon.git diff --git a/meson.build b/meson.build index 6fe391b..6a79093 100644 --- a/meson.build +++ b/meson.build @@ -1,13 +1,13 @@ project( 'libxkbcommon', 'c', - version: '1.4.1', + version: '1.5.0', default_options: [ 'c_std=c11', 'warning_level=2', 'b_lundef=true', ], - meson_version : '>= 0.51.0', + meson_version : '>= 0.52.0', ) pkgconfig = import('pkgconfig') cc = meson.get_compiler('c') @@ -154,8 +154,9 @@ map_to_def = find_program('scripts/map-to-def') # libxkbcommon. # Note: we use some yacc extensions, which work with either GNU bison # (preferred) or byacc (with backtracking enabled). -bison = find_program('bison', 'win_bison', required: false) +bison = find_program('bison', 'win_bison', required: false, version: '>= 2.3a') if bison.found() + yacc = bison yacc_gen = generator( bison, output: ['@BASENAME@.c', '@BASENAME@.h'], @@ -164,6 +165,7 @@ if bison.found() else byacc = find_program('byacc', required: false) if byacc.found() + yacc = byacc yacc_gen = generator( byacc, output: ['@BASENAME@.c', '@BASENAME@.h'], @@ -266,6 +268,9 @@ dep_libxkbcommon = declare_dependency( link_with: libxkbcommon, include_directories: include_directories('include'), ) +if meson.version().version_compare('>= 0.54.0') + meson.override_dependency('xkbcommon', dep_libxkbcommon) +endif pkgconfig.generate( libxkbcommon, name: 'xkbcommon', @@ -334,6 +339,9 @@ You can disable X11 support with -Denable-x11=false.''') link_with: libxkbcommon_x11, include_directories: include_directories('include'), ) + if meson.version().version_compare('>= 0.54.0') + meson.override_dependency('xkbcommon-x11', dep_libxkbcommon_x11) + endif pkgconfig.generate( libxkbcommon_x11, name: 'xkbcommon-x11', @@ -398,6 +406,9 @@ if get_option('enable-xkbregistry') link_with: libxkbregistry, include_directories: include_directories('include'), ) + if meson.version().version_compare('>= 0.54.0') + meson.override_dependency('xkbregistry', dep_libxkbregistry) + endif endif man_pages = [] @@ -414,6 +425,7 @@ if build_tools tools_dep = declare_dependency( include_directories: [include_directories('tools', 'include')], link_with: libxkbcommon_tools_internal, + dependencies: dep_libxkbcommon, ) executable('xkbcli', 'tools/xkbcli.c', @@ -486,7 +498,7 @@ You can disable the Wayland xkbcli programs with -Denable-wayland=false.''') wayland_scanner_code_gen = generator( wayland_scanner, output: '@BASENAME@-protocol.c', - arguments: ['code', '@INPUT@', '@OUTPUT@'], + arguments: ['private-code', '@INPUT@', '@OUTPUT@'], ) wayland_scanner_client_header_gen = generator( wayland_scanner, @@ -666,6 +678,11 @@ test( env: test_env, suite: ['python-tests'], ) +test( + 'modifiers', + executable('test-modifiers', 'test/modifiers.c', dependencies: test_dep), + env: test_env, +) if get_option('enable-x11') test( 'x11', @@ -775,16 +792,19 @@ You can disable the documentation with -Denable-docs=false.''') doxygen_input = [ 'README.md', + 'doc/diagrams/xkb-configuration.dot', 'doc/doxygen-extra.css', + 'doc/introduction-to-xkb.md', 'doc/quick-guide.md', - 'doc/compat.md', + 'doc/compatibility.md', 'doc/user-configuration.md', 'doc/rules-format.md', 'doc/keymap-format-text-v1.md', 'include/xkbcommon/xkbcommon.h', + 'include/xkbcommon/xkbcommon-compose.h', + 'include/xkbcommon/xkbcommon-keysyms.h', 'include/xkbcommon/xkbcommon-names.h', 'include/xkbcommon/xkbcommon-x11.h', - 'include/xkbcommon/xkbcommon-compose.h', 'include/xkbcommon/xkbregistry.h', ] doxygen_data = configuration_data() @@ -799,15 +819,36 @@ You can disable the documentation with -Denable-docs=false.''') ) # TODO: Meson should provide this. docdir = get_option('datadir')/'doc'/meson.project_name() - custom_target( + doc_gen = custom_target( 'doc', input: [doxyfile] + doxygen_input, output: 'html', - command: [doxygen_wrapper, doxygen, meson.current_build_dir()/'Doxyfile', meson.current_source_dir()], + command: [ + doxygen_wrapper, + doxygen, + meson.current_build_dir()/'Doxyfile', + meson.current_source_dir(), + ], install: true, install_dir: docdir, build_by_default: true, ) + if get_option('enable-cool-uris') + ensure_stable_urls = find_program('scripts'/'ensure-stable-doc-urls.py') + custom_target( + 'doc-cool-uris', + input: [doc_gen, 'doc'/'cool-uris.yaml'], + output: 'html-xtra', + command: [ + ensure_stable_urls, + 'generate-redirections', + meson.current_source_dir()/'doc'/'cool-uris.yaml', + meson.current_build_dir()/'html' + ], + install: false, + build_by_default: true, + ) + endif endif configure_file(output: 'config.h', configuration: configh_data) @@ -822,3 +863,35 @@ endif if get_option('enable-xkbregistry') libxkbregistry_dep = dep_libxkbregistry endif + +if meson.version().version_compare('>=0.62.0') + summary({ + 'backend': meson.backend(), + 'buildtype': get_option('buildtype'), + 'c_args': get_option('c_args'), + 'c_link_args': get_option('c_link_args'), + 'yacc': yacc.full_path() + ' ' + yacc.version(), + }, section: 'Compiler') + summary({ + 'prefix': get_option('prefix'), + 'bindir': get_option('bindir'), + 'libdir': get_option('libdir'), + 'datadir': get_option('datadir'), + 'xkb-config-root': XKBCONFIGROOT, + 'xkb-config-extra-path': XKBCONFIGEXTRAPATH, + 'xlocaledir': XLOCALEDIR, + }, section: 'Directories') + summary({ + 'docs': get_option('enable-docs'), + 'tools': get_option('enable-tools'), + 'wayland': get_option('enable-wayland'), + 'x11': get_option('enable-x11'), + }, section: 'Features') + summary({ + 'layout': get_option('default-layout'), + 'model': get_option('default-model'), + 'options': get_option('default-options'), + 'rules': get_option('default-rules'), + 'variant': get_option('default-variant'), + }, section: 'Defaults') +endif