File: meson.build

package info (click to toggle)
keyman 18.0.246-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,316 kB
  • sloc: python: 52,784; cpp: 21,289; sh: 7,633; ansic: 4,823; xml: 3,617; perl: 959; makefile: 139; javascript: 138
file content (46 lines) | stat: -rw-r--r-- 1,567 bytes parent folder | download | duplicates (2)
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
44
45
46
# Copyright:    © 2018-2022 SIL International.
# Description:  Cross platform build script to compile libkeymancore, documentation
#               and tests.
# Create Date:  2 Oct 2018
# Authors:      Tim Eves (TSE)
#

project('keyman_core', 'cpp', 'c',
        version: run_command(find_program('getversion.bat', 'getversion.sh'), check:true).stdout().strip(),
        license: 'MIT',
        default_options : ['buildtype=release',
                           'cpp_std=c++17',
                           'b_vscrt=static_from_buildtype',
                           'warning_level=2',
                           'debug=true'],
        meson_version: '>=1.0')

# Import our standard compiler defines; this is copied from
# /resources/build/standard.meson.build by build.sh, because
# meson doesn't allow us to reference a file outside its root
subdir('resources')

fs = import('fs')
lib_version = fs.read('CORE_API_VERSION.md').strip()

py = import('python')
python = py.find_installation()

# TODO: Shared includes may use namespaces, etc which need future tidyup.
# For now, we use KM_CORE_LIBRARY to inject the km::core::kmx namespace
defns += ['-DKM_CORE_LIBRARY']

# #define DEBUG when we are on a debug build
if get_option('buildtype') == 'debug'
  add_global_arguments('-DDEBUG', language : 'cpp')
endif

# shared with a number of subdirs
if cpp_compiler.get_id() == 'emscripten'
  wasm_exported_runtime_methods = '-sEXPORTED_RUNTIME_METHODS=[\'UTF8ToString\',\'stringToNewUTF8\']'
endif

subdir('docs/internal')
subdir('include')
subdir('src')
subdir('tests')