This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Gregorio Litenstein Date: Thu, 31 Aug 2017 18:27:53 -0300 Subject: [PATCH] Update patch-1 for opencv-3.3.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index 1111111..2222222 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ if(NOT DEFINED CMAKE_INSTALL_PREFIX) if(NOT CMAKE_TOOLCHAIN_FILE) # it _must_ go before project(OpenCV) in order to work if(WIN32) - set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory") + #set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory") else() set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory") endif() diff --git a/CMakeLists.txt.orig b/CMakeLists.txt index 1b6b95e5..15d86af2 100644 --- a/CMakeLists.txt.orig +++ b/CMakeLists.txt @@ -44,7 +44,7 @@ if(NOT DEFINED CMAKE_INSTALL_PREFIX) #Android: set output folder to ${CMAKE_BINARY_DIR} set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "root for library output, set this to change where android libs are compiled to" ) # any crosscompiling - set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory") + #set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory") endif(NOT CMAKE_TOOLCHAIN_FILE) endif() diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake index 1111111..2222222 100644 --- a/cmake/OpenCVFindLibsGrfmt.cmake +++ b/cmake/OpenCVFindLibsGrfmt.cmake @@ -2,6 +2,11 @@ # Detect 3rd-party image IO libraries # ---------------------------------------------------------------------------- +# --- lzma (required by apps, examples, perf, tests) --- +if(BUILD_opencv_apps OR BUILD_EXAMPLES OR BUILD_PERF_TESTS OR BUILD_TESTS) + include(cmake/OpenCVFindLZMA.cmake) +endif() + # --- zlib (required) --- if(BUILD_ZLIB) ocv_clear_vars(ZLIB_FOUND) @@ -26,6 +31,11 @@ if(NOT ZLIB_FOUND) ocv_parse_header2(ZLIB "${${ZLIB_LIBRARY}_SOURCE_DIR}/zlib.h" ZLIB_VERSION) endif() +# --- lcms (required by apps, examples, perf, tests) --- +if(BUILD_opencv_apps OR BUILD_EXAMPLES OR BUILD_PERF_TESTS OR BUILD_TESTS) + include(cmake/OpenCVFindLCMS.cmake) +endif() + # --- libtiff (optional, should be searched after zlib) --- if(WITH_TIFF) if(BUILD_TIFF) diff --git a/cmake/OpenCVFindLibsVideo.cmake b/cmake/OpenCVFindLibsVideo.cmake index 1111111..2222222 100644 --- a/cmake/OpenCVFindLibsVideo.cmake +++ b/cmake/OpenCVFindLibsVideo.cmake @@ -272,15 +272,15 @@ endif(WITH_MSMF) # --- Extra HighGUI and VideoIO libs on Windows --- if(WIN32) - list(APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32 setupapi ws2_32) + list(APPEND HIGHGUI_LIBRARIES -lcomctl32 -lcomdlg32 -lgdi32 -lole32 -lsetupapi -lws2_32 -lvfw32 -lstrmiids -loleaut32 -luuid) if(HAVE_VFW) list(APPEND VIDEOIO_LIBRARIES vfw32) endif() if(MINGW64) - list(APPEND VIDEOIO_LIBRARIES avifil32 avicap32 winmm msvfw32) - list(REMOVE_ITEM VIDEOIO_LIBRARIES vfw32) + list(APPEND VIDEOIO_LIBRARIES -lavifil32 -lavicap32 -lwinmm -lmsvfw32) + list(REMOVE_ITEM VIDEOIO_LIBRARIES -lvfw32) elseif(MINGW) - list(APPEND VIDEOIO_LIBRARIES winmm) + list(APPEND VIDEOIO_LIBRARIES -lwinmm) endif() endif(WIN32) diff --git a/cmake/templates/opencv-XXX.pc.in b/cmake/templates/opencv-XXX.pc.in index 1111111..2222222 100644 --- a/cmake/templates/opencv-XXX.pc.in +++ b/cmake/templates/opencv-XXX.pc.in @@ -9,6 +9,7 @@ includedir_new=@includedir@ Name: OpenCV Description: Open Source Computer Vision Library Version: @OPENCV_VERSION_PLAIN@ +Requires: OpenEXR libtiff-4 Libs: @OPENCV_PC_LIBS@ -Libs.private: @OPENCV_PC_LIBS_PRIVATE@ +Libs.private: @OPENCV_PC_LIBS_PRIVATE@ -luuid -loleaut32 Cflags: -I${includedir_old} -I${includedir_new} diff --git a/modules/core/src/lapack.cpp b/modules/core/src/lapack.cpp index 1111111..2222222 100644 --- a/modules/core/src/lapack.cpp +++ b/modules/core/src/lapack.cpp @@ -608,7 +608,7 @@ void hal::SVD32f(float* At, size_t astep, float* W, float* U, size_t ustep, floa void hal::SVD64f(double* At, size_t astep, double* W, double* U, size_t ustep, double* Vt, size_t vstep, int m, int n, int n1) { CALL_HAL(SVD64f, cv_hal_SVD64f, At, astep, W, U, ustep, Vt, vstep, m, n, decodeSVDParameters(U, Vt, m, n, n1)) - JacobiSVDImpl_(At, astep, W, Vt, vstep, m, n, !Vt ? 0 : n1 < 0 ? n : n1, DBL_MIN, DBL_EPSILON*10); + JacobiSVDImpl_(At, astep, W, Vt, vstep, m, n, !Vt ? 0 : n1 < 0 ? n : n1, DBL_MIN, DBL_EPSILON*10L); } /* y[0:m,0:n] += diag(a[0:1,0:m]) * x[0:m,0:n] */ diff --git a/modules/core/src/precomp.hpp b/modules/core/src/precomp.hpp index 1111111..2222222 100644 --- a/modules/core/src/precomp.hpp +++ b/modules/core/src/precomp.hpp @@ -60,7 +60,7 @@ #include #include -#include +#include #include #include #include diff --git a/modules/videoio/CMakeLists.txt b/modules/videoio/CMakeLists.txt index 1111111..2222222 100644 --- a/modules/videoio/CMakeLists.txt +++ b/modules/videoio/CMakeLists.txt @@ -231,6 +231,10 @@ if(WIN32) include_directories(AFTER SYSTEM "${OpenCV_SOURCE_DIR}/3rdparty/include/ffmpeg_") # for tests endif() +if(WIN32) + add_definitions(-DSTRSAFE_NO_DEPRECATE) +endif() + if(UNIX) #these variables are set by CHECK_MODULE macro foreach(P ${VIDEOIO_INCLUDE_DIRS})