From: Alexander Alekhin Date: Tue, 24 Sep 2013 11:12:24 +0000 (+0400) Subject: Revert "cmake: fixed incorrect usage of add_definitions() on Linux" X-Git-Tag: accepted/tizen/ivi/20140515.103456~1^2~470^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce557fb7befd61f721f7c7ff58a41b39fc21b722;p=profile%2Fivi%2Fopencv.git Revert "cmake: fixed incorrect usage of add_definitions() on Linux" This reverts commit 286244efedd215600b6be72d4c25e48af0ed1c2d. --- diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake index 1d87bc1..4076d9f 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake @@ -519,7 +519,11 @@ macro(ocv_create_module) if((NOT DEFINED OPENCV_MODULE_TYPE AND BUILD_SHARED_LIBS) OR (DEFINED OPENCV_MODULE_TYPE AND OPENCV_MODULE_TYPE STREQUAL SHARED)) - set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS) + if(MSVC) + set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS) + else() + add_definitions(-DCVAPI_EXPORTS) + endif() endif() if(MSVC)