Work around build failure due to OpenCV 3.1.
This commit is contained in:
parent
bce3e0a85f
commit
7f89810f2d
@ -1,103 +0,0 @@
|
||||
From f0220c1134a7f565cfd9e2a763d4e723adc0b211 Mon Sep 17 00:00:00 2001
|
||||
From: Larry Gritz <lg@larrygritz.com>
|
||||
Date: Wed, 3 Feb 2016 11:45:59 -0800
|
||||
Subject: [PATCH 1/2] Suppress warning/error in pugi for gcc6
|
||||
|
||||
---
|
||||
src/libOpenImageIO/CMakeLists.txt | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt
|
||||
index 6994dfd..fd6e4d1 100644
|
||||
--- a/src/libOpenImageIO/CMakeLists.txt
|
||||
+++ b/src/libOpenImageIO/CMakeLists.txt
|
||||
@@ -13,6 +13,10 @@ if (NOT USE_EXTERNAL_PUGIXML)
|
||||
../include/OpenImageIO/pugixml.hpp
|
||||
../include/OpenImageIO/pugixml.cpp
|
||||
)
|
||||
+ if (CMAKE_COMPILER_IS_GNUCC AND NOT ${GCC_VERSION} VERSION_LESS 6.0)
|
||||
+ set_source_files_properties (formatspec.cpp xmp.cpp
|
||||
+ PROPERTIES COMPILE_FLAGS -Wno-error=placement-new)
|
||||
+ endif ()
|
||||
endif()
|
||||
|
||||
set (libOpenImageIO_srcs deepdata.cpp exif.cpp formatspec.cpp imagebuf.cpp
|
||||
|
||||
From 9b476920b3764255eaef165bccf8a0bdca7d9775 Mon Sep 17 00:00:00 2001
|
||||
From: Larry Gritz <lg@larrygritz.com>
|
||||
Date: Wed, 3 Feb 2016 14:00:38 -0800
|
||||
Subject: [PATCH 2/2] Fix location of pugixml.hpp when using external one
|
||||
|
||||
---
|
||||
src/libOpenImageIO/formatspec.cpp | 6 +++++-
|
||||
src/libOpenImageIO/xmp.cpp | 7 ++++++-
|
||||
2 files changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/libOpenImageIO/formatspec.cpp b/src/libOpenImageIO/formatspec.cpp
|
||||
index 5abd289..6a4e31f 100644
|
||||
--- a/src/libOpenImageIO/formatspec.cpp
|
||||
+++ b/src/libOpenImageIO/formatspec.cpp
|
||||
@@ -42,8 +42,12 @@
|
||||
#include "OpenImageIO/fmath.h"
|
||||
#include "OpenImageIO/imageio.h"
|
||||
#include "imageio_pvt.h"
|
||||
-#include "OpenImageIO/pugixml.hpp"
|
||||
|
||||
+#if USE_EXTERNAL_PUGIXML
|
||||
+# include "pugixml.hpp"
|
||||
+#else
|
||||
+# include "OpenImageIO/pugixml.hpp"
|
||||
+#endif
|
||||
|
||||
OIIO_NAMESPACE_BEGIN
|
||||
|
||||
diff --git a/src/libOpenImageIO/xmp.cpp b/src/libOpenImageIO/xmp.cpp
|
||||
index e2b16d4..9a5c985 100644
|
||||
--- a/src/libOpenImageIO/xmp.cpp
|
||||
+++ b/src/libOpenImageIO/xmp.cpp
|
||||
@@ -37,7 +37,12 @@
|
||||
#include "OpenImageIO/strutil.h"
|
||||
#include "OpenImageIO/fmath.h"
|
||||
#include "OpenImageIO/imageio.h"
|
||||
-#include "OpenImageIO/pugixml.hpp"
|
||||
+
|
||||
+#if USE_EXTERNAL_PUGIXML
|
||||
+# include "pugixml.hpp"
|
||||
+#else
|
||||
+# include "OpenImageIO/pugixml.hpp"
|
||||
+#endif
|
||||
|
||||
#define DEBUG_XMP_READ 0
|
||||
#define DEBUG_XMP_WRITE 0
|
||||
From 792497cf71136d1b7b21c059ed020e40b8d35f6c Mon Sep 17 00:00:00 2001
|
||||
From: Larry Gritz <lg@larrygritz.com>
|
||||
Date: Thu, 4 Feb 2016 11:04:15 -0800
|
||||
Subject: [PATCH] Suppress gcc6 warning
|
||||
|
||||
---
|
||||
CMakeLists.txt | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9d6786c..19c413b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -139,7 +139,7 @@ if (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_APPLECLANG)
|
||||
endif ()
|
||||
|
||||
# gcc specific options
|
||||
-if (CMAKE_COMPILER_IS_GNUCC AND (NOT CMAKE_COMPILER_IS_CLANG))
|
||||
+if (CMAKE_COMPILER_IS_GNUCC AND NOT (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_APPLECLANG))
|
||||
if (NOT ${GCC_VERSION} VERSION_LESS 4.8)
|
||||
# suppress a warning that Boost::Python hits in g++ 4.8
|
||||
add_definitions ("-Wno-error=unused-local-typedefs")
|
||||
@@ -148,6 +148,9 @@ if (CMAKE_COMPILER_IS_GNUCC AND (NOT CMAKE_COMPILER_IS_CLANG))
|
||||
if (NOT ${GCC_VERSION} VERSION_LESS 4.5)
|
||||
add_definitions ("-Wno-unused-result")
|
||||
endif ()
|
||||
+ if (NOT ${GCC_VERSION} VERSION_LESS 6.0)
|
||||
+ add_definitions ("-Wno-error=misleading-indentation")
|
||||
+ endif ()
|
||||
endif ()
|
||||
|
||||
# Try to detect if this is an OSX distro new enough that the system library
|
@ -112,6 +112,8 @@ rm -rf src/include/tbb
|
||||
|
||||
%build
|
||||
rm -rf build/linux && mkdir -p build/linux && pushd build/linux
|
||||
# Temporary fix for OpenCV 3.1
|
||||
export LDFLAGS='%{optflags} -lopencv_videoio'
|
||||
# CMAKE_SKIP_RPATH is OK here because it is set to FALSE internally and causes
|
||||
# CMAKE_INSTALL_RPATH to be cleared, which is the desiered result.
|
||||
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
|
Loading…
Reference in New Issue
Block a user