properly escape defines.
This commit is contained in:
parent
921be76b06
commit
1dbc1ea784
@ -35,7 +35,7 @@ project "curl-lib"
|
||||
end
|
||||
end
|
||||
if ca then
|
||||
defines { "CURL_CA_BUNDLE=\\\"" .. ca .. "\\\"" }
|
||||
defines { 'CURL_CA_BUNDLE="' .. ca .. '"' }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -89,6 +89,7 @@
|
||||
|
||||
function make.esc(value)
|
||||
result = value:gsub("\\", "\\\\")
|
||||
result = result:gsub("\"", "\\\"")
|
||||
result = result:gsub(" ", "\\ ")
|
||||
result = result:gsub("%(", "\\(")
|
||||
result = result:gsub("%)", "\\)")
|
||||
|
@ -136,7 +136,7 @@
|
||||
function gcc.getdefines(defines)
|
||||
local result = {}
|
||||
for _, define in ipairs(defines) do
|
||||
table.insert(result, '-D' .. define)
|
||||
table.insert(result, '-D' .. p.esc(define))
|
||||
end
|
||||
return result
|
||||
end
|
||||
@ -144,7 +144,7 @@
|
||||
function gcc.getundefines(undefines)
|
||||
local result = {}
|
||||
for _, undefine in ipairs(undefines) do
|
||||
table.insert(result, '-U' .. undefine)
|
||||
table.insert(result, '-U' .. p.esc(undefine))
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user