Merge pull request #199 from v1bri/brian-fix-gflags-link
Use gflags ALIAS instead of ${gflags_XXX} vars
This commit is contained in:
commit
80bec2ba45
@ -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)
|
|||||||
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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user