aboutsummaryrefslogtreecommitdiff
path: root/contrib/meson/meson/contrib/gen_manual/meson.build
blob: a872bd6cea354d5ad5dc3a8c5ea6ec4ae1a15308 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# #############################################################################
# Copyright (c) 2018-present    lzutao <taolzu(at)gmail.com>
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory of this source tree) and the GPLv2 (found
# in the COPYING file in the root directory of this source tree).
# #############################################################################

lz4_root_dir = '../../../../..'

add_languages('cpp')
cxx = meson.get_compiler('cpp')

gen_manual_includes = include_directories(join_paths(lz4_root_dir, 'contrib/gen_manual'))

gen_manual_cppflags = cxx.get_supported_arguments(['-Wextra', '-Wcast-qual',
  '-Wcast-align', '-Wshadow', '-Wstrict-aliasing=1', '-Wswitch-enum',
  '-Wno-comment'])

gen_manual = executable('gen_manual',
  join_paths(lz4_root_dir, 'contrib/gen_manual/gen_manual.cpp'),
  cpp_args: gen_manual_cppflags,
  include_directories: gen_manual_includes,
  native: true,
  install: false)

# Update lz4 manual
lz4_manual_html = custom_target('lz4_manual.html',
  output : 'lz4_manual.html',
  command : [gen_manual,
    lz4_version,
    join_paths(meson.current_source_dir(), lz4_root_dir, 'lib/lz4.h'),
    '@OUTPUT@'],
  install : false)
# Update lz4frame manual
lz4_manual_html = custom_target('lz4frame_manual.html',
  output : 'lz4frame_manual.html',
  command : [gen_manual,
    lz4_version,
    join_paths(meson.current_source_dir(), lz4_root_dir, 'lib/lz4frame.h'),
    '@OUTPUT@'],
  install : false)