From 503412b02356cd0dd92f0fc0900f48eab3afce24 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 7 Feb 2020 10:52:16 -0500 Subject: meson build --- subprojects/tinyendian/.gitignore | 4 ++++ subprojects/tinyendian/dub.json | 16 +++++++++++++++ subprojects/tinyendian/meson.build | 41 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 subprojects/tinyendian/.gitignore create mode 100644 subprojects/tinyendian/dub.json create mode 100644 subprojects/tinyendian/meson.build (limited to 'subprojects/tinyendian') diff --git a/subprojects/tinyendian/.gitignore b/subprojects/tinyendian/.gitignore new file mode 100644 index 0000000..0ed3f58 --- /dev/null +++ b/subprojects/tinyendian/.gitignore @@ -0,0 +1,4 @@ +.dub +*.o +*.a +*.lib diff --git a/subprojects/tinyendian/dub.json b/subprojects/tinyendian/dub.json new file mode 100644 index 0000000..6313cdd --- /dev/null +++ b/subprojects/tinyendian/dub.json @@ -0,0 +1,16 @@ +{ + "name": "tinyendian", + "description": "Lightweight endianness handling library", + "authors": [ "Ferdinand Majerech" ], + "importPaths": ["source"], + "license": "Boost 1.0", + "homepage": "https://github.com/kiith-sa/tinyendian", + "copyright": "Copyright © 2014, Ferdinand Majerech", + + "buildTypes": + { + "debug": { "buildOptions": ["debugMode", "debugInfoC"] }, + "release": { "buildOptions": ["releaseMode", "optimize", "inline", "noBoundsCheck"] }, + "profile": { "buildOptions": ["releaseMode", "optimize", "noBoundsCheck", "debugInfoC"] }, + }, +} diff --git a/subprojects/tinyendian/meson.build b/subprojects/tinyendian/meson.build new file mode 100644 index 0000000..f666958 --- /dev/null +++ b/subprojects/tinyendian/meson.build @@ -0,0 +1,41 @@ +# -*- mode: python; -*- + +project( + 'tinyendian', + 'd', + meson_version: '>=0.41', + version: '0.2.0', + default_options: ['buildtype=release'], +) + +src_dir = include_directories('source/') +pkgc = import('pkgconfig') + +tinyendian_src = [ + 'source/tinyendian.d' +] + +install_headers(tinyendian_src, subdir: 'd/') + +tinyendian_lib = library( + meson.project_name(), + [tinyendian_src], + include_directories: [src_dir], + version: meson.project_version(), + pic: true, + install: true, +) + +pkgc.generate( + name: meson.project_name(), + libraries: tinyendian_lib, + subdirs: 'd/', + version: meson.project_version(), + description: 'Lightweight endianness library for D.' +) + +# Make Tinyendian easy to use as subproject +tinyendian_dep = declare_dependency( + link_with: tinyendian_lib, + include_directories: [src_dir] +) -- cgit v1.2.3