mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
16 lines
534 B
Diff
16 lines
534 B
Diff
--- 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}")
|