Browse Source

Added a default build config file and an option to disable config generation.

pull/914/head
Joao Matos 9 years ago
parent
commit
142b3be9f1
  1. 2
      build/Helpers.lua
  2. 7
      src/Parser/BuildConfig.cs
  3. 14
      src/Parser/premake5.lua

2
build/Helpers.lua

@ -53,6 +53,8 @@ msvc_buildflags = { "/wd4267" } @@ -53,6 +53,8 @@ msvc_buildflags = { "/wd4267" }
msvc_cpp_defines = { }
generate_build_config = true
function string.starts(str, start)
return string.sub(str, 1, string.len(start)) == start
end

7
src/Parser/BuildConfig.cs

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
namespace CppSharp.Parser
{
public static class BuildConfig
{
public const string Choice = "default";
}
}

14
src/Parser/premake5.lua

@ -11,7 +11,9 @@ local function GenerateBuildConfig() @@ -11,7 +11,9 @@ local function GenerateBuildConfig()
file:close()
end
GenerateBuildConfig()
if generate_build_config == true then
GenerateBuildConfig()
end
project "CppSharp.Parser"
@ -21,7 +23,15 @@ project "CppSharp.Parser" @@ -21,7 +23,15 @@ project "CppSharp.Parser"
language "C#"
clr "Unsafe"
files { "**.cs", buildconfig }
files { "**.cs" }
removefiles { "BuildConfig.cs" }
if generate_build_config == true then
files { buildconfig }
else
files { "BuildConfig.cs" }
end
vpaths { ["*"] = "*" }
links

Loading…
Cancel
Save