Make build.sh work for both Py2 and Py3
@@ -10,8 +10,15 @@ else
FLAGS="-std=c++11"
fi
+if test "${PY3K}" = "1"
+then
+ BUILD_PYTHON="-DBUILD_PYTHON_INTERFACE=ON"
+else
+ BUILD_PYTHON="-DBUILD_PYTHON2_INTERFACE=ON"
+fi
+
mkdir -p build && cd build
-cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=$FLAGS -DBUILD_PYTHON_INTERFACE=ON -DCMAKE_INSTALL_PREFIX=$PREFIX ../
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=$FLAGS ${BUILD_PYTHON} -DCMAKE_INSTALL_PREFIX=$PREFIX ../
make -j $CPU_COUNT
make install
