miloyip/rapidjson — pull request #192 by jollyroger (2014-11-05 02:23:51+00:00)
Title: CMake support

This is my try to add CMake support for RapidJSON and close #82. It was tested and is working for:

* Debian Linux (w/ libgtest-dev installed and w/ gtest as submodule)
* Windows XP ( VS2010, Cygwin); Building on MSYS/MinGW give many errors on gtest compilation it seems the last supported version of gtest for MSYS is 1.6.0, although it is not enough for RapidJSON to build using this version since there is no method EqFailure (see https://gist.github.com/jollyroger/45f29f4769cc41c7251f)

Some features available in this pull request:
- [x] In-source and out-of-source builds are supported
- [x] Separate options to build tests, examples and documentation
- [x] Automatic documentation building (if Doxygen is available and respective option is set)
- [x] Smart Google Test Toolkit lookup w/ build options check against Win32/Unix
- [x] Pkgconfig and CMake package lookup and version support (if installed with `make install`)
- [x] Running tests with ctest (using `make test` of `ctest -V` to get verbose output as before)
- [ ] Compilation flags support provided in #126 and #185

As small addition: I fixed linking errors in the documentation.