blob: 84d268e613cdb3d235ee54bc9c4f3e486435578e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
diff -Nbaur OpenCV-2.4.3.orig/cmake/OpenCVGenPkgconfig.cmake OpenCV-2.4.3/cmake/OpenCVGenPkgconfig.cmake
--- OpenCV-2.4.3.orig/cmake/OpenCVGenPkgconfig.cmake 2012-11-04 08:40:14.243505926 +0000
+++ OpenCV-2.4.3/cmake/OpenCVGenPkgconfig.cmake 2012-11-04 08:40:42.286649120 +0000
@@ -10,7 +10,7 @@
# -------------------------------------------------------------------------------------------
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
-set(libdir "") #TODO: need link paths for OpenCV_EXTRA_COMPONENTS
+set(libdir "\${prefix}/${OPENCV_LIB_INSTALL_PATH}")
set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}")
set(VERSION ${OPENCV_VERSION})
@@ -36,10 +36,11 @@
ocv_list_reverse(OpenCV_EXTRA_COMPONENTS)
#build the list of components
-set(OpenCV_LIB_COMPONENTS_ "")
+set(OpenCV_LIB_COMPONENTS_ "-L\${libdir}")
foreach(CVLib ${OpenCV_LIB_COMPONENTS})
get_target_property(libpath ${CVLib} LOCATION_${CMAKE_BUILD_TYPE})
get_filename_component(libname "${libpath}" NAME)
+ get_filename_component(lname "${libpath}" NAME_WE)
if(INSTALL_TO_MANGLED_PATHS)
set(libname "${libname}.${OPENCV_VERSION}")
@@ -52,7 +53,8 @@
set(installDir "${OPENCV_LIB_INSTALL_PATH}")
endif()
- set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} \${exec_prefix}/${installDir}/${libname}")
+ string(REPLACE "libopencv" "-lopencv" lname "${lname}")
+ set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} ${lname}")
endforeach()
# add extra dependencies required for OpenCV
|