diff --git a/LICENSE.build b/LICENSE.build deleted file mode 100644 index 1a3d60c..0000000 --- a/LICENSE.build +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2019 The Meson development team - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..0021ae8 --- /dev/null +++ b/meson.build @@ -0,0 +1,28 @@ +project('xtl', 'cpp', version:'0.6.12', license:'BSD-3-Clause', default_options : ['warning_level=3', 'cpp_std=c++14']) + +json_dep = dependency('nlohmann_json', + version:'>=3.1.1', + fallback : ['nlohmann_json', 'nlohmann_json_dep'], + required: false) + +xtl_dep = declare_dependency( + include_directories:include_directories('include', is_system: true), + dependencies: [json_dep]) + +extra_cflags = [] + +# Workaround from mesonbuild/meson github issue 2550 +if meson.is_subproject() + install_dir = get_option('subproj_includedir') + extra_cflags += '-I' + get_option('prefix') / install_dir +else + install_dir = get_option('includedir') +endif + +install_subdir('include/xtl', install_dir: install_dir) + +pkgconfig = import('pkgconfig') +pkgconfig.generate(name: meson.project_name(), + version: meson.project_version(), + description: 'Basic tools (containers, algorithms) used by other quantstack packages.', + extra_cflags: extra_cflags) diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..9aa6496 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,5 @@ +option('subproj_includedir', + type: 'string', + value: 'include', + description: 'Header file directory when built as subproject', + yield: true) diff --git a/upstream.wrap b/upstream.wrap new file mode 100644 index 0000000..54ce5e0 --- /dev/null +++ b/upstream.wrap @@ -0,0 +1,6 @@ +[wrap-file] +directory=xtl-0.6.12 + +source_url=https://github.com/xtensor-stack/xtl/archive/0.6.12.zip +source_filename=xtl-0.6.12.zip +source_hash=4ad3204312f72bce52951fb69acd1cd09e7f20f52c7e3b684140a4484acb5597