Skip to content

Commit

Permalink
[opencv] update to 4.9 (microsoft#38928)
Browse files Browse the repository at this point in the history
Co-authored-by: Howard Su <[email protected]>
Co-authored-by: Nick Logozzo <[email protected]>
Co-authored-by: sidy3d <[email protected]>
Co-authored-by: c8ef <[email protected]>
Co-authored-by: autoantwort <[email protected]>
Co-authored-by: jim wang <[email protected]>
Co-authored-by: Lily Wang <[email protected]>
Co-authored-by: Lily Wang <[email protected]>
Co-authored-by: Matthias Kuhn <[email protected]>
Co-authored-by: Mark Harmstone <[email protected]>
Co-authored-by: Kai Pastor <[email protected]>
Co-authored-by: Alexandre Bique <[email protected]>
Co-authored-by: Peter Adam Korodi <[email protected]>
Co-authored-by: Jakub Melka <[email protected]>
Co-authored-by: LE GARREC Vincent <[email protected]>
Co-authored-by: Josh Harris <[email protected]>
Co-authored-by: Theodore Tsirpanis <[email protected]>
Co-authored-by: Kaoru <[email protected]>
Co-authored-by: Javier Matos Denizac <[email protected]>
Co-authored-by: Javier Matos <[email protected]>
Co-authored-by: Pravila <[email protected]>
Co-authored-by: JacobBarthelmeh <[email protected]>
Co-authored-by: myd7349 <[email protected]>
Co-authored-by: Billy O'Neal <[email protected]>
Co-authored-by: Frank <[email protected]>
Co-authored-by: Cheney Wang <[email protected]>
Co-authored-by: 王太阳 <[email protected]>
Co-authored-by: 王方凯 <[email protected]>
Co-authored-by: Chuck Walbourn <[email protected]>
Co-authored-by: Jaap Aarts <[email protected]>
  • Loading branch information
1 parent 9dc5f80 commit ca1501f
Show file tree
Hide file tree
Showing 64 changed files with 1,352 additions and 1,227 deletions.
61 changes: 0 additions & 61 deletions ports/darknet/fix-dependence-getopt.patch

This file was deleted.

15 changes: 7 additions & 8 deletions ports/darknet/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO AlexeyAB/darknet
REF 8a0bf84c19e38214219dbd3345f04ce778426c57
SHA512 6253d5b498f4f6eba7fc539d5a4b4e163139f4841623f11d84760bcf1ffabe6519f85e98e3d4aeac6846313fea3b98451407134b6b6f5b91137c62d1647109d9
REF 19dde2f296941a75b0b9202cccd59528bde7f65a
SHA512 3f24fd5c69a00032e63fc8479d46dedf9008909c5e0f37847f0427c39f35e68f35a5ee89820cd0a179cb282e49730e6b1465a027d89bef585e9a1cfca6e3d3a2
HEAD_REF master
PATCHES
fix-dependence-getopt.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand All @@ -16,7 +14,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

#do not move following features to vcpkg_check_features because they break themselves: one off will turn off the others even if true
set(ENABLE_OPENCV FALSE)
if ("opencv-base" IN_LIST FEATURES OR "opencv2-base" IN_LIST FEATURES OR "opencv3-base" IN_LIST FEATURES OR "opencv-cuda" IN_LIST FEATURES OR "opencv2-cuda" IN_LIST FEATURES OR "opencv3-cuda" IN_LIST FEATURES)
if ("opencv-base" IN_LIST FEATURES OR "opencv-cuda" IN_LIST FEATURES)
set(ENABLE_OPENCV TRUE)
endif()

Expand All @@ -34,16 +32,17 @@ file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/Modules")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
OPTIONS
${FEATURE_OPTIONS}
-DINSTALL_BIN_DIR:STRING=bin
-DINSTALL_LIB_DIR:STRING=lib
-DENABLE_OPENCV:BOOL=${ENABLE_OPENCV}
-DSKIP_INSTALL_RUNTIME_LIBS:BOOL=ON
)

vcpkg_cmake_install()
vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES darknet uselib)
if ("opencv-cuda" IN_LIST FEATURES OR "opencv3-cuda" IN_LIST FEATURES)
vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES darknet uselib kmeansiou)
if ("opencv-cuda" IN_LIST FEATURES)
vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES uselib_track)
endif()

Expand Down
61 changes: 1 addition & 60 deletions ports/darknet/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "darknet",
"version-date": "2022-03-06",
"port-version": 4,
"version-date": "2024-10-10",
"description": "Darknet is an open source neural network framework written in C and CUDA. You only look once (YOLO) is a state-of-the-art, real-time object detection system, best example of darknet functionalities.",
"homepage": "https://github.com/alexeyab/darknet",
"license": null,
Expand Down Expand Up @@ -54,8 +53,6 @@
{
"name": "opencv",
"features": [
"contrib",
"dnn",
"ffmpeg"
]
}
Expand All @@ -80,62 +77,6 @@
]
}
]
},
"opencv2-base": {
"description": "Build darknet with support for OpenCV2",
"dependencies": [
{
"name": "opencv2",
"features": [
"ffmpeg"
]
}
]
},
"opencv2-cuda": {
"description": "Build darknet with support for CUDA-enabled OpenCV2",
"dependencies": [
{
"name": "opencv2",
"features": [
"cuda",
"ffmpeg"
]
}
]
},
"opencv3-base": {
"description": "Build darknet with support for OpenCV3",
"dependencies": [
{
"name": "opencv3",
"features": [
"contrib",
"dnn",
"ffmpeg"
]
}
]
},
"opencv3-cuda": {
"description": "Build darknet with support for CUDA-enabled OpenCV3",
"dependencies": [
{
"name": "darknet",
"features": [
"cuda"
]
},
{
"name": "opencv3",
"features": [
"contrib",
"cuda",
"dnn",
"ffmpeg"
]
}
]
}
}
}
9 changes: 2 additions & 7 deletions ports/opencv/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)

file(INSTALL "${CURRENT_INSTALLED_DIR}/share/opencv4/OpenCVConfig.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CURRENT_INSTALLED_DIR}/share/opencv4/OpenCVConfig-version.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CURRENT_INSTALLED_DIR}/share/opencv4/OpenCVModules.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CURRENT_INSTALLED_DIR}/share/opencv4/OpenCVModules-release.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
if (NOT VCPKG_BUILD_TYPE)
file(INSTALL "${CURRENT_INSTALLED_DIR}/share/opencv4/OpenCVModules-debug.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
endif()
set(USE_OPENCV_VERSION "4")
configure_file("${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/opencv/vcpkg-cmake-wrapper.cmake" @ONLY)
3 changes: 3 additions & 0 deletions ports/opencv/vcpkg-cmake-wrapper.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(OpenCV_DIR "${CMAKE_CURRENT_LIST_DIR}/../opencv@USE_OPENCV_VERSION@/" CACHE PATH "Path to OpenCVConfig.cmake" FORCE)
set(OpenCV_ROOT "${CMAKE_CURRENT_LIST_DIR}/../opencv@USE_OPENCV_VERSION@/")
_find_package(${ARGS})
Loading

0 comments on commit ca1501f

Please sign in to comment.