diff options
Diffstat (limited to 'graphics/Blender/Blender.SlackBuild')
-rw-r--r-- | graphics/Blender/Blender.SlackBuild | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/graphics/Blender/Blender.SlackBuild b/graphics/Blender/Blender.SlackBuild index 7852440f497d2..972e3faaf2fea 100644 --- a/graphics/Blender/Blender.SlackBuild +++ b/graphics/Blender/Blender.SlackBuild @@ -26,7 +26,7 @@ SRCNAM=blender PKGNAM=Blender VERSION=${VERSION:-2.79b} BASE_VERSION=${BASE_VERSION:-$( echo $VERSION | sed -e 's/[^0-9.]*//g')} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PYTHON_VERSION=$(python3 -c "import sys; print(sys.version[:3])") @@ -57,6 +57,16 @@ else LIBDIRSUFFIX="" fi +cuda="" +if [ -d /usr/include/cuda ]; then + # If cudatoolkit is installed, assume we want to use it + cuda="-DWITH_CYCLES_CUDA_BINARIES=ON" + # However disable cuda if requested by e.g. CUDA=no + if [ ${CUDA:-yes} != "yes" ]; then + cuda="-DWITH_CYCLES_CUDA_BINARIES=OFF" + fi +fi + set -e rm -rf $PKG @@ -108,6 +118,7 @@ cd build -DWITH_SDL:BOOL=ON \ -DWITH_SDL_DYNLOAD:BOOL=ON \ -DCMAKE_BUILD_TYPE=Release \ + $cuda \ make make install DESTDIR=$PKG |