Add meson build system

Meson is a build system somewhat like cmake, but without all of the
rough edges. It supports many OSes, including all of the major ones, and
a large number of C++ compilers.

My interest isn't really in convincing people to use meson as the
default here, but meson provides a subproject mechanism that can fetch
external projects and build them along with the main project in a single
configure/compile invocation. This is extremely useful for platforms
that lack a (competent) package manager.

As far as I know the meson build does everything the cmake build does,
with one exception: generate the cmake config/version files. meson can
generate these files, but only in simple cases, and not when using
export targets like tinyxml2 does.
This commit is contained in:
Dylan Baker
2020-10-08 11:40:05 -07:00
parent 1aeb57d26b
commit c509d569c0
4 changed files with 166 additions and 3 deletions

28
meson_options.txt Normal file
View File

@@ -0,0 +1,28 @@
# Copyright © 2020 Dylan Baker
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any
# damages arising from the use of this software.
# Permission is granted to anyone to use this software for any
# purpose, including commercial applications, and to alter it and
# redistribute it freely, subject to the following restrictions:
# 1. The origin of this software must not be misrepresented; you must
# not claim that you wrote the original software. If you use this
# software in a product, an acknowledgment in the product documentation
# would be appreciated but is not required.
# 2. Altered source versions must be plainly marked as such, and
# must not be misrepresented as being the original software.
# 3. This notice may not be removed or altered from any source
# distribution.
option(
'tests',
type : 'boolean',
description : 'Enable unit tests',
value : true,
yield : true,
)