msvc.patch 843 B

12345678910111213141516171819202122
  1. diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt
  2. index a9b6701..cf36137 100644
  3. --- a/modules/highgui/CMakeLists.txt
  4. +++ b/modules/highgui/CMakeLists.txt
  5. @@ -75,7 +75,7 @@ if(OPENCV_VERSION_MAJOR EQUAL 2)
  6. add_definitions(-DHIGHGUI_EXPORTS)
  7. endif()
  8. - if(MSVC)
  9. + if(MSVC AND NOT BUILD_SHARED_LIBS AND BUILD_WITH_STATIC_CRT)
  10. set_target_properties(${the_module} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /NODEFAULTLIB:libcmt.lib /DEBUG")
  11. endif()
  12. @@ -86,7 +86,7 @@ else()
  13. add_apple_compiler_options(the_module)
  14. endif()
  15. - if(MSVC)
  16. + if(MSVC AND NOT BUILD_SHARED_LIBS AND BUILD_WITH_STATIC_CRT)
  17. set_target_properties(${the_module} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /NODEFAULTLIB:libcmt.lib /DEBUG")
  18. endif()