提交 aa9735f9 编写于 作者: A Andrey Kamaev

Fixed mingw build

上级 792fb3bd
...@@ -216,32 +216,37 @@ if(WITH_ANDROID_CAMERA AND OPENCV_MODULE_ANDROIDCAMERA) ...@@ -216,32 +216,37 @@ if(WITH_ANDROID_CAMERA AND OPENCV_MODULE_ANDROIDCAMERA)
endif() endif()
if(HAVE_XIMEA AND XIMEA_FOUND) if(HAVE_XIMEA AND XIMEA_FOUND)
set(highgui_srcs ${highgui_srcs} src/cap_ximea.cpp) set(highgui_srcs ${highgui_srcs} src/cap_ximea.cpp)
include_directories(${XIMEA_PATH}) include_directories(${XIMEA_PATH})
link_directories(${XIMEA_LIBRARY_DIR}) link_directories(${XIMEA_LIBRARY_DIR})
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} m3api) set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} m3api)
set(highgui_srcs ${highgui_srcs} src/cap_ximea.cpp) set(highgui_srcs ${highgui_srcs} src/cap_ximea.cpp)
endif() endif()
if(OPENNI_LIBRARY) if(OPENNI_LIBRARY)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${OPENNI_LIBRARY}) set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${OPENNI_LIBRARY})
endif() endif()
if(APPLE AND NOT IOS) if(APPLE AND NOT IOS)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} bz2 "-framework Cocoa" "-framework QuartzCore") set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} bz2 "-framework Cocoa" "-framework QuartzCore")
if(WITH_CARBON) if(WITH_CARBON)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "-framework Carbon") set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "-framework Carbon")
endif() endif()
if(NOT WITH_QUICKTIME) if(NOT WITH_QUICKTIME)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "-framework QTKit") set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "-framework QTKit")
endif() endif()
if(WITH_CARBON OR WITH_QUICKTIME) if(WITH_CARBON OR WITH_QUICKTIME)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "-framework QuickTime" "-framework CoreFoundation") set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "-framework QuickTime" "-framework CoreFoundation")
endif() endif()
endif() endif()
if(IOS) if(IOS)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} bz2 "-framework QuartzCore" "-framework CoreFoundation" "-framework ImageIO" "-framework CoreGraphics" "-framework AVFoundation") set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} bz2 "-framework QuartzCore" "-framework CoreFoundation" "-framework ImageIO" "-framework CoreGraphics" "-framework AVFoundation")
endif()
if(MINGW)
link_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/lib")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/include")#for directshow
endif() endif()
source_group("Src" FILES ${highgui_srcs} ${highgui_hdrs}) source_group("Src" FILES ${highgui_srcs} ${highgui_hdrs})
...@@ -253,11 +258,11 @@ ocv_module_include_directories() ...@@ -253,11 +258,11 @@ ocv_module_include_directories()
ocv_create_module(${GRFMT_LIBS} ${HIGHGUI_LIBRARIES}) ocv_create_module(${GRFMT_LIBS} ${HIGHGUI_LIBRARIES})
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
add_definitions(-DHIGHGUI_EXPORTS) add_definitions(-DHIGHGUI_EXPORTS)
endif() endif()
if(MSVC) if(MSVC)
set_target_properties(${the_module} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /NODEFAULTLIB:libcmt.lib /DEBUG") set_target_properties(${the_module} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /NODEFAULTLIB:libcmt.lib /DEBUG")
endif() endif()
#stop automatic dependencies propagation for this module #stop automatic dependencies propagation for this module
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册