blob: 3f0e45ca5c763f13064c29e5989d7e765aa9f871 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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}")
|