summaryrefslogtreecommitdiff
path: root/externals/libusb
diff options
context:
space:
mode:
authorGravatar lat9nq2021-06-13 01:15:54 -0400
committerGravatar lat9nq2021-06-13 01:15:54 -0400
commit932c0184a72b716fa9af26e1e8d3d76a469a787c (patch)
tree6f365cf340974340c5b1e6bc6b2ae62305f93008 /externals/libusb
parentMerge pull request #6453 from lat9nq/libusb-fix-msvc (diff)
downloadyuzu-932c0184a72b716fa9af26e1e8d3d76a469a787c.tar.gz
yuzu-932c0184a72b716fa9af26e1e8d3d76a469a787c.tar.xz
yuzu-932c0184a72b716fa9af26e1e8d3d76a469a787c.zip
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 "<VAR>-NOTFOUND". In addition, check for additional requirements before building libusb or FFmpeg with autotools. Otherwise, CMake configuration will pass yet compilation will fail.
Diffstat (limited to 'externals/libusb')
-rw-r--r--externals/libusb/CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
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"))
5 # GNU toolchains for some reason doesn't work with the later half of this CMakeLists after 5 # GNU toolchains for some reason doesn't work with the later half of this CMakeLists after
6 # updating to 1.0.24, so we do it the old-fashioned way for now. 6 # updating to 1.0.24, so we do it the old-fashioned way for now.
7 7
8 # Require autoconf and libtoolize here, rather than crash during compilation
9 find_program(AUTOCONF autoconf)
10 if ("${AUTOCONF}" STREQUAL "AUTOCONF-NOTFOUND")
11 message(FATAL_ERROR "Required program `autoconf` not found.")
12 endif()
13
14 find_program(LIBTOOLIZE libtoolize)
15 if ("${LIBTOOLIZE}" STREQUAL "LIBTOOLIZE-NOTFOUND")
16 message(FATAL_ERROR "Required program `libtoolize` not found.")
17 endif()
18
8 set(LIBUSB_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/libusb") 19 set(LIBUSB_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/libusb")
9 set(LIBUSB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libusb") 20 set(LIBUSB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libusb")
10 21