Add BOOST_VER cmake option in README

This commit is contained in:
melode11 2015-04-08 16:38:53 +08:00
parent e3658fe277
commit 15552e6ad1

View File

@ -18,15 +18,16 @@ By virtue of being written in C++, this client works in several different platfo
### With CMake ### With CMake
1. Install boost, see [Boost setup](#boost_setup) section. 1. Install boost, see [Boost setup](#boost_setup) section.
2. Use `git clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git` to clone your local repo. 2. Use `git clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git` to clone your local repo.
3. Run `cmake -DBOOST_PATH:STRING=<your boost install folder> ./` 3. Run `cmake -DBOOST_PATH:STRING=<your boost install folder> -DBOOST_VER:STRING=<your boost version> ./`
4. Run `make install`(if makefile generated) or open generated project (if project file generated) to build. 4. Run `make install`(if makefile generated) or open generated project (if project file generated) to build.
5. Include `sio_client.h` in your client code where you want to use it. 5. Find headers and lib under `./build`, link with the static lib and include `sio_client.h` in your client code where you want to use it.
*If you're using boost without install,you can specify `boost include dir` and `boost lib dir` separately by:* *If you're using boost without install,you can specify `boost include dir` and `boost lib dir` separately by:*
```bash ```bash
cmake cmake
-DBOOST_INCLUDE:STRING=<your boost include folder> -DBOOST_INCLUDE:STRING=<your boost include folder>
-DBOOST_LIB:STRING=<your boost lib folder> -DBOOST_LIB:STRING=<your boost lib folder>
-DBOOST_VER:STRING=<your boost version>
./ ./
``` ```