mirror of https://github.com/mono/CppSharp.git
2 changed files with 37 additions and 39 deletions
@ -0,0 +1,35 @@ |
|||||||
|
newoption { |
||||||
|
trigger = "parser", |
||||||
|
description = "Controls which version of the parser is enabled.", |
||||||
|
value = "version", |
||||||
|
allowed = { |
||||||
|
{ "cpp", "Cross-platform C++ parser."}, |
||||||
|
{ "cli", "VS-only C++/CLI parser."}, |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
function SetupCLIParser() |
||||||
|
local parser = _OPTIONS["parser"] |
||||||
|
if not parser or parser == "cli" then |
||||||
|
defines { "OLD_PARSER" } |
||||||
|
links { "CppSharp.Parser" } |
||||||
|
else |
||||||
|
links { "CppSharp.Parser.CLI" } |
||||||
|
end |
||||||
|
end |
||||||
|
|
||||||
|
function SetupCSharpParser() |
||||||
|
links |
||||||
|
{ |
||||||
|
"CppSharp.Parser.CSharp", |
||||||
|
"CppSharp.Runtime" |
||||||
|
} |
||||||
|
end |
||||||
|
|
||||||
|
function SetupParser() |
||||||
|
if string.match(action, "vs*") then |
||||||
|
SetupCLIParser() |
||||||
|
else |
||||||
|
SetupCSharpParser() |
||||||
|
end |
||||||
|
end |
||||||
Loading…
Reference in new issue