mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-29 20:04:22 +01:00
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.
This commit is contained in:
parent
8b5655a98e
commit
932c0184a7
@ -473,7 +473,15 @@ if (YUZU_USE_BUNDLED_FFMPEG)
|
|||||||
|
|
||||||
# FFmpeg has source that requires one of nasm or yasm to assemble it.
|
# 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.
|
# 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_PREFIX ${PROJECT_SOURCE_DIR}/externals/ffmpeg)
|
||||||
set(FFmpeg_BUILD_DIR ${PROJECT_BINARY_DIR}/externals/ffmpeg)
|
set(FFmpeg_BUILD_DIR ${PROJECT_BINARY_DIR}/externals/ffmpeg)
|
||||||
|
11
externals/libusb/CMakeLists.txt
vendored
11
externals/libusb/CMakeLists.txt
vendored
@ -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
|
# 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.
|
# 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_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/libusb")
|
||||||
set(LIBUSB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libusb")
|
set(LIBUSB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libusb")
|
||||||
|
|
||||||
|
@ -18,7 +18,10 @@ set(SHADER_FILES
|
|||||||
vulkan_uint8.comp
|
vulkan_uint8.comp
|
||||||
)
|
)
|
||||||
|
|
||||||
find_program(GLSLANGVALIDATOR "glslangValidator" REQUIRED)
|
find_program(GLSLANGVALIDATOR "glslangValidator")
|
||||||
|
if ("${GLSLANGVALIDATOR}" STREQUAL "GLSLANGVALIDATOR-NOTFOUND")
|
||||||
|
message(FATAL_ERROR "Required program `glslangValidator` not found.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(GLSL_FLAGS "")
|
set(GLSL_FLAGS "")
|
||||||
set(QUIET_FLAG "--quiet")
|
set(QUIET_FLAG "--quiet")
|
||||||
|
Loading…
Reference in New Issue
Block a user