From: Brian Orr Date: Thu, 22 Jun 2017 07:25:13 +0000 (-0700) Subject: Use gflags ALIAS instead of ${gflags_XXX} vars X-Git-Tag: submit/tizen/20180313.064233~39^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1cae334a198010b7c4642dfb578552d2bf15adc;p=platform%2Fupstream%2Fglog.git 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 --- 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