From e1cae334a198010b7c4642dfb578552d2bf15adc Mon Sep 17 00:00:00 2001 From: Brian Orr Date: Thu, 22 Jun 2017 00:25:13 -0700 Subject: [PATCH 1/1] 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 --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7415eab..9852df1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -397,8 +397,7 @@ if (WIN32 AND HAVE_SNPRINTF) endif (WIN32 AND HAVE_SNPRINTF) if (gflags_FOUND) - target_include_directories (glog PUBLIC $) - 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 -- 2.7.4