glog: release 0.3.5
[platform/upstream/glog.git] / cmake / INSTALL.md
1 Building Glog with CMake
2 ========================
3
4 1. Create a build directory and `cd` to it.
5 2. Run
6     ```bash
7     cmake path/to/glog
8     ```
9
10 3. Afterwards, generated files (GNU make, Visual Studio, etc.) can be used to
11    compile the project.
12
13
14 Consuming Glog in a CMake Project
15 =================================
16
17 To use Glog in your project `myproj`, use:
18
19 ```cmake
20 cmake_minimum_required (VERSION 3.0)
21 project (myproj)
22
23 find_package (glog 0.3.5 REQUIRED)
24
25 add_executable (myapp main.cpp)
26 target_link_libraries (myapp glog::glog)
27 ```
28
29 Compile definitions and options will be added automatically to your target as
30 needed.