diff --git a/docs/markdown/Wrap-best-practices-and-tips.md b/docs/markdown/Wrap-best-practices-and-tips.md index d7bd15037..5fddb5d53 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