summaryrefslogtreecommitdiff
path: root/xmake/includes/check_cincludes.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-09-21 00:55:16 +0800
committerruki <[email protected]>2021-09-21 00:55:16 +0800
commit0980e7b7e3eb331c87e96148bfab4d9a74784a00 (patch)
tree79d5f568b491b50d21b1866bdb22305f2992f362 /xmake/includes/check_cincludes.lua
parentbce8f65cb9f619dfa30d7b4b1fa2da9fa56b58e1 (diff)
improve check_cincludes
Diffstat (limited to 'xmake/includes/check_cincludes.lua')
-rw-r--r--xmake/includes/check_cincludes.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/includes/check_cincludes.lua b/xmake/includes/check_cincludes.lua
index d5e4cf4a3..7f2727d77 100644
--- a/xmake/includes/check_cincludes.lua
+++ b/xmake/includes/check_cincludes.lua
@@ -30,6 +30,9 @@ function check_cincludes(definition, includes, opt)
local optname = "__" .. (opt.name or definition)
option(optname)
add_cincludes(includes)
+ if opt.includedirs then
+ add_includedirs(opt.includedirs)
+ end
add_defines(definition)
option_end()
add_options(optname)
@@ -48,6 +51,9 @@ function configvar_check_cincludes(definition, includes, opt)
local defname, defval = unpack(definition:split('='))
option(optname)
add_cincludes(includes)
+ if opt.includedirs then
+ add_includedirs(opt.includedirs)
+ end
set_configvar(defname, defval or 1)
option_end()
add_options(optname)