Browse Source

Fixed Premake build files for OSX.

pull/78/head
Joao Matos 12 years ago
parent
commit
1c6538207e
  1. 6
      build/Helpers.lua
  2. 44
      src/CppParser/Bindings/premake4.lua
  3. 13
      src/CppParser/premake4.lua
  4. 9
      src/Generator/Generator.lua

6
build/Helpers.lua

@ -15,7 +15,7 @@ gendir = path.join(builddir, "gen"); @@ -15,7 +15,7 @@ gendir = path.join(builddir, "gen");
common_flags = { "Unicode", "Symbols" }
msvc_buildflags = { } -- "/wd4190", "/wd4996", "/wd4530"
gcc_buildflags = { "-std=gnu++11" }
gcc_buildflags = { "-std=c++11" }
msvc_cpp_defines = { }
@ -39,8 +39,8 @@ function SetupNativeProject() @@ -39,8 +39,8 @@ function SetupNativeProject()
buildoptions { msvc_buildflags }
defines { msvc_cpp_defines }
configuration "gcc"
buildoptions { gcc_buildflags }
configuration { "macosx" }
buildoptions { gcc_buildflags, "-stdlib=libc++", "-fvisibility-inlines-hidden" }
-- OS-specific options

44
src/CppParser/Bindings/premake4.lua

@ -6,7 +6,32 @@ project "CppSharp.Parser.Gen" @@ -6,7 +6,32 @@ project "CppSharp.Parser.Gen"
debugdir "."
files { "ParserGen.cs", "*.lua" }
links { "CppSharp.AST", "CppSharp.Generator", "CppSharp.Parser" }
links { "CppSharp.AST", "CppSharp.Generator" }
configuration { "vs*" }
links { "CppSharp.Parser" }
configuration { "not vs*" }
links { "CppSharp.Parser.CSharp" }
project "CppSharp.Parser.CSharp"
kind "SharedLib"
language "C#"
location "."
dependson { "CppSharp.CppParser" }
flags { common_flags, "Unsafe" }
files
{
"CSharp/**.cs",
"**.lua"
}
links { "CppSharp.Runtime" }
configuration "vs*"
project "CppSharp.Parser.CLI"
@ -35,20 +60,3 @@ project "CppSharp.Parser.CLI" @@ -35,20 +60,3 @@ project "CppSharp.Parser.CLI"
configuration "*"
links { "CppSharp.CppParser" }
project "CppSharp.Parser.CSharp"
kind "SharedLib"
language "C#"
location "."
dependson { "CppSharp.CppParser" }
flags { common_flags, "Unsafe" }
files
{
"CSharp/**.cs",
"**.lua"
}
links { "CppSharp.Runtime" }

13
src/CppParser/premake4.lua

@ -11,7 +11,7 @@ project "CppSharp.CppParser" @@ -11,7 +11,7 @@ project "CppSharp.CppParser"
language "C++"
SetupNativeProject()
flags { common_flags }
flags { "NoRTTI" }
configuration "vs*"
buildoptions { clang_msvc_flags }
@ -35,12 +35,19 @@ project "CppSharp.CppParser" @@ -35,12 +35,19 @@ project "CppSharp.CppParser"
"../../deps/LLVM/build/tools/clang/include"
}
configuration "Debug"
configuration { "Debug", "vs*" }
libdirs { "../../deps/LLVM/build/lib/Debug" }
configuration "Release"
configuration { "Release", "vs*" }
libdirs { "../../deps/LLVM/build/lib/RelWithDebInfo" }
configuration "not vs*"
defines { "__STDC_CONSTANT_MACROS", "__STDC_LIMIT_MACROS" }
libdirs { "../../deps/LLVM/build/lib" }
configuration "macosx"
links { "c++", "curses", "pthread", "z" }
configuration "*"
links

9
src/Generator/Generator.lua

@ -7,7 +7,14 @@ project "CppSharp.Generator" @@ -7,7 +7,14 @@ project "CppSharp.Generator"
files { "**.cs", "**.bmp", "**.resx", "**.config", "**verbs.txt" }
excludes { "Filter.cs" }
links { "System", "System.Core", "CppSharp.AST", "CppSharp.Parser" }
links { "System", "System.Core", "CppSharp.AST" }
configuration "vs*"
links { "CppSharp.Parser" }
configuration "not vs*"
dependson { "CppSharp.CppParser" }
links { "CppSharp.Parser.CSharp" }
configuration '**verbs.txt'
buildaction "Embed"

Loading…
Cancel
Save