mirror of https://github.com/mono/CppSharp.git
7 changed files with 160 additions and 113 deletions
@ -0,0 +1,77 @@
@@ -0,0 +1,77 @@
|
||||
-- This module checks for the all the project dependencies. |
||||
|
||||
action = _ACTION or "" |
||||
|
||||
depsdir = path.getabsolute("../deps"); |
||||
srcdir = path.getabsolute("../src"); |
||||
incdir = path.getabsolute("../inc"); |
||||
bindir = path.getabsolute("../bin"); |
||||
examplesdir = path.getabsolute("../examples"); |
||||
testsdir = path.getabsolute("../tests"); |
||||
|
||||
builddir = path.getabsolute("./" .. action); |
||||
libdir = path.join(builddir, "lib"); |
||||
|
||||
common_flags = { "Unicode", "Symbols" } |
||||
msvc_buildflags = { } -- "/wd4190", "/wd4996", "/wd4530" |
||||
gcc_buildflags = { "-std=gnu++11" } |
||||
|
||||
msvc_cpp_defines = { } |
||||
|
||||
function SetupNativeProject() |
||||
location (path.join(builddir, "projects")) |
||||
|
||||
c = configuration "Debug" |
||||
defines { "DEBUG" } |
||||
targetsuffix "_d" |
||||
|
||||
configuration "Release" |
||||
defines { "NDEBUG" } |
||||
|
||||
-- Compiler-specific options |
||||
|
||||
configuration "vs*" |
||||
buildoptions { msvc_buildflags } |
||||
defines { msvc_cpp_defines } |
||||
|
||||
configuration "gcc" |
||||
buildoptions { gcc_buildflags } |
||||
|
||||
-- OS-specific options |
||||
|
||||
configuration "Windows" |
||||
defines { "WIN32", "_WINDOWS" } |
||||
|
||||
configuration(c) |
||||
end |
||||
|
||||
function IncludeDir(dir) |
||||
local deps = os.matchdirs(dir .. "/*") |
||||
|
||||
for i,dep in ipairs(deps) do |
||||
local fp = path.join(dep, "premake4.lua") |
||||
fp = path.join(os.getcwd(), fp) |
||||
|
||||
if os.isfile(fp) then |
||||
print(string.format(" including %s", dep)) |
||||
include(dep) |
||||
end |
||||
end |
||||
end |
||||
|
||||
-- Examples helpers |
||||
|
||||
function SetupExampleProject() |
||||
SetupNativeProjects() |
||||
location (path.join(builddir, "deps")) |
||||
end |
||||
|
||||
function IncludeExamples() |
||||
print("Searching for examples...") |
||||
IncludeDir(examplesdir) |
||||
end |
||||
|
||||
function IncludeTests() |
||||
print("Searching for tests...") |
||||
IncludeDir(testsdir) |
||||
end |
@ -1,15 +1,10 @@
@@ -1,15 +1,10 @@
|
||||
project "Generator" |
||||
kind "ConsoleApp" |
||||
language "C#" |
||||
location "." |
||||
files { "**.cs", "**.bmp", "**.resx", "**.config" } |
||||
excludes { "Filter.cs" } |
||||
links { "Bridge", "System", "System.Core", "Parser" } |
||||
platforms { "x32" } |
||||
|
||||
configuration "Debug" |
||||
targetdir "../../bin" |
||||
|
||||
configuration "Release" |
||||
targetdir "../../bin" |
||||
kind "ConsoleApp" |
||||
language "C#" |
||||
location "." |
||||
|
||||
files { "**.cs", "**.bmp", "**.resx", "**.config" } |
||||
excludes { "Filter.cs" } |
||||
|
||||
links { "System", "System.Core", "Bridge", "Parser" } |
||||
|
Loading…
Reference in new issue