[opencv2] Use DEBUG_POSTFIX in pkgconfig files (#42113)

This commit is contained in:
Gavin Lambert 2024-11-12 20:38:04 +13:00 committed by GitHub
parent 91e3894986
commit 89f00b3b86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 23 additions and 2 deletions

View file

@ -0,0 +1,15 @@
--- a/cmake/OpenCVGenPkgconfig.cmake
+++ b/cmake/OpenCVGenPkgconfig.cmake
@@ -54,6 +54,12 @@ foreach(CVLib ${OpenCV_LIB_COMPONENTS})
set(libname "${CVLib}")
endif()
+ string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type)
+ get_target_property(libsuffix ${CVLib} ${build_type}_POSTFIX)
+ if(libsuffix)
+ string(APPEND libname "${libsuffix}")
+ endif()
+
set(libpath "\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}")
list(APPEND OpenCV_LIB_COMPONENTS_ "-L${libpath}")
list(APPEND OpenCV_LIB_COMPONENTS_ "-l${libname}")

View file

@ -12,6 +12,7 @@ vcpkg_from_github(
0007-fix-config.patch
0019-fix-openexr.patch
0020-missing-include.patch
0021-pkgconfig-suffix.patch
)
# Disallow accidental build of vendored copies
file(REMOVE_RECURSE "${SOURCE_PATH}/3rdparty/openexr")

View file

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

View file

@ -6650,7 +6650,7 @@
},
"opencv2": {
"baseline": "2.4.13.7",
"port-version": 21
"port-version": 22
},
"opencv3": {
"baseline": "3.4.18",

View file

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "185c7b075159f3fae48b84163c487c6bfcd56c5a",
"version": "2.4.13.7",
"port-version": 22
},
{
"git-tree": "5e1c99f5f3fe591f1d87befd960c994dab246dcc",
"version": "2.4.13.7",