Skip to content

Fix build for UWP#15207

Merged
alalek merged 2 commits intoopencv:masterfrom
vicroms:fix-uwp-build
Aug 3, 2019
Merged

Fix build for UWP#15207
alalek merged 2 commits intoopencv:masterfrom
vicroms:fix-uwp-build

Conversation

@vicroms
Copy link
Copy Markdown
Contributor

@vicroms vicroms commented Aug 1, 2019

resolves #14388

This pullrequest changes

This PR contains some fixes to enable building OpenCV for UWP, these are issues that we came across while trying to package OpenCV for vcpkg (microsoft/vcpkg#5169).

  • Fixes build for UWP by guarding calls to invalid code.
  • Fixes build for videoio module in UWP.
  • Only remove the /APPCONTAINER linker flag when building tests in order to produce correct DLLs in UWP.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contribution!

Please take a look on comment below.

if(WINRT AND BUILD_TESTS)
# removing APPCONTAINER from tests to run from console
# look for detailed description inside of ocv_create_module macro above
add_custom_command(TARGET "opencv_perf_${name}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performance tests are under BUILD_PERF_TESTS guard (line 1125).
Perhaps we need to turn off both BUILD_TESTS / BUILD_PERF_TESTS flags in vcpkg.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review!
I reverted to just if(WINRT) for this instance.

@alalek alalek merged commit f18cbd0 into opencv:master Aug 3, 2019
@alalek alalek mentioned this pull request Aug 5, 2019
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
Fix build for UWP (opencv#15207)

* Guard non-WinRT calls to fix UWP build

* Remove unnecessary guard for WinRT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: build/install platform: winrt/uwp port/backport done Label for maintainers. Authors of PR can ignore this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build OpenCV 4.0.1 for UWP

2 participants