Skip to content

Commit

Permalink
#38 Ease finding of required executables
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceylo committed May 24, 2015
1 parent d2bf9d3 commit 12f62d0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions FFmpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ else()
endif()

if (WINDOWS)
find_program(FFMPEG_BASH_EXE bash)
find_program(FFMPEG_BASH_EXE bash PATHS "C:/msys64/usr/bin")
if (NOT FFMPEG_BASH_EXE)
message(FATAL_ERROR "Required executable Bash not found")
endif()
Expand All @@ -41,11 +41,21 @@ else()
endif()
endif()

find_program(FFMPEG_YASM_EXE yasm)
set (ADDITIONAL_BIN_DIR "")
if (FFMPEG_BASH_EXE)
get_filename_component(ADDITIONAL_BIN_DIR "${FFMPEG_BASH_EXE}" DIRECTORY)
endif()

find_program(FFMPEG_YASM_EXE yasm PATHS "${ADDITIONAL_BIN_DIR}")
if (NOT FFMPEG_YASM_EXE)
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 12f62d0

Please sign in to comment.