libostd/meson.build

53 lines
1.3 KiB
Meson
Raw Normal View History

project('libostd', ['cpp'],
version: '0.1.0',
2020-09-19 04:19:20 +02:00
default_options: ['buildtype=plain', 'cpp_std=c++17', 'warning_level=3'],
meson_version: '>=0.46'
)
dir_prefix = get_option('prefix')
dir_include = join_paths(dir_prefix, get_option('includedir'))
dir_data = join_paths(dir_prefix, get_option('datadir'))
dir_lib = join_paths(dir_prefix, get_option('libdir'))
dir_package_include = join_paths(dir_include, 'ostd')
unicode_data = join_paths('data', 'UnicodeData-11.0.txt')
libostd_includes = [include_directories('.')]
2020-09-19 04:16:26 +02:00
cxx = meson.get_compiler('cpp')
2020-09-19 04:19:20 +02:00
if get_option('buildtype') != 'plain'
if cxx.has_argument('-Wshadow')
add_global_arguments('-Wshadow', language: 'cpp')
endif
if cxx.has_argument('-Wold-style-cast')
add_global_arguments('-Wold-style-cast', language: 'cpp')
endif
endif
2020-09-19 04:16:26 +02:00
if cxx.has_argument('-fvisibility=hidden')
add_global_arguments('-fvisibility=hidden', language: 'cpp')
endif
subdir('src')
if get_option('build-tests')
subdir('tests')
endif
if get_option('build-examples')
subdir('examples')
endif
2018-10-28 01:41:45 +02:00
pkg = import('pkgconfig')
pkg.generate(
libraries: libostd_lib,
version: meson.project_version(),
name: 'libostd',
filebase: 'libostd',
url: 'https://git.octaforge.org/octaforge/libostd',
description: 'OctaForge C++ utility library'
)