# - Try to find GFLAGS # # The following are set after configuration is done: # GFLAGS_FOUND # GFLAGS_INCLUDE_DIRS # GFLAGS_LIBRARIES include(FindPackageHandleStandardArgs) # We are testing only a couple of files in the include directories find_path(GFLAGS_INCLUDE_DIR gflags/gflags.h) find_library(GFLAGS_LIBRARY NAMES gflags_static gflags PATH_SUFFIXES lib lib64) find_package_handle_standard_args(GFlags DEFAULT_MSG GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY) if(GFLAGS_FOUND) set(GFLAGS_INCLUDE_DIRS ${GFLAGS_INCLUDE_DIR}) set(GFLAGS_LIBRARIES ${GFLAGS_LIBRARY}) message(STATUS "Found gflags (include: ${GFLAGS_INCLUDE_DIR}, library: ${GFLAGS_LIBRARY})") mark_as_advanced(GFLAGS_LIBRARY GFLAGS_INCLUDE_DIR) endif()