mirror of
https://github.com/gflags/gflags.git
synced 2025-04-05 05:25:04 +00:00
Change order of sections in INSTALL file, mention Homebrew
This commit is contained in:
parent
57c5913fb8
commit
ee36936d2e
1 changed files with 28 additions and 26 deletions
54
INSTALL.md
54
INSTALL.md
|
@ -1,17 +1,35 @@
|
|||
Installing a binary distribution package
|
||||
========================================
|
||||
# Installing a binary distribution package
|
||||
|
||||
No official binary distribution packages are provided by the gflags developers.
|
||||
There may, however, be binary packages available for your OS. Please consult
|
||||
also the package repositories of your Linux distribution.
|
||||
There may, however, be binary packages available for your operating system.
|
||||
Please consult also the package repositories of your Linux distribution.
|
||||
|
||||
For example on Debian/Ubuntu Linux, gflags can be installed using the
|
||||
following command:
|
||||
On Debian/Ubuntu Linux, gflags can be installed using the following command:
|
||||
|
||||
sudo apt-get install libgflags-dev
|
||||
|
||||
Compiling the source code with vcpkg
|
||||
=========================
|
||||
On macOS, [Homebrew](https://brew.sh/) includes a formula for gflags:
|
||||
|
||||
brew install gflags
|
||||
|
||||
|
||||
# Compiling the source code with Bazel
|
||||
|
||||
To use gflags in a [Bazel](http://bazel.io) project, map it in as an external
|
||||
dependency by editing your WORKSPACE file:
|
||||
|
||||
git_repository(
|
||||
name = "com_github_gflags_gflags",
|
||||
commit = "<INSERT COMMIT SHA HERE>",
|
||||
remote = "https://github.com/gflags/gflags.git",
|
||||
)
|
||||
|
||||
You can then add `@com_github_gflags_gflags//: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.
|
||||
|
||||
|
||||
# Compiling the source code with vcpkg
|
||||
|
||||
You can download and install gflags using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
|
||||
|
||||
|
@ -23,8 +41,8 @@ You can download and install gflags using the [vcpkg](https://github.com/Microso
|
|||
|
||||
The gflags port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
||||
|
||||
Compiling the source code with CMake
|
||||
=========================
|
||||
|
||||
# Compiling the source code with CMake
|
||||
|
||||
The build system of gflags is since version 2.1 based on [CMake](http://cmake.org).
|
||||
The common steps to build, test, and install software are therefore:
|
||||
|
@ -77,19 +95,3 @@ 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 = "com_github_gflags_gflags",
|
||||
commit = "<INSERT COMMIT SHA HERE>",
|
||||
remote = "https://github.com/gflags/gflags.git",
|
||||
)
|
||||
|
||||
You can then add `@com_github_gflags_gflags//: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.
|
||||
|
|
Loading…
Add table
Reference in a new issue