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. --- externals/libusb/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'externals/libusb/CMakeLists.txt') diff --git a/externals/libusb/CMakeLists.txt b/externals/libusb/CMakeLists.txt index 7180fd42a..9a30b1e2a 100644 --- a/externals/libusb/CMakeLists.txt +++ b/externals/libusb/CMakeLists.txt @@ -5,6 +5,17 @@ if (MINGW OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux")) # GNU toolchains for some reason doesn't work with the later half of this CMakeLists after # updating to 1.0.24, so we do it the old-fashioned way for now. + # Require autoconf and libtoolize here, rather than crash during compilation + find_program(AUTOCONF autoconf) + if ("${AUTOCONF}" STREQUAL "AUTOCONF-NOTFOUND") + message(FATAL_ERROR "Required program `autoconf` not found.") + endif() + + find_program(LIBTOOLIZE libtoolize) + if ("${LIBTOOLIZE}" STREQUAL "LIBTOOLIZE-NOTFOUND") + message(FATAL_ERROR "Required program `libtoolize` not found.") + endif() + set(LIBUSB_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/libusb") set(LIBUSB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libusb") -- cgit v1.2.3