|
|
e99b60 |
diff -up OpenCV-2.4.2/cmake/OpenCVGenPkgconfig.cmake.pkgcmake OpenCV-2.4.2/cmake/OpenCVGenPkgconfig.cmake
|
|
|
e99b60 |
--- OpenCV-2.4.2/cmake/OpenCVGenPkgconfig.cmake.pkgcmake 2012-06-29 00:55:15.000000000 +0200
|
|
|
e99b60 |
+++ OpenCV-2.4.2/cmake/OpenCVGenPkgconfig.cmake 2012-07-09 14:53:33.338597708 +0200
|
|
|
e99b60 |
@@ -10,7 +10,7 @@
|
|
|
e99b60 |
# -------------------------------------------------------------------------------------------
|
|
|
e99b60 |
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
|
|
e99b60 |
set(exec_prefix "\${prefix}")
|
|
|
e99b60 |
-set(libdir "") #TODO: need link paths for OpenCV_EXTRA_COMPONENTS
|
|
|
e99b60 |
+set(libdir "\${prefix}/${OPENCV_LIB_INSTALL_PATH}")
|
|
|
e99b60 |
set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}")
|
|
|
e99b60 |
set(VERSION ${OPENCV_VERSION})
|
|
|
e99b60 |
|
|
|
e99b60 |
@@ -36,7 +36,7 @@ ocv_list_reverse(OpenCV_LIB_COMPONENTS)
|
|
|
e99b60 |
ocv_list_reverse(OpenCV_EXTRA_COMPONENTS)
|
|
|
e99b60 |
|
|
|
e99b60 |
#build the list of components
|
|
|
e99b60 |
-set(OpenCV_LIB_COMPONENTS_ "")
|
|
|
e99b60 |
+set(OpenCV_LIB_COMPONENTS_ "-L\${libdir}")
|
|
|
e99b60 |
foreach(CVLib ${OpenCV_LIB_COMPONENTS})
|
|
|
e99b60 |
get_target_property(libpath ${CVLib} LOCATION_${CMAKE_BUILD_TYPE})
|
|
|
e99b60 |
get_filename_component(libname "${libpath}" NAME)
|
|
|
e99b60 |
@@ -51,8 +51,10 @@ foreach(CVLib ${OpenCV_LIB_COMPONENTS})
|
|
|
e99b60 |
else()
|
|
|
e99b60 |
set(installDir "${OPENCV_LIB_INSTALL_PATH}")
|
|
|
e99b60 |
endif()
|
|
|
e99b60 |
-
|
|
|
e99b60 |
- set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} \${exec_prefix}/${installDir}/${libname}")
|
|
|
e99b60 |
+ string(REPLACE "libopencv" "-lopencv" libname "${libname}")
|
|
|
e99b60 |
+ string(REPLACE ".so" "" libname "${libname}")
|
|
|
e99b60 |
+ string(REPLACE ".dylib" "" libname "${libname}")
|
|
|
e99b60 |
+ set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} ${libname}")
|
|
|
e99b60 |
endforeach()
|
|
|
e99b60 |
|
|
|
e99b60 |
# add extra dependencies required for OpenCV
|