diff options
| author | ruki <[email protected]> | 2020-10-24 08:49:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-10-24 08:49:13 +0800 |
| commit | 4a5bb94bd401b892b479a8b08f7053f5828f9f39 (patch) | |
| tree | 7ca8ec64f54fd23c6f8f38e9851bc8f706aa1ab7 | |
| parent | a83ee200a7c905f123b780881b4067b58aa305e3 (diff) | |
fix fetch
| -rw-r--r-- | xmake/actions/require/fetch.lua | 4 |
1 files 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)) |
