"optional" subdir()? #13159
-
Is there a way to implement an optional/not-required I would like to provide my team with a |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The more I thought about this the less I liked the "magic but unexpected behaviour", so I've decided making this a conscious choice by putting a parameter |
Beta Was this translation helpful? Give feedback.
-
You could use: fs_mod = import('fs')
if fs.exists('optional/meson.build')
subdir('optional')
endif Note that adding that subdir will not trigger a meson reconfigure so if users do that then they'll need to also manually reconfigure. Removing it, however, will trigger reconfiguration. |
Beta Was this translation helpful? Give feedback.
The more I thought about this the less I liked the "magic but unexpected behaviour", so I've decided making this a conscious choice by putting a parameter
enable_workbench
inmeson_options.txt
.