diff options
author | Huang Qiyu <huangqy.fnst@cn.fujitsu.com> | 2017-05-19 15:48:07 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-06-05 11:01:42 +0200 |
commit | 2e6d62fd47b9e6a859175ec5521f6ce2505f4b23 (patch) | |
tree | dafbabcdf874d28caa3eef1945910e820fc18ff9 /meta-oe | |
parent | d7b000b284f1f7cc288a3d7c36717b9b7b884340 (diff) | |
download | meta-openembedded-2e6d62fd47b9e6a859175ec5521f6ce2505f4b23.tar.gz |
opencv: Make opencv-ts create share library intead of static
Refer to other distro,make opencv-ts create share library intead of static.
Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
3 files changed, 81 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-Make-opencv-ts-create-share-library-intead-of-static.patch b/meta-oe/recipes-support/opencv/opencv/0001-Make-opencv-ts-create-share-library-intead-of-static.patch new file mode 100644 index 000000000..05ec41fd8 --- /dev/null +++ b/meta-oe/recipes-support/opencv/opencv/0001-Make-opencv-ts-create-share-library-intead-of-static.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 49d1f7c40a5d097f23671318045ac54bc07846cf Mon Sep 17 00:00:00 2001 | ||
2 | From: Bian Naimeng <biannm@cn.fujitsu.com> | ||
3 | Date: Wed, 19 Apr 2017 03:11:37 +0900 | ||
4 | Subject: [PATCH] Make opencv-ts create share library intead of static. | ||
5 | |||
6 | Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> | ||
7 | --- | ||
8 | modules/ts/CMakeLists.txt | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt | ||
12 | index bb56da2..7bb4ce9 100644 | ||
13 | --- a/modules/ts/CMakeLists.txt | ||
14 | +++ b/modules/ts/CMakeLists.txt | ||
15 | @@ -4,7 +4,7 @@ if(IOS) | ||
16 | ocv_module_disable(ts) | ||
17 | endif() | ||
18 | |||
19 | -set(OPENCV_MODULE_TYPE STATIC) | ||
20 | +#set(OPENCV_MODULE_TYPE STATIC) | ||
21 | set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE) | ||
22 | |||
23 | ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef) | ||
24 | -- | ||
25 | 1.8.4.2 | ||
26 | |||
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-To-fix-errors-as-following.patch b/meta-oe/recipes-support/opencv/opencv/0001-To-fix-errors-as-following.patch new file mode 100644 index 000000000..820ab81f6 --- /dev/null +++ b/meta-oe/recipes-support/opencv/opencv/0001-To-fix-errors-as-following.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From db1d9cc82b68f6593360d66ef40cb6b0fc377e6e Mon Sep 17 00:00:00 2001 | ||
2 | From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> | ||
3 | Date: Fri, 19 May 2017 04:27:50 +0900 | ||
4 | Subject: [PATCH] To fix errors as following: | ||
5 | |||
6 | "test_main.cpp:45: undefined reference to `parseCustomOptions(int, char**)'" | ||
7 | "perf_abs.cpp:13: undefined reference to `cvtest::param_seed'" | ||
8 | "test_superres.cpp:270: undefined reference to `checkIppStatus()'" | ||
9 | |||
10 | Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> | ||
11 | --- | ||
12 | modules/ts/include/opencv2/ts.hpp | 4 ++-- | ||
13 | modules/ts/include/opencv2/ts/ts_ext.hpp | 2 +- | ||
14 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/modules/ts/include/opencv2/ts.hpp b/modules/ts/include/opencv2/ts.hpp | ||
17 | index c573905..7ff6cc1 100644 | ||
18 | --- a/modules/ts/include/opencv2/ts.hpp | ||
19 | +++ b/modules/ts/include/opencv2/ts.hpp | ||
20 | @@ -539,7 +539,7 @@ protected: | ||
21 | } | ||
22 | }; | ||
23 | |||
24 | -extern uint64 param_seed; | ||
25 | +CV_EXPORTS extern uint64 param_seed; | ||
26 | |||
27 | struct CV_EXPORTS DefaultRngAuto | ||
28 | { | ||
29 | @@ -602,7 +602,7 @@ void dumpOpenCLDevice(); | ||
30 | #define TEST_DUMP_OCL_INFO | ||
31 | #endif | ||
32 | |||
33 | -void parseCustomOptions(int argc, char **argv); | ||
34 | +CV_EXPORTS void parseCustomOptions(int argc, char **argv); | ||
35 | |||
36 | #define CV_TEST_MAIN(resourcesubdir, ...) \ | ||
37 | int main(int argc, char **argv) \ | ||
38 | diff --git a/modules/ts/include/opencv2/ts/ts_ext.hpp b/modules/ts/include/opencv2/ts/ts_ext.hpp | ||
39 | index 05ccc63..8075065 100644 | ||
40 | --- a/modules/ts/include/opencv2/ts/ts_ext.hpp | ||
41 | +++ b/modules/ts/include/opencv2/ts/ts_ext.hpp | ||
42 | @@ -9,7 +9,7 @@ | ||
43 | #define OPENCV_TS_EXT_HPP | ||
44 | |||
45 | namespace cvtest { | ||
46 | -void checkIppStatus(); | ||
47 | +CV_EXPORTS void checkIppStatus(); | ||
48 | } | ||
49 | |||
50 | #define CV_TEST_INIT \ | ||
51 | -- | ||
52 | 2.7.4 | ||
53 | |||
diff --git a/meta-oe/recipes-support/opencv/opencv_3.2.bb b/meta-oe/recipes-support/opencv/opencv_3.2.bb index 98b6b0652..b6db37dd8 100644 --- a/meta-oe/recipes-support/opencv/opencv_3.2.bb +++ b/meta-oe/recipes-support/opencv/opencv_3.2.bb | |||
@@ -29,6 +29,8 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \ | |||
29 | file://useoeprotobuf.patch;patchdir=../contrib/ \ | 29 | file://useoeprotobuf.patch;patchdir=../contrib/ \ |
30 | file://0001-Revert-cuda-fix-fp16-compilation.patch \ | 30 | file://0001-Revert-cuda-fix-fp16-compilation.patch \ |
31 | file://0002-Revert-check-FP16-build-condition-correctly.patch \ | 31 | file://0002-Revert-check-FP16-build-condition-correctly.patch \ |
32 | file://0001-Make-opencv-ts-create-share-library-intead-of-static.patch \ | ||
33 | file://0001-To-fix-errors-as-following.patch \ | ||
32 | " | 34 | " |
33 | 35 | ||
34 | PV = "3.2+git${SRCPV}" | 36 | PV = "3.2+git${SRCPV}" |