vcpkg/ports/opencv3/0009-fix-uwp.patch

45 lines
1.8 KiB
Diff

diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake
index 8b1267d..f67c2c2 100644
--- a/cmake/OpenCVModule.cmake
+++ b/cmake/OpenCVModule.cmake
@@ -1162,7 +1162,7 @@ function(ocv_add_perf_tests)
set_target_properties(${the_target} PROPERTIES FOLDER "tests performance")
endif()
- if(WINRT)
+ 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}"
diff --git a/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp b/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp
index f4147f3..b92efdd 100644
--- a/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp
+++ b/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp
@@ -24,6 +24,7 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
+#include "opencv2/core/cvdef.h"
using namespace Windows::UI::Xaml::Controls;
namespace cv
diff --git a/modules/highgui/src/window_winrt_bridge.hpp b/modules/highgui/src/window_winrt_bridge.hpp
index 25f4aef..5429f0b 100644
--- a/modules/highgui/src/window_winrt_bridge.hpp
+++ b/modules/highgui/src/window_winrt_bridge.hpp
@@ -28,6 +28,7 @@
#include <map>
#include <opencv2\core.hpp>
+#include "opencv2/highgui/highgui_c.h"
using namespace Windows::UI::Xaml::Controls;
diff --git a/cmake/platforms/OpenCV-WindowsStore.cmake b/cmake/platforms/OpenCV-WindowsStore.cmake
index 8b5dfa5..efc8b4f 100644
--- a/cmake/platforms/OpenCV-WindowsStore.cmake
+++ b/cmake/platforms/OpenCV-WindowsStore.cmake
@@ -1 +1 @@
-include("${CMAKE_CURRENT_LIST_DIR}/OpenCV_WinRT.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/OpenCV-WinRT.cmake")