Skip to content

Commit

Permalink
[opencv2] Use DEBUG_POSTFIX in pkgconfig files (microsoft#42113)
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinltomra authored Nov 12, 2024
1 parent 91e3894 commit 89f00b3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
15 changes: 15 additions & 0 deletions ports/opencv2/0021-pkgconfig-suffix.patch
Original file line number Diff line number Diff line change
@@ -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}")
1 change: 1 addition & 0 deletions ports/opencv2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion ports/opencv2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6650,7 +6650,7 @@
},
"opencv2": {
"baseline": "2.4.13.7",
"port-version": 21
"port-version": 22
},
"opencv3": {
"baseline": "3.4.18",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/opencv2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "185c7b075159f3fae48b84163c487c6bfcd56c5a",
"version": "2.4.13.7",
"port-version": 22
},
{
"git-tree": "5e1c99f5f3fe591f1d87befd960c994dab246dcc",
"version": "2.4.13.7",
Expand Down

0 comments on commit 89f00b3

Please sign in to comment.