From 131458847bbf2fe971c6b5e40a8b59d0d48b0d0c Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Tue, 6 Aug 2013 17:56:25 +0400 Subject: [PATCH] Make ts always static. This allows us to forget about the GTEST_(CREATE|LINKED_AS)_SHARED_LIBRARY macros and to get rid of the dependency on cvconfig.h. --- modules/ts/CMakeLists.txt | 11 +---------- modules/ts/include/opencv2/ts/ts.hpp | 7 ------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt index 1eaeb39336..4af917b388 100644 --- a/modules/ts/CMakeLists.txt +++ b/modules/ts/CMakeLists.txt @@ -4,10 +4,7 @@ if(IOS) ocv_module_disable(ts) endif() -if(MINGW) - set(OPENCV_MODULE_TYPE STATIC) -endif() - +set(OPENCV_MODULE_TYPE STATIC) set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE) if(HAVE_CUDA) @@ -22,10 +19,4 @@ ocv_glob_module_sources() ocv_module_include_directories() ocv_create_module() -if(BUILD_SHARED_LIBS AND NOT MINGW) - add_definitions(-DGTEST_CREATE_SHARED_LIBRARY=1) -else() - add_definitions(-DGTEST_CREATE_SHARED_LIBRARY=0) -endif() - ocv_add_precompiled_headers(${the_module}) diff --git a/modules/ts/include/opencv2/ts/ts.hpp b/modules/ts/include/opencv2/ts/ts.hpp index 384046fd77..2f32c244cc 100644 --- a/modules/ts/include/opencv2/ts/ts.hpp +++ b/modules/ts/include/opencv2/ts/ts.hpp @@ -1,13 +1,6 @@ #ifndef __OPENCV_GTESTCV_HPP__ #define __OPENCV_GTESTCV_HPP__ -#include "cvconfig.h" -#ifndef GTEST_CREATE_SHARED_LIBRARY -#ifdef BUILD_SHARED_LIBS -#define GTEST_LINKED_AS_SHARED_LIBRARY 1 -#endif -#endif - #include // for va_list #ifdef HAVE_WINRT