summaryrefslogtreecommitdiff
path: root/debian/patches/support_multiarch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/support_multiarch')
-rw-r--r--debian/patches/support_multiarch34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/support_multiarch b/debian/patches/support_multiarch
new file mode 100644
index 0000000..b0b8c18
--- /dev/null
+++ b/debian/patches/support_multiarch
@@ -0,0 +1,34 @@
+Description: Support multiarch
+Author: Nobuhiro Iwamatsu <iwamatsu@debian.org>
+Forwarded: no
+Last-Update: <2014-07-01>
+
+index b610ecf..3ebacf3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -312,7 +312,7 @@ else()
+ set(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}")
+ set(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native)
+ else()
+- set(OPENCV_LIB_INSTALL_PATH lib${LIB_SUFFIX})
++ set(OPENCV_LIB_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX})
+ set(OPENCV_3P_LIB_INSTALL_PATH share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH})
+ set(OPENCV_SAMPLES_SRC_INSTALL_PATH share/OpenCV/samples)
+ endif()
+@@ -320,7 +320,7 @@ else()
+
+ math(EXPR SIZEOF_VOID_P_BITS "8 * ${CMAKE_SIZEOF_VOID_P}")
+ if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX)
+- set(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/cmake/opencv)
++ set(OPENCV_CONFIG_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}/cmake/opencv)
+ else()
+ set(OPENCV_CONFIG_INSTALL_PATH share/OpenCV)
+ endif()
+@@ -427,6 +427,7 @@ if(UNIX)
+ include(cmake/OpenCVFindPkgConfig.cmake OPTIONAL)
+ include(CheckFunctionExists)
+ include(CheckIncludeFile)
++ include(GNUInstallDirs)
+
+ if(NOT APPLE)
+ CHECK_INCLUDE_FILE(pthread.h HAVE_LIBPTHREAD)