76 lines
2.6 KiB
CMake
76 lines
2.6 KiB
CMake
$NetBSD: patch-libkface_libopencv.h.cmake.in,v 1.1 2015/11/03 20:28:57 markd Exp $
|
|
|
|
opencv3 support. https://bugs.kde.org/show_bug.cgi?id=349601
|
|
|
|
--- libkface/libopencv.h.cmake.in.orig 2015-09-03 21:22:44.000000000 +0000
|
|
+++ libkface/libopencv.h.cmake.in
|
|
@@ -7,7 +7,7 @@
|
|
* @date 2010-06-16
|
|
* @brief Wrapper for OpenCV header files
|
|
*
|
|
- * @author Copyright (C) 2012-2014 by Gilles Caulier
|
|
+ * @author Copyright (C) 2012-2015 by Gilles Caulier
|
|
* <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
|
|
*
|
|
* This program is free software; you can redistribute it
|
|
@@ -31,16 +31,16 @@
|
|
|
|
// Pragma directives to reduce warnings from OpenCV header files.
|
|
#if not defined(__APPLE__) && defined(__GNUC__)
|
|
-#pragma GCC diagnostic push
|
|
-#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
|
-#pragma GCC diagnostic ignored "-Woverloaded-virtual"
|
|
+# pragma GCC diagnostic push
|
|
+# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
|
+# pragma GCC diagnostic ignored "-Woverloaded-virtual"
|
|
#endif
|
|
|
|
#if defined(__APPLE__) && defined(__clang__)
|
|
-#pragma clang diagnostic push
|
|
-#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
|
|
-#pragma clang diagnostic ignored "-Woverloaded-virtual"
|
|
-#pragma clang diagnostic ignored "-Wcast-align"
|
|
+# pragma clang diagnostic push
|
|
+# pragma clang diagnostic ignored "-Wnon-virtual-dtor"
|
|
+# pragma clang diagnostic ignored "-Woverloaded-virtual"
|
|
+# pragma clang diagnostic ignored "-Wcast-align"
|
|
#endif
|
|
|
|
// OpenCV includes
|
|
@@ -51,23 +51,30 @@
|
|
#define OPENCV_VERSION OPENCV_MAKE_VERSION(CV_MAJOR_VERSION,CV_MINOR_VERSION,CV_SUBMINOR_VERSION)
|
|
#define OPENCV_TEST_VERSION(major,minor,patch) ( OPENCV_VERSION >= OPENCV_MAKE_VERSION(major,minor,patch) )
|
|
|
|
-#include <opencv2/core/core.hpp>
|
|
-#include <opencv2/core/internal.hpp>
|
|
-#include <opencv2/contrib/contrib.hpp>
|
|
+#if OPENCV_TEST_VERSION(3,0,0)
|
|
+# include <opencv2/face.hpp>
|
|
+# include <opencv2/core.hpp>
|
|
+#else
|
|
+# include <opencv2/core/core.hpp>
|
|
+# include <opencv2/core/internal.hpp>
|
|
+# include <opencv2/contrib/contrib.hpp>
|
|
+#endif
|
|
|
|
// for old-style code
|
|
+#if OPENCV_VERSION <= OPENCV_MAKE_VERSION(2,4,11)
|
|
+# include <opencv2/legacy/compat.hpp>
|
|
+#endif
|
|
#include <opencv2/opencv.hpp>
|
|
-#include <opencv2/legacy/compat.hpp>
|
|
#include <opencv2/highgui/highgui_c.h>
|
|
#include <opencv/cvaux.h>
|
|
|
|
// Restore warnings
|
|
#if not defined(__APPLE__) && defined(__GNUC__)
|
|
-#pragma GCC diagnostic pop
|
|
+# pragma GCC diagnostic pop
|
|
#endif
|
|
|
|
#if defined(__APPLE__) && defined(__clang__)
|
|
-#pragma clang diagnostic pop
|
|
+# pragma clang diagnostic pop
|
|
#endif
|
|
|
|
#endif // LIB_OPEN_CV_H
|