From 932c0184a72b716fa9af26e1e8d3d76a469a787c Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 13 Jun 2021 01:15:54 -0400 Subject: cmake: Fix find_program usage for 3.15 yuzu requires CMake 3.15 yet find_program was using REQUIRED, which is only available on 3.18 and later. Instead, we check for "-NOTFOUND". In addition, check for additional requirements before building libusb or FFmpeg with autotools. Otherwise, CMake configuration will pass yet compilation will fail. --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 97afaf1a9..f0e892a97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -473,7 +473,15 @@ if (YUZU_USE_BUNDLED_FFMPEG) # 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) + find_program(ASSEMBLER NAMES nasm yasm) + if ("${ASSEMBLER}" STREQUAL "ASSEMBLER-NOTFOUND") + message(FATAL_ERROR "One of either `nasm` or `yasm` not found but is required.") + endif() + + find_program(AUTOCONF autoconf) + if ("${AUTOCONF}" STREQUAL "AUTOCONF-NOTFOUND") + message(FATAL_ERROR "Required program `autoconf` not found.") + endif() set(FFmpeg_PREFIX ${PROJECT_SOURCE_DIR}/externals/ffmpeg) set(FFmpeg_BUILD_DIR ${PROJECT_BINARY_DIR}/externals/ffmpeg) -- cgit v1.2.3