diff options
Diffstat (limited to 'meta-oe/recipes-support/opencv/opencv/opencv-fix-pkgconfig-generation.patch')
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv/opencv-fix-pkgconfig-generation.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/opencv/opencv/opencv-fix-pkgconfig-generation.patch b/meta-oe/recipes-support/opencv/opencv/opencv-fix-pkgconfig-generation.patch new file mode 100644 index 000000000..d352778c9 --- /dev/null +++ b/meta-oe/recipes-support/opencv/opencv/opencv-fix-pkgconfig-generation.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | Fix pkg-config generation | ||
2 | |||
3 | Replace absolute library path with library name spec and library search | ||
4 | path option. | ||
5 | |||
6 | The fix has been provided by Ray Rashif (code.opencv.org/issues/1925) | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | diff -Nbaur OpenCV-2.4.3.orig/cmake/OpenCVGenPkgconfig.cmake OpenCV-2.4.3/cmake/OpenCVGenPkgconfig.cmake | ||
11 | --- OpenCV-2.4.3.orig/cmake/OpenCVGenPkgconfig.cmake 2012-11-04 08:40:14.243505926 +0000 | ||
12 | +++ OpenCV-2.4.3/cmake/OpenCVGenPkgconfig.cmake 2012-11-04 08:40:42.286649120 +0000 | ||
13 | @@ -10,7 +10,7 @@ | ||
14 | # ------------------------------------------------------------------------------------------- | ||
15 | set(prefix "${CMAKE_INSTALL_PREFIX}") | ||
16 | set(exec_prefix "\${prefix}") | ||
17 | -set(libdir "") #TODO: need link paths for OpenCV_EXTRA_COMPONENTS | ||
18 | +set(libdir "\${prefix}/${OPENCV_LIB_INSTALL_PATH}") | ||
19 | set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}") | ||
20 | set(VERSION ${OPENCV_VERSION}) | ||
21 | |||
22 | @@ -36,10 +36,11 @@ | ||
23 | ocv_list_reverse(OpenCV_EXTRA_COMPONENTS) | ||
24 | |||
25 | #build the list of components | ||
26 | -set(OpenCV_LIB_COMPONENTS_ "") | ||
27 | +set(OpenCV_LIB_COMPONENTS_ "-L\${libdir}") | ||
28 | foreach(CVLib ${OpenCV_LIB_COMPONENTS}) | ||
29 | get_target_property(libpath ${CVLib} LOCATION_${CMAKE_BUILD_TYPE}) | ||
30 | get_filename_component(libname "${libpath}" NAME) | ||
31 | + get_filename_component(lname "${libpath}" NAME_WE) | ||
32 | |||
33 | if(INSTALL_TO_MANGLED_PATHS) | ||
34 | set(libname "${libname}.${OPENCV_VERSION}") | ||
35 | @@ -52,7 +53,8 @@ | ||
36 | set(installDir "${OPENCV_LIB_INSTALL_PATH}") | ||
37 | endif() | ||
38 | |||
39 | - set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} \${exec_prefix}/${installDir}/${libname}") | ||
40 | + string(REPLACE "libopencv" "-lopencv" lname "${lname}") | ||
41 | + set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} ${lname}") | ||
42 | endforeach() | ||
43 | |||
44 | # add extra dependencies required for OpenCV | ||