diff options
| author | ruki <[email protected]> | 2017-09-09 00:49:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-09-08 22:59:25 +0800 |
| commit | 9f42256a7eef0c84267d5f88cf71865e58dc54f2 (patch) | |
| tree | 9305095e75a583b6f9cf14530a1aa06ef8af74ce | |
| parent | d727f228bb9ee7d3419ed12a028e72d4ca93a721 (diff) | |
disable package if be optional
| -rw-r--r-- | xmake/core/project/project.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index 1c873987a..5823d05f6 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -528,6 +528,13 @@ function project._load_options(disable_filter) -- inherit extra option settings and override the default values local require_extra = requires_extra[require_str] if require_extra then + + -- disable it if be optional + if require_extra.optional then + packageopt.default = false + end + + -- override values from the extra option for name, value in pairs(table.wrap(require_extra.option)) do packageopt[name] = value end |
