Use gflags ALIAS instead of ${gflags_XXX} vars

The gflags project updated their CMake config last year with a
`gflags` ALIAS target. This can be used instead of the legacy
`${gflags_LIBRARIES}` and `${gflags_INCLUDE_DIRS}` variables. It also
looks cleaner.

Fixes #198
This commit is contained in:
Brian Orr 2017-06-22 00:25:13 -07:00
parent 77a0e36b7a
commit e1cae334a1

View File

@ -397,8 +397,7 @@ if (WIN32 AND HAVE_SNPRINTF)
endif (WIN32 AND HAVE_SNPRINTF)
if (gflags_FOUND)
target_include_directories (glog PUBLIC $<BUILD_INTERFACE:${gflags_INCLUDE_DIR}>)
target_link_libraries (glog PUBLIC ${gflags_LIBRARIES})
target_link_libraries (glog PUBLIC gflags)
if (NOT BUILD_SHARED_LIBS)
# Don't use __declspec(dllexport|dllimport) if this is a static build