Merge pull request #465 from durswd/support_clang-cl

I supported clang-cl with BUILD_SHARED_LIBS
This commit is contained in:
Shinichiro Hamaji 2019-09-02 21:16:42 -07:00 committed by GitHub
commit 4cc89c9e2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
set (_EXPORT "__attribute__((visibility(\"default\")))")
set (_IMPORT "")
elseif (HAVE___DECLSPEC)
if (HAVE___DECLSPEC)
set (_EXPORT "__declspec(dllexport)")
set (_IMPORT "__declspec(dllimport)")
endif (HAVE___ATTRIBUTE__VISIBILITY_DEFAULT)
elseif (HAVE___ATTRIBUTE__VISIBILITY_DEFAULT)
set (_EXPORT "__attribute__((visibility(\"default\")))")
set (_IMPORT "")
endif (HAVE___DECLSPEC)
target_compile_definitions (glog PRIVATE
"GOOGLE_GLOG_DLL_DECL=${_EXPORT}")