Refer to other distro,make opencv-ts create share library intead of static.
Signed-off-by: Huang Qiyu <[email protected]> --- ...-ts-create-share-library-intead-of-static.patch | 26 +++++++++++++ .../opencv/0001-To-fix-errors-as-following.patch | 43 ++++++++++++++++++++++ meta-oe/recipes-support/opencv/opencv_3.1.bb | 2 + 3 files changed, 71 insertions(+) create mode 100644 meta-oe/recipes-support/opencv/opencv/0001-Make-opencv-ts-create-share-library-intead-of-static.patch create mode 100644 meta-oe/recipes-support/opencv/opencv/0001-To-fix-errors-as-following.patch 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 0000000..05ec41f --- /dev/null +++ b/meta-oe/recipes-support/opencv/opencv/0001-Make-opencv-ts-create-share-library-intead-of-static.patch @@ -0,0 +1,26 @@ +From 49d1f7c40a5d097f23671318045ac54bc07846cf Mon Sep 17 00:00:00 2001 +From: Bian Naimeng <[email protected]> +Date: Wed, 19 Apr 2017 03:11:37 +0900 +Subject: [PATCH] Make opencv-ts create share library intead of static. + +Signed-off-by: Lei Maohui <[email protected]> +--- + modules/ts/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt +index bb56da2..7bb4ce9 100644 +--- a/modules/ts/CMakeLists.txt ++++ b/modules/ts/CMakeLists.txt +@@ -4,7 +4,7 @@ if(IOS) + ocv_module_disable(ts) + endif() + +-set(OPENCV_MODULE_TYPE STATIC) ++#set(OPENCV_MODULE_TYPE STATIC) + set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE) + + ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef) +-- +1.8.4.2 + 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 0000000..40c4ad5 --- /dev/null +++ b/meta-oe/recipes-support/opencv/opencv/0001-To-fix-errors-as-following.patch @@ -0,0 +1,43 @@ +From 7eb2f7ea2fd1ede1d0ee0fafb660c8a62ac88127 Mon Sep 17 00:00:00 2001 +From: Huang Qiyu <[email protected]> +Date: Thu, 11 May 2017 16:13:45 +0900 +Subject: [PATCH] To fix errors as following: + +"test_main.cpp:45: undefined reference to `parseCustomOptions(int, char**)'" +"test_superres.cpp:270: undefined reference to `checkIppStatus()'" + +Signed-off-by: Lei Maohui <[email protected]> +--- + modules/ts/include/opencv2/ts.hpp | 2 +- + modules/ts/include/opencv2/ts/ts_ext.hpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules/ts/include/opencv2/ts.hpp b/modules/ts/include/opencv2/ts.hpp +index e809f6b..d181e24 100644 +--- a/modules/ts/include/opencv2/ts.hpp ++++ b/modules/ts/include/opencv2/ts.hpp +@@ -567,7 +567,7 @@ void dumpOpenCLDevice(); + #define TEST_DUMP_OCL_INFO + #endif + +-void parseCustomOptions(int argc, char **argv); ++CV_EXPORTS void parseCustomOptions(int argc, char **argv); + + #define CV_TEST_MAIN(resourcesubdir, ...) \ + int main(int argc, char **argv) \ +diff --git a/modules/ts/include/opencv2/ts/ts_ext.hpp b/modules/ts/include/opencv2/ts/ts_ext.hpp +index 08039ba..8e72372 100644 +--- a/modules/ts/include/opencv2/ts/ts_ext.hpp ++++ b/modules/ts/include/opencv2/ts/ts_ext.hpp +@@ -8,7 +8,7 @@ + #ifndef __OPENCV_TS_EXT_HPP__ + #define __OPENCV_TS_EXT_HPP__ + +-void checkIppStatus(); ++CV_EXPORTS void checkIppStatus(); + + #undef TEST + #define TEST(test_case_name, test_name) \ +-- +2.7.4 + diff --git a/meta-oe/recipes-support/opencv/opencv_3.1.bb b/meta-oe/recipes-support/opencv/opencv_3.1.bb index 1bbb965..52d44ba 100644 --- a/meta-oe/recipes-support/opencv/opencv_3.1.bb +++ b/meta-oe/recipes-support/opencv/opencv_3.1.bb @@ -24,6 +24,8 @@ SRC_URI = "git://github.com/Itseez/opencv.git;name=opencv \ file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ file://fixgcc60.patch \ file://fixpkgconfig.patch \ + file://0001-Make-opencv-ts-create-share-library-intead-of-static.patch \ + file://0001-To-fix-errors-as-following.patch \ " PV = "3.1+git${SRCPV}" -- 2.7.4 -- _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel
