Commit 80bec2ba authored by Shinichiro Hamaji's avatar Shinichiro Hamaji Committed by GitHub

Merge pull request #199 from v1bri/brian-fix-gflags-link

Use gflags ALIAS instead of ${gflags_XXX} vars
parents 5cfa9a28 baf6c8b2
...@@ -49,7 +49,7 @@ include (DetermineGflagsNamespace) ...@@ -49,7 +49,7 @@ include (DetermineGflagsNamespace)
set (CMAKE_THREAD_PREFER_PTHREAD 1) set (CMAKE_THREAD_PREFER_PTHREAD 1)
if (WITH_GFLAGS) if (WITH_GFLAGS)
find_package (gflags) find_package (gflags 2.2.0)
if (gflags_FOUND) if (gflags_FOUND)
set (HAVE_LIB_GFLAGS 1) set (HAVE_LIB_GFLAGS 1)
...@@ -397,8 +397,7 @@ if (WIN32 AND HAVE_SNPRINTF) ...@@ -397,8 +397,7 @@ if (WIN32 AND HAVE_SNPRINTF)
endif (WIN32 AND HAVE_SNPRINTF) endif (WIN32 AND HAVE_SNPRINTF)
if (gflags_FOUND) if (gflags_FOUND)
target_include_directories (glog PUBLIC $<BUILD_INTERFACE:${gflags_INCLUDE_DIR}>) target_link_libraries (glog PUBLIC gflags)
target_link_libraries (glog PUBLIC ${gflags_LIBRARIES})
if (NOT BUILD_SHARED_LIBS) if (NOT BUILD_SHARED_LIBS)
# Don't use __declspec(dllexport|dllimport) if this is a static build # Don't use __declspec(dllexport|dllimport) if this is a static build
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment