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
This commit is contained in:
Sergey Sharybin 2020-09-16 12:44:17 +02:00
parent d377b1fe76
commit 157cd6c6e8
4 changed files with 17 additions and 4 deletions

View File

@ -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)

View File

@ -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"

View File

@ -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

View File

@ -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