Files
cxxopts/meson_options.txt
Dylan Baker 0f1c5a0a79 Add Meson buildsystem support (#424)
* meson: Add a Meson based build system

This is primarily intended to be useful for projects using Meson wishing
to consume cxxopts as a subproject. By hosting the files upstream users
get the benefit of automatic parity with the CMake based install
provided by an OS vendor or distribution.

The implementation attempts to mirror the CMake build as much as
possible, with the exception of generating the cmake-config files, which
Meson doesn't currently support. It uses a small python script to parse
the cxxopts.hpp header to extract the version, due to a concious design
decision of Meson to leave such complex logic to external scripting
languages like Python.

* CI: add basic Meson testing

I've tried to be a bit more minimal here than the CMake tests are, since
there's already a good cross section of testing there. For Meson, I just
want to touch test each of the major platforms to ensure that it works
2026-01-12 18:00:29 +11:00

42 lines
1.6 KiB
Meson

# Copyright © 2024-2026 Dylan Baker
#
# 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.
option(
'examples',
type : 'feature',
description : 'Whether to build examples. Defaults to enabled when not built as a subproject, otherwise disabled.',
)
option(
'tests',
type : 'feature',
description : 'Whether to build tests. Defaults to enabled when not built as a subproject, otherwise disabled.',
)
option(
'warnings',
type : 'feature',
description : 'Whether to add additional warnings. Defaults to enabled when not built as a subproject, otherwise disabled.',
)
option(
'icu',
type : 'feature',
value : 'disabled',
description : 'use ICU Unicode library.',
)