Skip to content

Commit 98dafac

Browse files
enable distro settings by default (#125)
* meson: enable distro settings by default Signed-off-by: Stephan Lachnit <[email protected]> * meson: add note about version in pkg-config file See also #123. Signed-off-by: Stephan Lachnit <[email protected]>
1 parent e192e47 commit 98dafac

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,14 @@ Some differences between inih and Python's [ConfigParser](http://docs.python.org
132132
## Meson notes ##
133133

134134
* The `meson.build` file is not required to use or compile inih, its main purpose is for distributions.
135-
* By default Meson only creates a static library for inih, but Meson can be used to configure this behavior:
136-
* with `-Ddefault_library=shared` a shared library is build.
137-
* 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.
138-
* with `-Dwith_INIReader` you can build (and install if selected) the C++ library.
139-
* 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`.
135+
* By default Meson is set up for distro installation, but this behavior can be configured for embedded use cases:
136+
* with `-Ddefault_library=static` static libraries are built.
137+
* with `-Ddistro_install=false` libraries, headers and pkg-config files won't be installed.
138+
* with `-Dwith_INIReader=false` you can disable building the C++ library.
139+
* 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`.
140140
* 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`.
141-
* In case you use inih as a subproject, you can use the `inih_dep` and `INIReader_dep` dependency variables.
141+
* 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).
142+
* 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.
142143

143144
## Building from vcpkg ##
144145

meson.build

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
project('inih',
22
['c'],
3-
default_options : ['default_library=static'],
43
license : 'BSD-3-Clause',
54
)
65

meson_options.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
option('distro_install',
22
type : 'boolean',
3-
value : false,
3+
value : true,
44
description : 'install shared libs, headers and pkg-config entries'
55
)
66
option('with_INIReader',
77
type : 'boolean',
8-
value : false,
8+
value : true,
99
description : 'compile and (if selected) install INIReader'
1010
)
1111
option('multi-line_entries',

0 commit comments

Comments
 (0)