Skip to content

Commit

Permalink
[opencv3/opencv4] Check whether TARGET libprotobuf is defined (micros…
Browse files Browse the repository at this point in the history
…oft#36116)

* fix opencv3

* update version

* fix opencv4

* format

* update version

* add comment

* update git-tree

---------

Co-authored-by: Monica <[email protected]>
  • Loading branch information
MonicaLiu0311 and Monica authored Jan 16, 2024
1 parent a14456f commit a215c6a
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ports/opencv3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(READ "${CURRENT_PACKAGES_DIR}/share/opencv3/OpenCVModules.cmake" OPENCV_MODULES)
set(DEPS_STRING "include(CMakeFindDependencyMacro)
if(${BUILD_opencv_flann})
if(${BUILD_opencv_flann} AND NOT TARGET libprotobuf) #Check if the CMake target libprotobuf is already defined
find_dependency(Protobuf CONFIG REQUIRED)
if(TARGET protobuf::libprotobuf)
add_library (libprotobuf INTERFACE IMPORTED)
Expand Down Expand Up @@ -538,4 +538,4 @@ endif()

configure_file("${CURRENT_PORT_DIR}/usage.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
2 changes: 1 addition & 1 deletion ports/opencv3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opencv3",
"version": "3.4.18",
"port-version": 12,
"port-version": 13,
"description": "Open Source Computer Vision Library",
"homepage": "https://github.com/opencv/opencv",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion ports/opencv4/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ endif()

file(READ "${CURRENT_PACKAGES_DIR}/share/opencv4/OpenCVModules.cmake" OPENCV_MODULES)
set(DEPS_STRING "include(CMakeFindDependencyMacro)
if(${BUILD_opencv_dnn})
if(${BUILD_opencv_dnn} AND NOT TARGET libprotobuf) #Check if the CMake target libprotobuf is already defined
find_dependency(Protobuf CONFIG REQUIRED)
if(TARGET protobuf::libprotobuf)
add_library (libprotobuf INTERFACE IMPORTED)
Expand Down
2 changes: 1 addition & 1 deletion ports/opencv4/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opencv4",
"version": "4.8.0",
"port-version": 14,
"port-version": 15,
"description": "computer vision library",
"homepage": "https://github.com/opencv/opencv",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6274,11 +6274,11 @@
},
"opencv3": {
"baseline": "3.4.18",
"port-version": 12
"port-version": 13
},
"opencv4": {
"baseline": "4.8.0",
"port-version": 14
"port-version": 15
},
"opendnp3": {
"baseline": "3.1.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/opencv3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "577dd8933e58290664f4290476069978692ed4f2",
"version": "3.4.18",
"port-version": 13
},
{
"git-tree": "f5ee69ffa1b6c98a28fc805afffaeb799b4d22a8",
"version": "3.4.18",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/opencv4.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ec4e040d476cee60b2fc21a1f847d30905ac9726",
"version": "4.8.0",
"port-version": 15
},
{
"git-tree": "852583d8f7a5bb15998efad9c0305a8ce686e59b",
"version": "4.8.0",
Expand Down

0 comments on commit a215c6a

Please sign in to comment.