You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
690 B

ARCH=$(uname -m | sed -e 's/x86_64/x64/')
[ -f ./LeapSDK.tar.gz ] || wget -O LeapSDK.tar.gz
mkdir -p leap
tar xvf LeapSDK.tar.gz -C leap --strip-components 1
cp -r ${SDK_PATH}/include ./include
wget -O Leap.i.diff
patch -p0 < Leap.i.diff
[ ! -z "$(type -p "swig-3")" ] && SWIG=swig-3
[ ! -z "$(type -p "swig3.0")" ] && SWIG=swig3.0
${SWIG} -c++ -python -o LeapPython.cpp -interface LeapPython ./include/Leap.i
g++ -fPIC $(pkg-config --cflags --libs python3) -I${SDK_PATH}/include LeapPython.cpp ${SDK_PATH}/lib/${ARCH}/ -shared -o