From 4a5bb94bd401b892b479a8b08f7053f5828f9f39 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 24 Oct 2020 08:49:13 +0800 Subject: fix fetch --- xmake/actions/require/fetch.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake/actions/require/fetch.lua b/xmake/actions/require/fetch.lua index 9f0eee70a..7db2e214f 100644 --- a/xmake/actions/require/fetch.lua +++ b/xmake/actions/require/fetch.lua @@ -62,7 +62,7 @@ function main(requires_raw) -- show results if #fetchinfos > 0 then local flags = {} - if fetchmodes:has("cflags") then + if fetchmodes and fetchmodes:has("cflags") then for _, fetchinfo in ipairs(fetchinfos) do table.join2(flags, compiler.map_flags("cxx", "define", fetchinfo.defines)) table.join2(flags, compiler.map_flags("cxx", "includedir", fetchinfo.includedirs)) @@ -77,7 +77,7 @@ function main(requires_raw) end end end - if fetchmodes:has("ldflags") then + if fetchmodes and fetchmodes:has("ldflags") then for _, fetchinfo in ipairs(fetchinfos) do table.join2(flags, linker.map_flags("binary", {"cxx"}, "linkdir", fetchinfo.linkdirs)) table.join2(flags, linker.map_flags("binary", {"cxx"}, "link", fetchinfo.links)) -- cgit v1.3.1