[opencv] Fix import paths for debug Android builds (#24394)

* [opencv4] Fix import paths for debug Android builds

* [opencv3] Fix import paths for debug Android builds in the same way as v4

* Only apply changes to OpenCVModules-debug.cmake when it is expected to exist
This commit is contained in:
hh10k 2022-05-06 01:58:07 +08:00 committed by GitHub
parent 4b766c1cd1
commit fd6a336227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 4 deletions

View File

@ -377,6 +377,14 @@ vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv") vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv")
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
# Update debug paths for libs in Android builds (e.g. sdk/native/staticlibs/armeabi-v7a)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-debug.cmake"
"\${_IMPORT_PREFIX}/sdk"
"\${_IMPORT_PREFIX}/debug/sdk"
)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(READ "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" OPENCV_MODULES) file(READ "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" OPENCV_MODULES)
set(DEPS_STRING "include(CMakeFindDependencyMacro) set(DEPS_STRING "include(CMakeFindDependencyMacro)

View File

@ -1,7 +1,7 @@
{ {
"name": "opencv3", "name": "opencv3",
"version": "3.4.16", "version": "3.4.16",
"port-version": 7, "port-version": 8,
"description": "Open Source Computer Vision Library", "description": "Open Source Computer Vision Library",
"homepage": "https://github.com/opencv/opencv", "homepage": "https://github.com/opencv/opencv",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",

View File

@ -457,6 +457,14 @@ vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv") vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv")
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
# Update debug paths for libs in Android builds (e.g. sdk/native/staticlibs/armeabi-v7a)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-debug.cmake"
"\${_IMPORT_PREFIX}/sdk"
"\${_IMPORT_PREFIX}/debug/sdk"
)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(READ "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" OPENCV_MODULES) file(READ "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" OPENCV_MODULES)
set(DEPS_STRING "include(CMakeFindDependencyMacro) set(DEPS_STRING "include(CMakeFindDependencyMacro)

View File

@ -1,7 +1,7 @@
{ {
"name": "opencv4", "name": "opencv4",
"version": "4.5.5", "version": "4.5.5",
"port-version": 3, "port-version": 4,
"description": "computer vision library", "description": "computer vision library",
"homepage": "https://github.com/opencv/opencv", "homepage": "https://github.com/opencv/opencv",
"license": "Apache-2.0", "license": "Apache-2.0",

View File

@ -5098,11 +5098,11 @@
}, },
"opencv3": { "opencv3": {
"baseline": "3.4.16", "baseline": "3.4.16",
"port-version": 7 "port-version": 8
}, },
"opencv4": { "opencv4": {
"baseline": "4.5.5", "baseline": "4.5.5",
"port-version": 3 "port-version": 4
}, },
"opendnp3": { "opendnp3": {
"baseline": "3.1.1", "baseline": "3.1.1",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "d8a8b60a98ada175921aadcd09ed66509c9be2a4",
"version": "3.4.16",
"port-version": 8
},
{ {
"git-tree": "d3c28cb4da2e7da9d31cc72415aff26f0b4d8442", "git-tree": "d3c28cb4da2e7da9d31cc72415aff26f0b4d8442",
"version": "3.4.16", "version": "3.4.16",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "86073388865f7730e42d02768f8963156f2be82f",
"version": "4.5.5",
"port-version": 4
},
{ {
"git-tree": "0771f6243ddde63a9b212efeb5ad51a74b640a62", "git-tree": "0771f6243ddde63a9b212efeb5ad51a74b640a62",
"version": "4.5.5", "version": "4.5.5",