diff options
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/howtox.md | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/markdown/howtox.md b/docs/markdown/howtox.md index abf7519..84546b7 100644 --- a/docs/markdown/howtox.md +++ b/docs/markdown/howtox.md @@ -271,6 +271,7 @@ This can be used in cases where you want a default value, but might override it later. ```meson +# Not needed on Windows! my_dep = dependency('', required : false) if host_machine.system() in ['freebsd', 'netbsd', 'openbsd', 'dragonfly'] my_dep = dependency('some dep', required : false) @@ -278,8 +279,9 @@ elif host_machine.system() == 'linux' my_dep = dependency('some other dep', required : false) endif -# Last ditch effort! -if no my_dep.found() - my_dep = meson.get_compiler('c').find_library('dep') -endif +executable( + 'myexe', + my_sources, + deps : [my_dep] +) ``` |