Added documentation for cmake build.

This commit is contained in:
Daniel Nunes 2017-01-30 21:18:07 +00:00
parent fca9fe24ee
commit 773c3f6a60
1 changed files with 27 additions and 0 deletions

View File

@ -25,6 +25,33 @@ Then run the executable like this:
./example
## Building with CMake
While it is recommended to use the approach described above, this library also supports CMake builds,
mainly for compatibility with other CMake builds and for users who end up using this in many projects.
The only requirement is the `pthread` library. UNIX users should have it installed already and Windows
users can get it either from the [Pthreads-Win32](https://www.sourceware.org/pthreads-win32/) project
or, if they're using Mingw32/Cygwin, from their package managers.
To build with CMake, clone this repository and `cd` into it's root folder. Run the following:
```
mkdir build
cd build
cmake ..
make
```
This library should now be built in the `bin/` folder. To install it, simply:
```
sudo make install
```
MSVC users should look into CMake's documentation for their generator.
## Basic usage
1. Include the header in your source file: `#include "thpool.h"`