diff options
| -rw-r--r-- | CMakeLists.txt | 14 |
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) | |||
| 391 | # Build FFmpeg from externals | 391 | # Build FFmpeg from externals |
| 392 | message(STATUS "Using FFmpeg from externals") | 392 | message(STATUS "Using FFmpeg from externals") |
| 393 | 393 | ||
| 394 | # FFmpeg has source that requires one of nasm or yasm to assemble it. | ||
| 395 | # REQUIRED throws an error if not found here during configuration rather than during compilation. | ||
| 396 | find_program(ASSEMBLER NAMES nasm yasm REQUIRED) | ||
| 397 | |||
| 394 | set(FFmpeg_PREFIX ${PROJECT_SOURCE_DIR}/externals/ffmpeg) | 398 | set(FFmpeg_PREFIX ${PROJECT_SOURCE_DIR}/externals/ffmpeg) |
| 395 | set(FFmpeg_BUILD_DIR ${PROJECT_BINARY_DIR}/externals/ffmpeg) | 399 | set(FFmpeg_BUILD_DIR ${PROJECT_BINARY_DIR}/externals/ffmpeg) |
| 396 | set(FFmpeg_MAKEFILE ${FFmpeg_BUILD_DIR}/Makefile) | 400 | set(FFmpeg_MAKEFILE ${FFmpeg_BUILD_DIR}/Makefile) |
| @@ -448,11 +452,19 @@ if (YUZU_USE_BUNDLED_FFMPEG) | |||
| 448 | ${FFmpeg_BUILD_DIR} | 452 | ${FFmpeg_BUILD_DIR} |
| 449 | ) | 453 | ) |
| 450 | 454 | ||
| 455 | # Workaround for Ubuntu 18.04's older version of make not being able to call make as a child | ||
| 456 | # with context of the jobserver. Also helps ninja users. | ||
| 457 | execute_process( | ||
| 458 | COMMAND | ||
| 459 | nproc | ||
| 460 | OUTPUT_VARIABLE | ||
| 461 | SYSTEM_THREADS) | ||
| 462 | |||
| 451 | add_custom_command( | 463 | add_custom_command( |
| 452 | OUTPUT | 464 | OUTPUT |
| 453 | ${FFmpeg_LIBRARIES} | 465 | ${FFmpeg_LIBRARIES} |
| 454 | COMMAND | 466 | COMMAND |
| 455 | make | 467 | make -j${SYSTEM_THREADS} |
| 456 | WORKING_DIRECTORY | 468 | WORKING_DIRECTORY |
| 457 | ${FFmpeg_BUILD_DIR} | 469 | ${FFmpeg_BUILD_DIR} |
| 458 | ) | 470 | ) |