Super simple example of how SWIG can be used
Point your JAVA_HOME
environment variable to the directory of your installed JDKs Home
folder. For example:
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/"
Point your ANDROID_HOME
environment variable to the directory of your Android SDK. For example:
export ANDROID_HOME="/Users/jenplu01/Library/Android/sdk"
On Mac OS X, install the above libraries (asumming you have brew installed):
brew install cmake cunit ninja gradle
To generate new Java wrapper code for the C++ SDK, install the latest version of SWIG (4.0):
git clone https://github.com/swig/swig.git
cd swig
./autogen.sh
./configure --prefix=/usr/local
make
make install
Note: To build SWIG on Mac OS X, first install automake
: brew install automake
Then add SWIG to your path:
export PATH="/usr/local/share/swig:$PATH"
make build
make run