Skip to content

Instantly share code, notes, and snippets.

@mattleibow
Last active August 29, 2015 14:24
Show Gist options
  • Save mattleibow/a702e23de15e4e073a43 to your computer and use it in GitHub Desktop.
Save mattleibow/a702e23de15e4e073a43 to your computer and use it in GitHub Desktop.
Building CppSharp and dependencies
#!/bin/bash
# download CppSharp
if [ ! -s CppSharp/.git ]; then
git clone -b master --single-branch https://github.com/mono/CppSharp.git CppSharp
fi
# download LLVM
if [ ! -s CppSharp/deps/llvm/.git ]; then
git clone http://llvm.org/git/llvm.git CppSharp/deps/llvm
(cd CppSharp/deps/llvm && git checkout 0e8abfa6ed986c892ec723236e32e78fd9c47b88)
fi
# download CLANG
if [ ! -s CppSharp/deps/llvm/tools/clang/.git ]; then
git clone http://llvm.org/git/clang.git CppSharp/deps/llvm/tools/clang
(cd CppSharp/deps/llvm/tools/clang && git checkout 3457cd5516ac741fa106623d9578f5ac88593f4d)
fi
# build LLVM and CLANG
mkdir CppSharp/deps/llvm/build
(cd CppSharp/deps/llvm/build &&
cmake -G "Unix Makefiles" -DLLVM_ENABLE_LIBCXX=true -DLLVM_BUILD_32_BITS=true -DCMAKE_BUILD_TYPE=RelWithDebInfo .. &&
make)
# build CppSharp
(cd CppSharp/build &&
./premake5-osx gmake &&
verbose=true make -C gmake config=release_x86 &&
cd gmake &&
make)
@moljac
Copy link

moljac commented Jul 15, 2015

Line 26+

rm -fr gmake/
./premake5-osx gmake
cd gmake
config=release_x64 make
make

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment