-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathREADME
50 lines (38 loc) · 1.29 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
protobuf-cmake: CMake build files for Protocol Buffers
Written by Jesper Eskilson ([email protected]) with contributions from
several other people.
Requirements
------------
* CMake version 2.6
* Protobuf version 2.5.0 or 2.6.1
Download links
--------------
http://www.cmake.org/cmake/resources/software.html
http://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz
Instructions
------------
The CMake variable PROTOBUF_ROOT needs to be set to the location of
the Protocol Buffers sources. When running CMake on the command line,
this can be set like this:
$ cd build
$ cmake /path/to/protobuf-cmake -DPROTOBUF_ROOT=/path/to/protobufs
If you specify -DDOWNLOAD_PROTOBUF=1, the script will automatically
download protobuf.
For windows users with Visual Studio, an example build script can be like this:
```bat
::put this "build-vs2013.bat" file under root folder of this repo
@echo off
set build_dir=build-vs2013
if not exist %build_dir% md %build_dir%
cd %build_dir%
cmake .. ^
-G "Visual Studio 12 2013" ^
-DCMAKE_INSTALL_PREFIX=%cd%/install ^
-DPROTOBUF_ROOT=D:/lib/protobuf-2.6.1 ^
-DCMAKE_BUILD_TYPE=Debug
cmake --build . --config Debug
cmake --build . --target install --config Debug
cmake --build . --config Release
cmake --build . --target install --config Release
cd ..
```