From 5c615ec28f546c11321414ab7da354b752935a2c Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Sat, 31 Mar 2012 17:25:19 +0000 Subject: [PATCH] added optional dependency stitching->nonfree. When nonfree is available, make sure linker does not throw it away. --- modules/stitching/CMakeLists.txt | 2 +- modules/stitching/src/matchers.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/stitching/CMakeLists.txt b/modules/stitching/CMakeLists.txt index 88fd865f54..5d48bd378f 100644 --- a/modules/stitching/CMakeLists.txt +++ b/modules/stitching/CMakeLists.txt @@ -1,3 +1,3 @@ set(the_description "Images stitching") -ocv_define_module(stitching opencv_imgproc opencv_features2d opencv_calib3d opencv_objdetect OPTIONAL opencv_gpu) +ocv_define_module(stitching opencv_imgproc opencv_features2d opencv_calib3d opencv_objdetect OPTIONAL opencv_gpu opencv_nonfree) diff --git a/modules/stitching/src/matchers.cpp b/modules/stitching/src/matchers.cpp index 1cc630e88e..9cfd343f87 100644 --- a/modules/stitching/src/matchers.cpp +++ b/modules/stitching/src/matchers.cpp @@ -50,6 +50,12 @@ using namespace cv::detail; using namespace cv::gpu; #endif +#ifdef HAVE_OPENCV_NONFREE +#include "opencv2/nonfree/nonfree.hpp" + +static bool makeUseOfNonfree = initModule_nonfree(); +#endif + namespace { struct DistIdxPair