2018-12-20 12:05:28 +00:00
|
|
|
# -*- mode: python; -*-
|
2017-03-20 19:55:40 +00:00
|
|
|
|
2018-12-20 12:05:28 +00:00
|
|
|
project(
|
|
|
|
'tinyendian',
|
|
|
|
'd',
|
|
|
|
meson_version: '>=0.41',
|
|
|
|
version: '0.2.0',
|
|
|
|
default_options: ['buildtype=release'],
|
|
|
|
)
|
2017-03-20 19:55:40 +00:00
|
|
|
|
|
|
|
src_dir = include_directories('source/')
|
|
|
|
pkgc = import('pkgconfig')
|
|
|
|
|
|
|
|
tinyendian_src = [
|
|
|
|
'source/tinyendian.d'
|
|
|
|
]
|
2018-12-20 12:05:28 +00:00
|
|
|
|
2017-03-20 19:55:40 +00:00
|
|
|
install_headers(tinyendian_src, subdir: 'd/')
|
|
|
|
|
2018-12-20 12:05:28 +00:00
|
|
|
tinyendian_lib = library(
|
|
|
|
meson.project_name(),
|
|
|
|
[tinyendian_src],
|
|
|
|
include_directories: [src_dir],
|
|
|
|
version: meson.project_version(),
|
|
|
|
pic: true,
|
|
|
|
install: true,
|
2017-03-20 19:55:40 +00:00
|
|
|
)
|
2018-12-20 12:05:28 +00:00
|
|
|
|
|
|
|
pkgc.generate(
|
|
|
|
name: meson.project_name(),
|
|
|
|
libraries: tinyendian_lib,
|
|
|
|
subdirs: 'd/',
|
|
|
|
version: meson.project_version(),
|
|
|
|
description: 'Lightweight endianness library for D.'
|
2017-03-20 19:55:40 +00:00
|
|
|
)
|
2018-03-04 20:44:46 +00:00
|
|
|
|
|
|
|
# Make Tinyendian easy to use as subproject
|
|
|
|
tinyendian_dep = declare_dependency(
|
|
|
|
link_with: tinyendian_lib,
|
|
|
|
include_directories: [src_dir]
|
|
|
|
)
|