mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-21 18:31:50 -05:00
CMakeLists: Fixes for linux-fresh
Tells CMake to look for either nasm or yasm as it is required to build FFmpeg. Avoids a compile-time error by checking for it during configuration. Adds a workaround for Ubuntu Bionic's old version of make not communicating jobserver details properly.
This commit is contained in:
parent
b7e6eca8b2
commit
830612ef9e
1 changed files with 13 additions and 1 deletions
|
@ -391,6 +391,10 @@ if (YUZU_USE_BUNDLED_FFMPEG)
|
|||
# Build FFmpeg from externals
|
||||
message(STATUS "Using FFmpeg from externals")
|
||||
|
||||
# FFmpeg has source that requires one of nasm or yasm to assemble it.
|
||||
# REQUIRED throws an error if not found here during configuration rather than during compilation.
|
||||
find_program(ASSEMBLER NAMES nasm yasm REQUIRED)
|
||||
|
||||
set(FFmpeg_PREFIX ${PROJECT_SOURCE_DIR}/externals/ffmpeg)
|
||||
set(FFmpeg_BUILD_DIR ${PROJECT_BINARY_DIR}/externals/ffmpeg)
|
||||
set(FFmpeg_MAKEFILE ${FFmpeg_BUILD_DIR}/Makefile)
|
||||
|
@ -448,11 +452,19 @@ if (YUZU_USE_BUNDLED_FFMPEG)
|
|||
${FFmpeg_BUILD_DIR}
|
||||
)
|
||||
|
||||
# Workaround for Ubuntu 18.04's older version of make not being able to call make as a child
|
||||
# with context of the jobserver. Also helps ninja users.
|
||||
execute_process(
|
||||
COMMAND
|
||||
nproc
|
||||
OUTPUT_VARIABLE
|
||||
SYSTEM_THREADS)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${FFmpeg_LIBRARIES}
|
||||
COMMAND
|
||||
make
|
||||
make -j${SYSTEM_THREADS}
|
||||
WORKING_DIRECTORY
|
||||
${FFmpeg_BUILD_DIR}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue