summaryrefslogtreecommitdiff
path: root/INSTALL.md
diff options
context:
space:
mode:
authorRob Earhart <earhart@google.com>2016-02-18 18:16:44 -0800
committerRob Earhart <earhart@google.com>2016-02-18 18:28:31 -0800
commit40b85b18def5c70fd78c6a5610d545764fdce0e0 (patch)
treee991cc620d8d601f9f2733f84cf0990d901c137d /INSTALL.md
parentf9fa30506c675689a9fef3f703f3aa97325e8d4f (diff)
downloadgflags-40b85b18def5c70fd78c6a5610d545764fdce0e0.tar.gz
gflags-40b85b18def5c70fd78c6a5610d545764fdce0e0.tar.bz2
gflags-40b85b18def5c70fd78c6a5610d545764fdce0e0.zip
Add bazel support
Diffstat (limited to 'INSTALL.md')
-rw-r--r--INSTALL.md23
1 files changed, 22 insertions, 1 deletions
diff --git a/INSTALL.md b/INSTALL.md
index b89d86d..a206bda 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -11,7 +11,7 @@ following command:
sudo apt-get install gflags
-Compiling the source code
+Compiling the source code with CMake
=========================
The build system of gflags is since version 2.1 based on [CMake](http://cmake.org).
@@ -65,3 +65,24 @@ GFLAGS_INTTYPES_FORMAT | String identifying format of built-in integer type
GFLAGS_INCLUDE_DIR | Name of headers installation directory relative to CMAKE_INSTALL_PREFIX.
LIBRARY_INSTALL_DIR | Name of library installation directory relative to CMAKE_INSTALL_PREFIX.
INSTALL_HEADERS | Request installation of public header files.
+
+Using gflags with [Bazel](http://bazel.io)
+=========================
+
+To use gflags in a Bazel project, map it in as an external dependency by editing
+your WORKSPACE file:
+
+ git_repository(
+ name = "gflags_git",
+ commit = "", # Use the current HEAD commit
+ remote = "https://github.com/gflags/gflags.git",
+ )
+
+ bind(
+ name = "gflags",
+ actual = "@gflags_git//:gflags",
+ )
+
+You can then add `//external:gflags` to the `deps` section of a `cc_binary` or
+`cc_library` rule, and `#include <gflags/gflags.h>` to include it in your source
+code.