I supported clang-cl with BUILD_SHARED_LIBS

This commit is contained in:
durswd 2019-09-02 12:32:29 +09:00
parent ba8a9f6952
commit 00cb9f4e6f

View File

@ -531,13 +531,13 @@ if (NOT BUILD_SHARED_LIBS)
else (NOT BUILD_SHARED_LIBS)
target_compile_definitions (glog PRIVATE GOOGLE_GLOG_IS_A_DLL=1)
if (HAVE___ATTRIBUTE__VISIBILITY_DEFAULT)
if (HAVE___ATTRIBUTE__VISIBILITY_DEFAULT AND NOT MSVC)
set (_EXPORT "__attribute__((visibility(\"default\")))")
set (_IMPORT "")
elseif (HAVE___DECLSPEC)
set (_EXPORT "__declspec(dllexport)")
set (_IMPORT "__declspec(dllimport)")
endif (HAVE___ATTRIBUTE__VISIBILITY_DEFAULT)
endif (HAVE___ATTRIBUTE__VISIBILITY_DEFAULT AND NOT MSVC)
target_compile_definitions (glog PRIVATE
"GOOGLE_GLOG_DLL_DECL=${_EXPORT}")