From: Andrey Kamaev Date: Mon, 20 Feb 2012 13:43:06 +0000 (+0000) Subject: Fixing ffmpeg dll copying on Windows X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~5495 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30191dbe951961905be5ec602feaa1e921094e41;p=platform%2Fupstream%2Fopencv.git Fixing ffmpeg dll copying on Windows --- diff --git a/3rdparty/ffmpeg/CMakeLists.txt b/3rdparty/ffmpeg/CMakeLists.txt index e3fda99..6708c85 100644 --- a/3rdparty/ffmpeg/CMakeLists.txt +++ b/3rdparty/ffmpeg/CMakeLists.txt @@ -9,8 +9,18 @@ set(module_name "${CMAKE_CURRENT_SOURCE_DIR}/${module_bare_name}") message(STATUS "ffmpeg output dir: ${EXECUTABLE_OUTPUT_PATH}") -add_custom_target(opencv_ffmpeg ALL - COMMAND ${CMAKE_COMMAND} -E copy "${module_name}" "${EXECUTABLE_OUTPUT_PATH}/${module_bare_name}" - COMMENT "Copying ${module_name} to the output directory") +if(CMAKE_VERSION VERSION_GREATER "2.8.2") + add_custom_target(opencv_ffmpeg ALL + COMMAND ${CMAKE_COMMAND} -E copy "${module_name}" "${EXECUTABLE_OUTPUT_PATH}/$/${module_bare_name}" + COMMENT "Copying ${module_name} to the output directory") +elseif(MSVC) + add_custom_target(opencv_ffmpeg ALL + COMMAND ${CMAKE_COMMAND} -E copy "${module_name}" "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/${module_bare_name}" + COMMENT "Copying ${module_name} to the output directory") +else() + add_custom_target(opencv_ffmpeg ALL + COMMAND ${CMAKE_COMMAND} -E copy "${module_name}" "${EXECUTABLE_OUTPUT_PATH}/${module_bare_name}" + COMMENT "Copying ${module_name} to the output directory") +endif() install(FILES ${module_name} DESTINATION bin COMPONENT main)