summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2021-02-06 00:03:20 +0100
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2021-02-06 00:06:57 +0100
commit830612ef9e1f2f1e45288fd083a165ade4c3fdfe (patch)
tree687fcdc98d5bc17306c75a80592932a790ccbdfd /CMakeLists.txt
parentAddress reviewer comments (diff)
downloadyuzu-830612ef9e1f2f1e45288fd083a165ade4c3fdfe.tar
yuzu-830612ef9e1f2f1e45288fd083a165ade4c3fdfe.tar.gz
yuzu-830612ef9e1f2f1e45288fd083a165ade4c3fdfe.tar.bz2
yuzu-830612ef9e1f2f1e45288fd083a165ade4c3fdfe.tar.lz
yuzu-830612ef9e1f2f1e45288fd083a165ade4c3fdfe.tar.xz
yuzu-830612ef9e1f2f1e45288fd083a165ade4c3fdfe.tar.zst
yuzu-830612ef9e1f2f1e45288fd083a165ade4c3fdfe.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 13 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc3e93f80..6cd7e3e92 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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}
)