Skip to content

Commit 3f72ff2

Browse files
committed
Fix WinRT build breaks in highgui and videoio.
1 parent 64b483c commit 3f72ff2

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

modules/highgui/src/window.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ int cv::waitKey(int delay)
218218
{
219219
CV_TRACE_FUNCTION();
220220
int code = waitKeyEx(delay);
221-
#ifndef HAVE_WINRT
221+
#ifndef WINRT
222222
static int use_legacy = -1;
223223
if (use_legacy < 0)
224224
{

modules/highgui/src/window_winrt_bridge.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2525
// POSSIBILITY OF SUCH DAMAGE.
2626

27+
#include "precomp.hpp"
28+
2729
#include "opencv2\highgui\highgui_winrt.hpp"
2830
#include "window_winrt_bridge.hpp"
2931

modules/videoio/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ endif()
256256

257257
if(MSVC)
258258
set_target_properties(${the_module} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /NODEFAULTLIB:libcmt.lib /DEBUG")
259+
if(DEFINED WINRT AND NOT DEFINED ENABLE_WINRT_MODE_NATIVE)
260+
set_target_properties(${the_module} PROPERTIES VS_DESKTOP_EXTENSIONS_VERSION "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
261+
endif()
259262
endif()
260263

261264
#stop automatic dependencies propagation for this module

0 commit comments

Comments
 (0)