diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt index 38e099f51a..27ed6af19f 100644 --- a/modules/highgui/CMakeLists.txt +++ b/modules/highgui/CMakeLists.txt @@ -412,6 +412,9 @@ if(BUILD_TESTS) add_test(${the_target} "${LOC}") if(WIN32) + if (MSVC AND NOT BUILD_SHARED_LIBS) + set_target_properties(${the_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /DEBUG") + endif() install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main) endif() endif(BUILD_TESTS)