diff options
| author | xq114 <[email protected]> | 2021-09-23 21:59:21 +0800 |
|---|---|---|
| committer | xq114 <[email protected]> | 2021-09-23 21:59:21 +0800 |
| commit | 6e5bd0a99336d5ef17e9b7c312d547b6a683d13e (patch) | |
| tree | 628cf31298c0554d98278af8cefb25c6719eb665 /xmake/includes/check_cincludes.lua | |
| parent | fbccc2375dba05f227ff8e6ec0b61c9357ca449d (diff) | |
improve configvar_check_ functions
Diffstat (limited to 'xmake/includes/check_cincludes.lua')
| -rw-r--r-- | xmake/includes/check_cincludes.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xmake/includes/check_cincludes.lua b/xmake/includes/check_cincludes.lua index 7f2727d77..ced7c33a5 100644 --- a/xmake/includes/check_cincludes.lua +++ b/xmake/includes/check_cincludes.lua @@ -54,7 +54,13 @@ function configvar_check_cincludes(definition, includes, opt) if opt.includedirs then add_includedirs(opt.includedirs) end - set_configvar(defname, defval or 1) + if opt.default == nil then + set_configvar(defname, defval or 1, {quote = opt.quote}) + end option_end() - add_options(optname) + if opt.default == nil then + add_options(optname) + else + set_configvar(defname, has_config(optname) and (defval or 1) or opt.default, {quote = opt.quote}) + end end |
