mirror of
https://github.com/benhoyt/inih.git
synced 2025-02-05 07:08:23 +08:00
enable distro settings by default (#125)
* meson: enable distro settings by default Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com> * meson: add note about version in pkg-config file See also #123. Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
This commit is contained in:
parent
e192e47627
commit
98dafacc76
13
README.md
13
README.md
@ -132,13 +132,14 @@ Some differences between inih and Python's [ConfigParser](http://docs.python.org
|
|||||||
## Meson notes ##
|
## Meson notes ##
|
||||||
|
|
||||||
* The `meson.build` file is not required to use or compile inih, its main purpose is for distributions.
|
* The `meson.build` file is not required to use or compile inih, its main purpose is for distributions.
|
||||||
* By default Meson only creates a static library for inih, but Meson can be used to configure this behavior:
|
* By default Meson is set up for distro installation, but this behavior can be configured for embedded use cases:
|
||||||
* with `-Ddefault_library=shared` a shared library is build.
|
* with `-Ddefault_library=static` static libraries are built.
|
||||||
* with `-Ddistro_install=true` the library will be installed with the header and a pkg-config entry, you may want to set `-Ddefault_library=shared` when using this.
|
* with `-Ddistro_install=false` libraries, headers and pkg-config files won't be installed.
|
||||||
* with `-Dwith_INIReader` you can build (and install if selected) the C++ library.
|
* with `-Dwith_INIReader=false` you can disable building the C++ library.
|
||||||
* all compile-time options are implemented in Meson as well, you can take a look at [meson_options.txt](https://github.com/benhoyt/inih/blob/master/meson_options.txt) for their definition. These won't work if `distro_install` is set to `true`.
|
* All compile-time options are implemented in Meson as well, you can take a look at [meson_options.txt](https://github.com/benhoyt/inih/blob/master/meson_options.txt) for their definition. These won't work if `distro_install` is set to `true`.
|
||||||
* If you want to use inih for programs which may be shipped in a distro, consider linking against the shared libraries. The pkg-config entries are `inih` and `INIReader`.
|
* If you want to use inih for programs which may be shipped in a distro, consider linking against the shared libraries. The pkg-config entries are `inih` and `INIReader`.
|
||||||
* In case you use inih as a subproject, you can use the `inih_dep` and `INIReader_dep` dependency variables.
|
* In case you use inih as a Meson subproject, you can use the `inih_dep` and `INIReader_dep` dependency variables. You might want to set `default_library=static` and `distro_install=false` for the subproject. An official Wrap is provided on [WrapDB](https://wrapdb.mesonbuild.com/inih).
|
||||||
|
* For packagers: if you want to tag the version in the pkg-config file, you will need to do this downstream. Add `version : '<version_as_int>',` after the `license` tag in the `project()` function and `version : meson.project_version(),` after the `soversion` tag in both `library()` functions.
|
||||||
|
|
||||||
## Building from vcpkg ##
|
## Building from vcpkg ##
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
project('inih',
|
project('inih',
|
||||||
['c'],
|
['c'],
|
||||||
default_options : ['default_library=static'],
|
|
||||||
license : 'BSD-3-Clause',
|
license : 'BSD-3-Clause',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
option('distro_install',
|
option('distro_install',
|
||||||
type : 'boolean',
|
type : 'boolean',
|
||||||
value : false,
|
value : true,
|
||||||
description : 'install shared libs, headers and pkg-config entries'
|
description : 'install shared libs, headers and pkg-config entries'
|
||||||
)
|
)
|
||||||
option('with_INIReader',
|
option('with_INIReader',
|
||||||
type : 'boolean',
|
type : 'boolean',
|
||||||
value : false,
|
value : true,
|
||||||
description : 'compile and (if selected) install INIReader'
|
description : 'compile and (if selected) install INIReader'
|
||||||
)
|
)
|
||||||
option('multi-line_entries',
|
option('multi-line_entries',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user