[Bf-blender-cvs] [157cd6c6e89] master: Make deps: Compile own nasm for Linux

Sergey Sharybin noreply at git.blender.org
Thu Sep 17 11:04:29 CEST 2020


Commit: 157cd6c6e89cfa65b54537b5df101a5184b84298
Author: Sergey Sharybin
Date:   Wed Sep 16 12:44:17 2020 +0200
Branches: master
https://developer.blender.org/rB157cd6c6e89cfa65b54537b5df101a5184b84298

Make deps: Compile own nasm for Linux

This solves annoyance that the official RPM repository of nasm requires
newer version of rpm tool compared to what is shipped by default with
centOS 7.

Differential Revision: https://developer.blender.org/D8905

===================================================================

M	build_files/build_environment/CMakeLists.txt
M	build_files/build_environment/cmake/check_software.cmake
M	build_files/build_environment/cmake/ffmpeg.cmake
M	build_files/build_environment/cmake/x264.cmake

===================================================================

diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt
index f49c6ea238f..fa2b39fccd8 100644
--- a/build_files/build_environment/CMakeLists.txt
+++ b/build_files/build_environment/CMakeLists.txt
@@ -34,7 +34,7 @@
 #   Run "make deps" from main Blender directory
 #
 # LINUX USAGE:
-#   Install compiler cmake autoconf automake libtool yasm nasm tcl
+#   Install compiler cmake autoconf automake libtool yasm tcl
 #   Run "make deps" from main Blender directory
 #
 ####################################################################################################
@@ -75,6 +75,8 @@ include(cmake/llvm.cmake)
 include(cmake/clang.cmake)
 if(APPLE)
   include(cmake/openmp.cmake)
+endif()
+if(UNIX)
   include(cmake/nasm.cmake)
 endif()
 include(cmake/openimageio.cmake)
diff --git a/build_files/build_environment/cmake/check_software.cmake b/build_files/build_environment/cmake/check_software.cmake
index 2530b0b3251..56d6db70ea7 100644
--- a/build_files/build_environment/cmake/check_software.cmake
+++ b/build_files/build_environment/cmake/check_software.cmake
@@ -54,7 +54,7 @@ if(UNIX)
       "  ${_software_missing}\n"
       "\n"
       "On Debian and Ubuntu:\n"
-      "  apt install autoconf automake libtool yasm nasm tcl\n"
+      "  apt install autoconf automake libtool yasm tcl\n"
       "\n"
       "On macOS (with homebrew):\n"
       "  brew install autoconf automake bison libtool pkg-config yasm\n"
diff --git a/build_files/build_environment/cmake/ffmpeg.cmake b/build_files/build_environment/cmake/ffmpeg.cmake
index 7fbd613b25d..ddfdbc86dac 100644
--- a/build_files/build_environment/cmake/ffmpeg.cmake
+++ b/build_files/build_environment/cmake/ffmpeg.cmake
@@ -52,6 +52,11 @@ if(APPLE)
     --target-os=darwin
     --x86asmexe=${LIBDIR}/nasm/bin/nasm
   )
+elseif(UNIX)
+  set(FFMPEG_EXTRA_FLAGS
+    ${FFMPEG_EXTRA_FLAGS}
+    --x86asmexe=${LIBDIR}/nasm/bin/nasm
+  )
 endif()
 
 ExternalProject_Add(external_ffmpeg
@@ -142,7 +147,7 @@ if(WIN32)
     external_zlib_mingw
   )
 endif()
-if(APPLE)
+if(UNIX)
   add_dependencies(
     external_ffmpeg
     external_nasm
diff --git a/build_files/build_environment/cmake/x264.cmake b/build_files/build_environment/cmake/x264.cmake
index 993e4591cb7..8daaf57a220 100644
--- a/build_files/build_environment/cmake/x264.cmake
+++ b/build_files/build_environment/cmake/x264.cmake
@@ -34,6 +34,12 @@ else()
   set(X264_CONFIGURE_ENV echo .)
 endif()
 
+if(UNIX AND NOT APPLE)
+  set(X264_CONFIGURE_ENV
+    export AS=${LIBDIR}/nasm/bin/nasm
+  )
+endif()
+
 ExternalProject_Add(external_x264
   URL ${X264_URI}
   DOWNLOAD_DIR ${DOWNLOAD_DIR}
@@ -54,7 +60,7 @@ if(MSVC)
   set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
 endif()
 
-if(APPLE)
+if(UNIX)
   add_dependencies(
     external_x264
     external_nasm



More information about the Bf-blender-cvs mailing list