diff options
| author | Stefano Sinigardi <stesinigardi@hotmail.com> | 2018-12-11 18:34:00 +0100 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-12-11 09:34:00 -0800 |
| commit | cd7eb41290874fa61042808d3f03961d479671f9 (patch) | |
| tree | 8a8e03cacdbd184fcdae490f7131e26ab7e12e40 | |
| parent | 42fd0c982a2e201674cea1979457079bb1bce046 (diff) | |
| download | vcpkg-cd7eb41290874fa61042808d3f03961d479671f9.tar.gz vcpkg-cd7eb41290874fa61042808d3f03961d479671f9.zip | |
[OpenCV3] fix protobuf linking (#4861)
| -rw-r--r-- | ports/opencv/0001-winrt-fixes.patch | 4 | ||||
| -rw-r--r-- | ports/opencv/0002-install-options.patch | 12 | ||||
| -rw-r--r-- | ports/opencv/0005-remove-custom-protobuf-find-package.patch | 22 | ||||
| -rw-r--r-- | ports/opencv/0005-remove-protobuf-target.patch | 22 | ||||
| -rw-r--r-- | ports/opencv/CONTROL | 2 | ||||
| -rw-r--r-- | ports/opencv/portfile.cmake | 3 |
6 files changed, 25 insertions, 40 deletions
diff --git a/ports/opencv/0001-winrt-fixes.patch b/ports/opencv/0001-winrt-fixes.patch index fa8c8cfc9..b2fe1a021 100644 --- a/ports/opencv/0001-winrt-fixes.patch +++ b/ports/opencv/0001-winrt-fixes.patch @@ -19,8 +19,6 @@ 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 @@ @@ -31,8 +29,6 @@ index 25f4aef..5429f0b 100644 using namespace Windows::UI::Xaml::Controls; -diff --git a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp -index 236e227..e2417dc 100644 --- a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp +++ b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp @@ -94,10 +94,10 @@ Media::CaptureFrameGrabber::~CaptureFrameGrabber() diff --git a/ports/opencv/0002-install-options.patch b/ports/opencv/0002-install-options.patch index 03e1334f1..0719a7cb9 100644 --- a/ports/opencv/0002-install-options.patch +++ b/ports/opencv/0002-install-options.patch @@ -1,5 +1,3 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c7c76ecf3..d1c14bfcd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,6 +312,10 @@ OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF ) @@ -48,8 +46,6 @@ index c7c76ecf3..d1c14bfcd 100644 install(FILES ${OPENCV_LICENSE_FILE} PERMISSIONS OWNER_READ GROUP_READ WORLD_READ DESTINATION ./ COMPONENT libs) -diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake -index b2ca82bad..c2f6e001d 100644 --- a/cmake/OpenCVGenConfig.cmake +++ b/cmake/OpenCVGenConfig.cmake @@ -105,7 +105,7 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) @@ -70,8 +66,6 @@ index b2ca82bad..c2f6e001d 100644 if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) if(BUILD_SHARED_LIBS) set(_lib_suffix "lib") -diff --git a/cmake/OpenCVGenHeaders.cmake b/cmake/OpenCVGenHeaders.cmake -index 477b91055..57dc82e13 100644 --- a/cmake/OpenCVGenHeaders.cmake +++ b/cmake/OpenCVGenHeaders.cmake @@ -1,7 +1,9 @@ @@ -94,8 +88,6 @@ index 477b91055..57dc82e13 100644 + install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) +endif() \ No newline at end of file -diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake -index 54f100d3c..eae83b074 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake @@ -1000,7 +1000,9 @@ macro(_ocv_create_module) @@ -109,8 +101,6 @@ index 54f100d3c..eae83b074 100644 endif() endforeach() endif() -diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt -index 1f0d72008..86b9d8929 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,8 +1,10 @@ @@ -126,8 +116,6 @@ index 1f0d72008..86b9d8929 100644 if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) install(DIRECTORY "${OPENCV_TEST_DATA_PATH}/" DESTINATION "${OPENCV_TEST_DATA_INSTALL_PATH}" COMPONENT "tests") -diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt -index b4e48e6fa..5ac6f1603 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,7 +1,9 @@ diff --git a/ports/opencv/0005-remove-custom-protobuf-find-package.patch b/ports/opencv/0005-remove-custom-protobuf-find-package.patch new file mode 100644 index 000000000..2944810e5 --- /dev/null +++ b/ports/opencv/0005-remove-custom-protobuf-find-package.patch @@ -0,0 +1,22 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -633,7 +633,7 @@ include(cmake/OpenCVFindLibsGUI.cmake) + include(cmake/OpenCVFindLibsVideo.cmake) + include(cmake/OpenCVFindLibsPerf.cmake) + include(cmake/OpenCVFindLAPACK.cmake) +-include(cmake/OpenCVFindProtobuf.cmake) ++find_package(protobuf) + + # ---------------------------------------------------------------------------- + # Detect other 3rd-party libraries/tools +--- a/modules/dnn/CMakeLists.txt ++++ b/modules/dnn/CMakeLists.txt +@@ -78,7 +78,7 @@ endif() + + set(include_dirs ${fw_inc}) + set(sources_options "") +-set(libs libprotobuf ${LAPACK_LIBRARIES}) ++set(libs protobuf ${LAPACK_LIBRARIES}) + if(OPENCV_DNN_OPENCL AND HAVE_OPENCL) + list(APPEND include_dirs ${OPENCL_INCLUDE_DIRS}) + else() diff --git a/ports/opencv/0005-remove-protobuf-target.patch b/ports/opencv/0005-remove-protobuf-target.patch deleted file mode 100644 index a31e6d168..000000000 --- a/ports/opencv/0005-remove-protobuf-target.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/cmake/OpenCVFindProtobuf.cmake b/cmake/OpenCVFindProtobuf.cmake -index b9171f14f..6e06310b1 100644 ---- a/cmake/OpenCVFindProtobuf.cmake -+++ b/cmake/OpenCVFindProtobuf.cmake -@@ -43,17 +43,6 @@ else() - # end of compatibility block - - if(Protobuf_FOUND) -- if(TARGET protobuf::libprotobuf) -- add_library(libprotobuf INTERFACE) -- target_link_libraries(libprotobuf INTERFACE protobuf::libprotobuf) -- else() -- add_library(libprotobuf UNKNOWN IMPORTED) -- set_target_properties(libprotobuf PROPERTIES -- IMPORTED_LOCATION "${Protobuf_LIBRARY}" -- INTERFACE_INCLUDE_SYSTEM_DIRECTORIES "${Protobuf_INCLUDE_DIR}" -- ) -- get_protobuf_version(Protobuf_VERSION "${Protobuf_INCLUDE_DIR}") -- endif() - set(HAVE_PROTOBUF TRUE) - endif() - endif() diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index e1d1248b0..5f012d80e 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.4.3-3 +Version: 3.4.3-4 Build-Depends: zlib Description: computer vision library Default-Features: opengl, jpeg, png, tiff, eigen, flann diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 966c914b0..6fbb535cf 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -13,7 +13,7 @@ vcpkg_from_github( "${CMAKE_CURRENT_LIST_DIR}/0002-install-options.patch" "${CMAKE_CURRENT_LIST_DIR}/0003-disable-downloading.patch" "${CMAKE_CURRENT_LIST_DIR}/0004-use-find-package-required.patch" - "${CMAKE_CURRENT_LIST_DIR}/0005-remove-protobuf-target.patch" + "${CMAKE_CURRENT_LIST_DIR}/0005-remove-custom-protobuf-find-package.patch" ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) @@ -291,6 +291,7 @@ vcpkg_configure_cmake( -DWITH_JASPER=${WITH_JASPER} -DWITH_JPEG=${WITH_JPEG} -DWITH_LAPACK=OFF + -DWITH_MATLAB=OFF -DWITH_MSMF=${WITH_MSMF} -DWITH_OPENCLAMDBLAS=OFF -DWITH_OPENEXR=${WITH_OPENEXR} |
