From d5c754264e99ad17358019c2f96f4c64df32c8b3 Mon Sep 17 00:00:00 2001 From: Stephan Sundermann Date: Thu, 5 Mar 2015 12:57:07 +0100 Subject: [PATCH] Determine bitness on osx This reads the bitness from mono which is in path. --- src/CppParser/Bindings/premake4.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/CppParser/Bindings/premake4.lua b/src/CppParser/Bindings/premake4.lua index cc3e4b16..971a490a 100644 --- a/src/CppParser/Bindings/premake4.lua +++ b/src/CppParser/Bindings/premake4.lua @@ -29,7 +29,14 @@ project "CppSharp.Parser.CSharp" if os.is_windows() then files { "CSharp/i686-pc-win32-msvc/**.cs" } elseif os.is_osx() then - files { "CSharp/i686-apple-darwin12.4.0/**.cs" } + local file = io.popen("lipo -info `which mono`") + local output = file:read('*all') + if string.find(output, "x86_64") then + files { "CSharp/x86_64-apple-darwin12.4.0/**.cs" } + else + files { "CSharp/i686-apple-darwin12.4.0/**.cs" } + end + elseif os.is_linux() then files { "CSharp/x86_64-linux-gnu/**.cs" } else