Skip to content

Commit

Permalink
Added dummy highgui WinRT implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
mkostin committed Jun 15, 2015
1 parent 424c2bd commit 6724a0b
Show file tree
Hide file tree
Showing 5 changed files with 461 additions and 10,042 deletions.
26 changes: 20 additions & 6 deletions modules/highgui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
if (WINRT)
ocv_module_disable(highgui)
endif()

set(the_description "High-level GUI and Media I/O")
ocv_add_module(highgui opencv_imgproc opencv_imgcodecs opencv_videoio WRAP python)

Expand All @@ -11,8 +7,7 @@ ocv_add_module(highgui opencv_imgproc opencv_imgcodecs opencv_videoio WRAP pytho
# Jose Luis Blanco, 2008
# ----------------------------------------------------------------------------

# Compilation with /ZW is not allowed for *.c files
if(HAVE_WINRT_CX AND NOT WINRT)
if(WINRT_8_1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW")
endif()

Expand Down Expand Up @@ -71,6 +66,25 @@ elseif(HAVE_QT)
if(${_have_flag})
set_source_files_properties(${_RCC_OUTFILES} PROPERTIES COMPILE_FLAGS -Wno-missing-declarations)
endif()
elseif(WINRT AND NOT WINRT_8_0)
# Dependencies used by the implementation referenced
# below are not available on WinRT 8.0.
# Enabling it for WiRT 8.1+ only.
status(" ${name}: WinRT detected")
list(APPEND highgui_srcs ${CMAKE_CURRENT_LIST_DIR}/src/window_winrt.cpp)

# libraries below are neither available nor required
# on ARM devices and/or Windows Phone
if(WINRT_PHONE OR (OpenCV_ARCH STREQUAL "ARM"))
list(REMOVE_ITEM HIGHGUI_LIBRARIES "comctl32" "gdi32" "ole32" "setupapi")
if(WINRT_PHONE)
status(" ${name}: Windows Phone detected")
elseif(OpenCV_ARCH STREQUAL "ARM")
status(" ${name}: ARM detected")
endif()
status(" ${name}: Removing 'comctl32.lib, gdi32.lib, ole32.lib, setupapi.lib'")
status(" ${name}: Leaving '${HIGHGUI_LIBRARIES}'")
endif()
elseif(HAVE_WIN32UI)
list(APPEND highgui_srcs ${CMAKE_CURRENT_LIST_DIR}/src/window_w32.cpp)
elseif(HAVE_GTK OR HAVE_GTK3)
Expand Down
Loading

0 comments on commit 6724a0b

Please sign in to comment.