FIND_PATH(GFLAGS_INCLUDE_DIR gflags/gflags.h)

IF(WIN32)
    SET(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
ENDIF()

FIND_LIBRARY(GFLAGS_LIBRARY NAMES gflags
			DOC "The Google Gflags Library"
			)

SET(GFLAGS_INCLUDE_DIRS ${GFLAGS_INCLUDE_DIR})
SET(GFLAGS_LIBRARIES    ${GFLAGS_LIBRARY})

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GFLAGS DEFAULT_MSG GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY)

MARK_AS_ADVANCED(GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY)