diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt index a8d70c0cdb7341ae99ee0ef8f38fa37e9dd20f51..8539b09962cad12b12b761c7f507b4ab29f94edf 100644 --- a/modules/highgui/CMakeLists.txt +++ b/modules/highgui/CMakeLists.txt @@ -216,32 +216,37 @@ if(WITH_ANDROID_CAMERA AND OPENCV_MODULE_ANDROIDCAMERA) endif() if(HAVE_XIMEA AND XIMEA_FOUND) - set(highgui_srcs ${highgui_srcs} src/cap_ximea.cpp) - include_directories(${XIMEA_PATH}) - link_directories(${XIMEA_LIBRARY_DIR}) - set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} m3api) - set(highgui_srcs ${highgui_srcs} src/cap_ximea.cpp) + set(highgui_srcs ${highgui_srcs} src/cap_ximea.cpp) + include_directories(${XIMEA_PATH}) + link_directories(${XIMEA_LIBRARY_DIR}) + set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} m3api) + set(highgui_srcs ${highgui_srcs} src/cap_ximea.cpp) endif() if(OPENNI_LIBRARY) - set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${OPENNI_LIBRARY}) + set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${OPENNI_LIBRARY}) endif() if(APPLE AND NOT IOS) - set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} bz2 "-framework Cocoa" "-framework QuartzCore") - if(WITH_CARBON) - set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "-framework Carbon") - endif() - if(NOT WITH_QUICKTIME) - set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "-framework QTKit") - endif() - if(WITH_CARBON OR WITH_QUICKTIME) - set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "-framework QuickTime" "-framework CoreFoundation") - endif() + set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} bz2 "-framework Cocoa" "-framework QuartzCore") + if(WITH_CARBON) + set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "-framework Carbon") + endif() + if(NOT WITH_QUICKTIME) + set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "-framework QTKit") + endif() + if(WITH_CARBON OR WITH_QUICKTIME) + set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "-framework QuickTime" "-framework CoreFoundation") + endif() endif() 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() source_group("Src" FILES ${highgui_srcs} ${highgui_hdrs}) @@ -253,11 +258,11 @@ ocv_module_include_directories() ocv_create_module(${GRFMT_LIBS} ${HIGHGUI_LIBRARIES}) if(BUILD_SHARED_LIBS) - add_definitions(-DHIGHGUI_EXPORTS) + add_definitions(-DHIGHGUI_EXPORTS) endif() 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() #stop automatic dependencies propagation for this module