toolchain/mingw: prefer to use REQUIRED in find_program

This commit is contained in:
Danny Robson 2021-03-17 11:44:00 +10:00
parent 190fa23667
commit 0adf4f2c21

View File

@ -17,10 +17,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# Set Wine as the emulator if we're not running under Windows # Set Wine as the emulator if we're not running under Windows
if (NOT "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") if (NOT "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
find_program(WINE wine) find_program (WINE wine REQUIRED)
if (NOT WINE)
error (FATAL_ERROR "Unable to find 'wine' for 'emulation'")
endif ()
set (CMAKE_CROSSCOMPILING_EMULATOR "${WINE}") set (CMAKE_CROSSCOMPILING_EMULATOR "${WINE}")
endif () endif ()