cmake: prefer linking against gflags::gflags (fixes #683)
This commit is contained in:
parent
42ce901f28
commit
5bf7fdea16
@ -630,7 +630,12 @@ if (HAVE_PTHREAD)
|
|||||||
endif (HAVE_PTHREAD)
|
endif (HAVE_PTHREAD)
|
||||||
|
|
||||||
if (gflags_FOUND)
|
if (gflags_FOUND)
|
||||||
target_link_libraries (glog PUBLIC gflags)
|
# Prefer the gflags target that uses double colon convention
|
||||||
|
if (TARGET gflags::gflags)
|
||||||
|
target_link_libraries (glog PUBLIC gflags::gflags)
|
||||||
|
else (TARGET gflags::gflags)
|
||||||
|
target_link_libraries (glog PUBLIC gflags)
|
||||||
|
endif (TARGET gflags::gflags)
|
||||||
|
|
||||||
target_compile_definitions (glog PRIVATE
|
target_compile_definitions (glog PRIVATE
|
||||||
GFLAGS_DLL_DECLARE_FLAG=GOOGLE_GLOG_DLL_DECL
|
GFLAGS_DLL_DECLARE_FLAG=GOOGLE_GLOG_DLL_DECL
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user