diff options
author | Connor Abbott <cwabbott0@gmail.com> | 2011-10-31 16:22:04 +0000 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-11-01 08:35:36 +0100 |
commit | 4d73a968b2cb3ac9e9defd6078942faea44da024 (patch) | |
tree | a29b1421b8c18437c4090fc40f861469b779849a /meta-oe/recipes-support/opencv/opencv | |
parent | 5dc3cb849e4d9f84a2788de9dd096f9c1a5386ea (diff) | |
download | meta-openembedded-4d73a968b2cb3ac9e9defd6078942faea44da024.tar.gz |
opencv: import from oe-classic and upgrade to 2.3.1
OpenCV <= 2.2 won't compile on oe-core due to the lack of v4l1 headers, and therefore wasn't included in this patch.
Also, the support for newer cv2-style python bindings is a bit hacked up at the moment due to the way OpenCV detects the Python version and Numpy headers (see 0001-Fix-CMakeLists.txt-numpy-detection.patch). In particular, it requires the native & target python to be the same version and have similar site-packages directories, which is true at least for now in OE.
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-support/opencv/opencv')
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv/0001-Fix-CMakeLists.txt-numpy-detection.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-Fix-CMakeLists.txt-numpy-detection.patch b/meta-oe/recipes-support/opencv/opencv/0001-Fix-CMakeLists.txt-numpy-detection.patch new file mode 100644 index 000000000..dba00f8a1 --- /dev/null +++ b/meta-oe/recipes-support/opencv/opencv/0001-Fix-CMakeLists.txt-numpy-detection.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From a7301911a3cdf9196abd93ff894a9e86e0bcdc5e Mon Sep 17 00:00:00 2001 | ||
2 | From: Connor Abbott <cwabbott0@gmail.com> | ||
3 | Date: Sun, 30 Oct 2011 20:00:03 -0400 | ||
4 | Subject: [PATCH] Fix CMakeLists.txt numpy detection | ||
5 | |||
6 | Right now, the code opencv uses to detect where the numpy include files are doesn't work with cross-compiling because it uses the native python to determine the environment. To make this a little better, allow the user to explictly specify the path using -DPYTHON_NUMPY_INCLUDE_DIRS=path/to/numpy/include/dir . | ||
7 | Signed-off-by: Connor Abbott <cwabbott0@gmail.com> | ||
8 | --- | ||
9 | CMakeLists.txt | 12 ++++++++---- | ||
10 | 1 files changed, 8 insertions(+), 4 deletions(-) | ||
11 | |||
12 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
13 | index ff8f20c..8edbd78 100644 | ||
14 | --- a/CMakeLists.txt | ||
15 | +++ b/CMakeLists.txt | ||
16 | @@ -715,10 +715,14 @@ IF ("${PYTHON_VERSION_MAJOR_MINOR}" VERSION_GREATER 2.4) | ||
17 | ENDIF() | ||
18 | |||
19 | # Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy | ||
20 | -execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print numpy.distutils.misc_util.get_numpy_include_dirs()[0]" | ||
21 | - RESULT_VARIABLE PYTHON_NUMPY_PROCESS | ||
22 | - OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIRS | ||
23 | - OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
24 | +if(NOT DEFINED PYTHON_NUMPY_INCLUDE_DIRS) | ||
25 | + execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print numpy.distutils.misc_util.get_numpy_include_dirs()[0]" | ||
26 | + RESULT_VARIABLE PYTHON_NUMPY_PROCESS | ||
27 | + OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIRS | ||
28 | + OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
29 | +else() | ||
30 | + set(PYTHON_NUMPY_PROCESS 0) | ||
31 | +endif() | ||
32 | |||
33 | if(PYTHON_NUMPY_PROCESS EQUAL 0) | ||
34 | set(PYTHON_USE_NUMPY 1) | ||
35 | -- | ||
36 | 1.7.4.1 | ||
37 | |||