diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-05-23 00:45:51 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-05-23 00:45:51 +0300 |
commit | 8e403e08ac2907214c044c804ee5eef6a45e0ff9 (patch) | |
tree | fd52448309363d015ca4aea30a5aa00582cc56bf /docs | |
parent | 77a933faca44a9629895959ad44dd835ee673fd5 (diff) | |
download | meson-8e403e08ac2907214c044c804ee5eef6a45e0ff9.zip meson-8e403e08ac2907214c044c804ee5eef6a45e0ff9.tar.gz meson-8e403e08ac2907214c044c804ee5eef6a45e0ff9.tar.bz2 |
Use library() instead of rolling your own. [skip ci]
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Wrap-best-practices-and-tips.md | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/docs/markdown/Wrap-best-practices-and-tips.md b/docs/markdown/Wrap-best-practices-and-tips.md index d7bd150..5fddb5d 100644 --- a/docs/markdown/Wrap-best-practices-and-tips.md +++ b/docs/markdown/Wrap-best-practices-and-tips.md @@ -47,19 +47,12 @@ also faster during development due to Meson's relinking optimization. However building both library types on all builds is slow and wasteful. -Your project should provide a toggle specifying which type of library -it should build. As an example if you have a Meson option called -`shared_lib` then you could do this: +Your project should use the `library` method that can be toggled +between shared and static with the `defaul_library` builtin option. + ```meson -if get_option('shared_lib') - libtype = 'shared_library' -else - libtype = 'static_library' -endif - -mylib = build_target('foo', 'foo.c', - target_type : libtype) +mylib = library('foo', 'foo.c') ``` ## Declare generated headers explicitly |