From 504262d3d8db5fb8c1a5d18db90b6a90f8062309 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Sun, 19 Feb 2012 21:56:21 +0000 Subject: [PATCH] Fixed #1608 --- cmake/templates/OpenCVConfig.cmake.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/templates/OpenCVConfig.cmake.in b/cmake/templates/OpenCVConfig.cmake.in index 57aa20cf90..9040ce183d 100644 --- a/cmake/templates/OpenCVConfig.cmake.in +++ b/cmake/templates/OpenCVConfig.cmake.in @@ -132,6 +132,9 @@ endif() # ============================================================== if(NOT OpenCV_FIND_COMPONENTS) set(OpenCV_FIND_COMPONENTS ${OpenCV_LIB_COMPONENTS}) + if(GTest_FOUND OR GTEST_FOUND) + list(REMOVE_ITEM OpenCV_FIND_COMPONENTS opencv_ts) + endif() endif() # expand short module names and see if requested components exist