fixed problem with VideoInput on Windows when OpenCV compiled statically (ticket #573)

pull/13383/head
Alexander Shishkov 14 years ago
parent dce5bf4921
commit 33e71127f7
  1. 17
      CMakeLists.txt
  2. 4
      modules/python/CMakeLists.txt
  3. 4
      samples/c/CMakeLists.txt
  4. 3
      samples/cpp/CMakeLists.txt
  5. 3
      samples/gpu/CMakeLists.txt

@ -139,6 +139,12 @@ else()
set(OPENCV_SVNVERSION "")
endif()
# ----------------------------------------------------------------------------
# Detect Microsoft compiler:
# ----------------------------------------------------------------------------
if(CMAKE_CL_64)
set(MSVC64 1)
endif()
# ----------------------------------------------------------------------------
# Detect GNU version:
@ -805,6 +811,17 @@ if(WIN32)
if (MSVC)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} vfw32)
if (NOT BUILD_SHARED_LIBS)
if (MSVC64)
if(HAVE_VIDEOINPUT)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${CMAKE_SOURCE_DIR}/3rdparty/lib/videoInput64.lib strmiids)
endif()
elseif (MSVC)
if(HAVE_VIDEOINPUT)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${CMAKE_SOURCE_DIR}/3rdparty/lib/videoInput.lib strmiids)
endif()
endif()
endif()
endif()
if(MINGW)

@ -60,6 +60,10 @@ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig; pri
set_target_properties(${cv_target} PROPERTIES SUFFIX ${CVPY_SUFFIX})
if (MSVC AND NOT BUILD_SHARED_LIBS)
set_target_properties(${cv_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /DEBUG")
endif()
set(cvpymodules ${cv_target})
if(PYTHON_USE_NUMPY)

@ -43,8 +43,10 @@ if (BUILD_EXAMPLES)
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "samples//c")
endif()
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 "samples/c" COMPONENT main)
endif()

@ -45,6 +45,9 @@ if (BUILD_EXAMPLES)
endif()
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 "samples/cpp" COMPONENT main)
endif()

@ -47,6 +47,9 @@ if (BUILD_EXAMPLES)
endif()
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 "samples/gpu" COMPONENT main)
endif()

Loading…
Cancel
Save