mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[OpenCV3] fix protobuf linking (#4861)
This commit is contained in:
parent
42fd0c982a
commit
cd7eb41290
@ -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()
|
||||
|
@ -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 @@
|
||||
|
22
ports/opencv/0005-remove-custom-protobuf-find-package.patch
Normal file
22
ports/opencv/0005-remove-custom-protobuf-find-package.patch
Normal file
@ -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()
|
@ -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()
|
@ -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
|
||||
|
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user