From d3aa228073b08a07aef9238546f2803df33b4ec7 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Sun, 1 May 2011 17:09:40 +0000 Subject: [PATCH] fixed opencv-ffmpeg compile bug with MinGW (thanks to takacsd for the patch) --- modules/ffmpeg/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/ffmpeg/CMakeLists.txt b/modules/ffmpeg/CMakeLists.txt index 80e9d45c9..32ff25b02 100644 --- a/modules/ffmpeg/CMakeLists.txt +++ b/modules/ffmpeg/CMakeLists.txt @@ -45,9 +45,14 @@ set_target_properties(${the_target} PROPERTIES DEFINE_SYMBOL "CVAPI_EXPORTS" ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/" - LINK_FLAGS "/NODEFAULTLIB:libc /DEBUG" ) +if (MSVC) + set_target_properties(${the_target} PROPERTIES + LINK_FLAGS "/NODEFAULTLIB:libc /DEBUG" + ) +endif () + install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main ARCHIVE DESTINATION lib COMPONENT main