cmake: fixed incorrect usage of add_definitions() on Linux

This commit is contained in:
Alexander Alekhin 2013-09-21 21:12:39 +04:00
parent 94966b38c0
commit 286244efed

View File

@ -519,11 +519,7 @@ 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))
if(MSVC)
set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
else()
add_definitions(-DCVAPI_EXPORTS)
endif()
set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
endif()
if(MSVC)