aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/opencv/opencv
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>2016-08-05 18:38:47 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2016-08-15 12:31:57 +0200
commit886a5da6ac086cf0bf465609ee3b2f4fd177a007 (patch)
tree9d64e5c71577905a880ab2642341e7f2440422b9 /meta-oe/recipes-support/opencv/opencv
parent2e0332ce3c86bfae9c69a3d434767d5a31fa8053 (diff)
downloadmeta-openembedded-contrib-886a5da6ac086cf0bf465609ee3b2f4fd177a007.tar.gz
opencv: Fix build with gcc 6.0
It seems like gcc 6.0 does not have the same behaviour as previous 5.x with regards isystem flag. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/opencv/opencv')
-rw-r--r--meta-oe/recipes-support/opencv/opencv/fixgcc60.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/opencv/opencv/fixgcc60.patch b/meta-oe/recipes-support/opencv/opencv/fixgcc60.patch
new file mode 100644
index 0000000000..5d0bf97cab
--- /dev/null
+++ b/meta-oe/recipes-support/opencv/opencv/fixgcc60.patch
@@ -0,0 +1,30 @@
+diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake
+index 28ccc1c6be4f..b0e1cbf77287 100644
+--- a/cmake/OpenCVPCHSupport.cmake
++++ b/cmake/OpenCVPCHSupport.cmake
+@@ -19,7 +19,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
+ ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
+ OUTPUT_VARIABLE gcc_compiler_version)
+ #MESSAGE("GCC Version: ${gcc_compiler_version}")
+- IF(gcc_compiler_version VERSION_GREATER "4.2.-1")
++ IF(gcc_compiler_version VERSION_GREATER "4.2.-1" AND gcc_compiler_version VERSION_LESS "6.0.0")
+ SET(PCHSupport_FOUND TRUE)
+ ENDIF()
+
+diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake
+index 3a23cd73633d..1fea1578b1d9 100644
+--- a/cmake/OpenCVUtils.cmake
++++ b/cmake/OpenCVUtils.cmake
+@@ -76,7 +76,11 @@ function(ocv_include_directories)
+ if("${__abs_dir}" MATCHES "^${OpenCV_SOURCE_DIR}" OR "${__abs_dir}" MATCHES "^${OpenCV_BINARY_DIR}")
+ list(APPEND __add_before "${dir}")
+ else()
+- include_directories(AFTER SYSTEM "${dir}")
++ if (gcc_compiler_version VERSION_LESS "6.0.0")
++ include_directories(AFTER SYSTEM "${dir}")
++ else()
++ include_directories(AFTER "${dir}")
++ endif()
+ endif()
+ endforeach()
+ include_directories(BEFORE ${__add_before})