Commit ee182eb0 authored by Roman Donchenko's avatar Roman Donchenko

Fixed the setting of CVAPI_EXPORTS for modules that are always static/shared.

Also, removed needless check of BUILD_SHARED_LIBS in core; in that case,
only the current module's library type matters.
parent be8b3687
...@@ -508,7 +508,8 @@ macro(ocv_create_module) ...@@ -508,7 +508,8 @@ macro(ocv_create_module)
) )
endif() endif()
if(BUILD_SHARED_LIBS) if((NOT DEFINED OPENCV_MODULE_TYPE AND BUILD_SHARED_LIBS)
OR (DEFINED OPENCV_MODULE_TYPE AND OPENCV_MODULE_TYPE STREQUAL SHARED))
if(MSVC) if(MSVC)
set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS) set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
else() else()
......
...@@ -779,7 +779,7 @@ cvGetModuleInfo( const char* name, const char **version, const char **plugin_lis ...@@ -779,7 +779,7 @@ cvGetModuleInfo( const char* name, const char **version, const char **plugin_lis
*plugin_list = plugin_list_buf; *plugin_list = plugin_list_buf;
} }
#if defined BUILD_SHARED_LIBS && defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE #if defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE
BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID ); BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID );
BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID ) BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment