Skip to content

Commit

Permalink
eliminated gflags related linker warnings (google#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiud committed Apr 9, 2021
1 parent 663bb26 commit 33ec36a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,12 @@ endif (HAVE_PTHREAD)
if (gflags_FOUND)
target_link_libraries (glog PUBLIC gflags)

if (NOT BUILD_SHARED_LIBS)
# Don't use __declspec(dllexport|dllimport) if this is a static build
targeT_compile_definitions (glog PUBLIC GFLAGS_DLL_DECLARE_FLAG= GFLAGS_DLL_DEFINE_FLAG=)
endif (NOT BUILD_SHARED_LIBS)
target_compile_definitions (glog
PRIVATE GFLAGS_DLL_DECLARE_FLAG=GOOGLE_GLOG_DLL_DECL
PRIVATE GFLAGS_DLL_DEFINE_FLAG=GOOGLE_GLOG_DLL_DECL
PUBLIC "$<BUILD_INTERFACE:GFLAGS_DLL_DECLARE_FLAG=GOOGLE_GLOG_DLL_DECL>"
PUBLIC "$<BUILD_INTERFACE:GFLAGS_DLL_DEFINE_FLAG=GOOGLE_GLOG_DLL_DECL>"
)
endif (gflags_FOUND)

if (ANDROID)
Expand Down

0 comments on commit 33ec36a

Please sign in to comment.