From 4f19f3b5664c1bb9e12a21966459590b97488c28 Mon Sep 17 00:00:00 2001 From: triton Date: Thu, 2 Jan 2014 15:10:57 +0000 Subject: [PATCH] Fixed the parser build setup code to work with the new options. --- build/premake4.lua | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/build/premake4.lua b/build/premake4.lua index e0d13b97..e7f49425 100644 --- a/build/premake4.lua +++ b/build/premake4.lua @@ -20,11 +20,26 @@ newoption { } } -function SetupParser() - local c = configuration "vs*" +function SetupCLIParser() + local parser = _OPTIONS["parser"] + if not parser or parser == "cli" then defines { "OLD_PARSER" } links { "CppSharp.Parser" } - configuration(c) + else + links { "CppSharp.Parser.CLI" } + end +end + +function SetupCSharpParser() + links { "CppSharp.Parser.CSharp" } +end + +function SetupParser() + if string.match(action, "vs*") then + SetupCLIParser() + else + SetupCSharpParser() + end end solution "CppSharp"