Skip to content

Commit

Permalink
#38 Check that required programs tar and make are installed with MSYS2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceylo committed May 24, 2015
1 parent 477d1d5 commit 3a73799
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions FFmpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand All @@ -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!")
Expand Down

0 comments on commit 3a73799

Please sign in to comment.