Skip to content

Commit

Permalink
Take advantage of .NET Core transitive dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
josetr committed Nov 25, 2020
1 parent 25b9082 commit bdf055f
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 77 deletions.
19 changes: 2 additions & 17 deletions build/Tests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,9 @@ function SetupExampleProject()
language "C#"
debugdir "."

links
{
"CppSharp",
"CppSharp.AST",
"CppSharp.Generator",
"CppSharp.Parser"
}
links { "CppSharp.Parser" }

SetupManagedProject()
SetupParser()
end

function SetupTestProject(name, extraFiles, suffix)
Expand Down Expand Up @@ -53,20 +46,12 @@ function SetupTestGeneratorProject(name, depends)
end
project(name .. ".Gen")
SetupManagedTestProject()
SetupParser()
kind "ConsoleApp"
enabledefaultnoneitems "false"

files { name .. ".cs" }
dependson { name .. ".Native" }

links {
"CppSharp",
"CppSharp.AST",
"CppSharp.Generator",
"CppSharp.Generator.Tests",
"CppSharp.Parser"
}
links { "CppSharp.Generator.Tests" }

if depends ~= nil then
links { depends .. ".Gen" }
Expand Down
9 changes: 1 addition & 8 deletions examples/Parser/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ project "Parser"
kind "ConsoleApp"
language "C#"
debugdir "."

links
{
"CppSharp",
"CppSharp.AST",
"CppSharp.Parser"
}
links { "CppSharp.Parser" }

SetupManagedProject()
SetupParser()
9 changes: 1 addition & 8 deletions src/CLI/premake5.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
project "CppSharp.CLI"

SetupManagedProject()
SetupParser()

kind "ConsoleApp"
language "C#"

links
{
"CppSharp",
"CppSharp.AST",
"CppSharp.Generator",
"CppSharp.Parser"
}
links { "CppSharp.Generator" }
4 changes: 1 addition & 3 deletions src/CppParser/Bindings/CLI/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,4 @@ project "CppSharp.Parser.CLI"

links { "CppSharp.CppParser" }

function SetupParser()
links { "CppSharp.Parser.CLI" }
end
CppSharpParserBindings = "CppSharp.Parser.CLI"
8 changes: 1 addition & 7 deletions src/CppParser/Bindings/CSharp/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,4 @@ project "CppSharp.Parser.CSharp"
AddPlatformSpecificFiles("", "**.cs")
AddPlatformSpecificFiles("", "**.cpp")

function SetupParser()
links
{
"CppSharp.Parser.CSharp",
"CppSharp.Runtime"
}
end
CppSharpParserBindings = "CppSharp.Parser.CSharp"
8 changes: 1 addition & 7 deletions src/CppParser/Bootstrap/premake5.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
project "CppSharp.Parser.Bootstrap"

SetupManagedProject()
SetupParser()

kind "ConsoleApp"
language "C#"
debugdir "."

links {
"CppSharp",
"CppSharp.AST",
"CppSharp.Generator",
"CppSharp.Parser"
}
links { "CppSharp.Generator" }
9 changes: 1 addition & 8 deletions src/CppParser/ParserGen/premake5.lua
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
project "CppSharp.Parser.Gen"

SetupManagedProject()
SetupParser()

kind "ConsoleApp"
language "C#"
debugdir "."

links
{
"CppSharp",
"CppSharp.AST",
"CppSharp.Generator",
"CppSharp.Parser",
}
links { "CppSharp.Generator" }
10 changes: 1 addition & 9 deletions src/Generator.Tests/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@ project "CppSharp.Generator.Tests"
buildaction "None"
filter {}

SetupParser()

links
{
"CppSharp",
"CppSharp.AST",
"CppSharp.Generator",
"CppSharp.Parser",
}
links { "CppSharp.Generator" }

nuget
{
Expand Down
9 changes: 1 addition & 8 deletions src/Generator/premake5.lua
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
project "CppSharp.Generator"

SetupManagedProject()
SetupParser()

kind "SharedLib"
language "C#"
dependson { "Std-symbols" }

links
{
"CppSharp",
"CppSharp.AST",
"CppSharp.Parser"
}
links { "CppSharp.Parser" }

nuget
{
Expand Down
4 changes: 2 additions & 2 deletions src/Parser/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ end
project "CppSharp.Parser"

SetupManagedProject()
SetupParser()

kind "SharedLib"
language "C#"
Expand All @@ -33,5 +32,6 @@ project "CppSharp.Parser"
{
"CppSharp",
"CppSharp.AST",
"CppSharp.Runtime"
"CppSharp.Runtime",
CppSharpParserBindings
}

0 comments on commit bdf055f

Please sign in to comment.