diff --git a/FFmpeg/CMakeLists.txt b/FFmpeg/CMakeLists.txt index 443fda48..38b1b6d5 100644 --- a/FFmpeg/CMakeLists.txt +++ b/FFmpeg/CMakeLists.txt @@ -35,6 +35,18 @@ else() message(FATAL_ERROR "Required executable Bash not found") endif() + get_filename_component(BASH_BIN_DIR "${FFMPEG_BASH_EXE}" DIRECTORY) + + find_program(SFEMOVIE_TAR_EXE tar PATHS "${BASH_BIN_DIR}" NO_DEFAULT_PATH) + if (NOT SFEMOVIE_TAR_EXE) + message(FATAL_ERROR "Your MSYS2 installation is expected to provide the 'tar' program, install with 'pacman -S tar'") + endif() + + find_program(SFEMOVIE_MAKE_EXE make PATHS "${BASH_BIN_DIR}" NO_DEFAULT_PATH) + if (NOT SFEMOVIE_MAKE_EXE) + message(FATAL_ERROR "Your MSYS2 installation is expected to provide the 'make' program, install with 'pacman -S make'") + endif() + file(WRITE "${CMAKE_SOURCE_DIR}/BashPath.var" "${FFMPEG_BASH_EXE}") if (NOT EXISTS "${CMAKE_SOURCE_DIR}/BashPath.var") message(FATAL_ERROR "Writing file \"${CMAKE_SOURCE_DIR}/BashPath.var\" failed!") @@ -51,11 +63,6 @@ else() message(FATAL_ERROR "Required executable Yasm not found") endif() - find_program(SFEMOVIE_TAR_EXE tar PATHS "${ADDITIONAL_BIN_DIR}") - if (NOT SFEMOVIE_TAR_EXE) - message(FATAL_ERROR "Required executable 'tar' not found") - endif() - file(WRITE "${CMAKE_SOURCE_DIR}/YasmPath.var" "${FFMPEG_YASM_EXE}") if (NOT EXISTS "${CMAKE_SOURCE_DIR}/YasmPath.var") message(FATAL_ERROR "Writing file \"${CMAKE_SOURCE_DIR}/YasmPath.var\" failed!")