Skip to content

Commit

Permalink
GFLAGS_STATIC isn't defined by CONFIG mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kou authored and wesm committed Feb 19, 2019
1 parent 34cb1a6 commit 9516d2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cpp/cmake_modules/FindGFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ if(GFLAGS_FOUND)
IMPORTED_LOCATION_${_GFLAGS_TARGET_CONFIG})
message(STATUS "GFlags shared library: ${GFLAGS_SHARED_LIB}")
endif()
if(GFLAGS_STATIC)
if(TARGET gflags_static)
set(GFLAGS_STATIC TRUE)
get_target_property(GFLAGS_STATIC_LIB gflags_static
IMPORTED_LOCATION_${_GFLAGS_TARGET_CONFIG})
message(STATUS "GFlags static library: ${GFLAGS_STATIC_LIB}")
Expand All @@ -52,6 +53,7 @@ if(GFLAGS_FOUND)
unset(_GFLAGS_TARGET_CONFIG)
return()
endif()
set(GFLAGS_FOUND FALSE)

pkg_check_modules(GFLAGS gflags)
if(GFLAGS_FOUND)
Expand Down

0 comments on commit 9516d2f

Please sign in to comment.