|
| 1 | +-- This module checks for the all the project dependencies. |
| 2 | + |
| 3 | +action = _ACTION or "" |
| 4 | + |
| 5 | +depsdir = path.getabsolute("../deps"); |
| 6 | +srcdir = path.getabsolute(".."); |
| 7 | +incdir = path.getabsolute("../include"); |
| 8 | +bindir = path.getabsolute("../bin"); |
| 9 | +examplesdir = path.getabsolute("../examples"); |
| 10 | +testsdir = path.getabsolute("../tests"); |
| 11 | + |
| 12 | +builddir = path.getabsolute("./" .. action); |
| 13 | +if _ARGS[1] then |
| 14 | + builddir = path.getabsolute("./" .. _ARGS[1]); |
| 15 | +end |
| 16 | + |
| 17 | +libdir = path.join(builddir, "lib", "%{cfg.buildcfg}_%{cfg.platform}"); |
| 18 | +gendir = path.join(builddir, "gen"); |
| 19 | + |
| 20 | +common_flags = { "Unicode", "Symbols" } |
| 21 | + |
| 22 | +function os.is_osx() |
| 23 | + return os.is("macosx") |
| 24 | +end |
| 25 | + |
| 26 | +function os.is_windows() |
| 27 | + return os.is("windows") |
| 28 | +end |
| 29 | + |
| 30 | +function os.is_linux() |
| 31 | + return os.is("linux") |
| 32 | +end |
| 33 | + |
| 34 | +function string.starts(str, start) |
| 35 | + return string.sub(str, 1, string.len(start)) == start |
| 36 | +end |
| 37 | + |
| 38 | +function SafePath(path) |
| 39 | + return "\"" .. path .. "\"" |
| 40 | +end |
| 41 | + |
| 42 | + |
| 43 | +cppSharpLocation = path.getabsolute("../../CppSharp/build/vs2013/lib/Release_x32/") |
| 44 | + |
| 45 | +function SetupCppSharp() |
| 46 | + libdirs { cppSharpLocation } |
| 47 | + links |
| 48 | + { |
| 49 | + "CppSharp", |
| 50 | + "CppSharp.AST", |
| 51 | + "CppSharp.Parser.CLI", |
| 52 | + "CppSharp.Generator", |
| 53 | + } |
| 54 | +end |
| 55 | + |
| 56 | +function SetupManagedProject() |
| 57 | + language "C#" |
| 58 | + location (path.join(builddir, "projects")) |
| 59 | + |
| 60 | + if not os.is_osx() then |
| 61 | + local c = configuration { "vs*" } |
| 62 | + location "." |
| 63 | + configuration(c) |
| 64 | + end |
| 65 | +end |
| 66 | + |
0 commit comments