Commit Graph

5 Commits

Author SHA1 Message Date
Bruno Coelho
3704671508 Add option to disable unit tests 2016-07-05 15:37:44 +01:00
Chris Kitching
05b5514400
Don't assume in-tree builds when installing json11.pc 2016-05-05 02:43:43 +01:00
Nick White
8076ba74e0 Generate pkg-config File & Add Install
...to the CMake build script. The pkg-config file needs a version number (which
it takes from the CMakeLists.txt variable), which I've set to 1.0.0. The cmake
project declaration needs to be after the minimum-requirement declaration to
avoid errors from the cmake's change in VERSION semantics.
2016-04-16 18:43:09 +01:00
kirisetsz
5e664c99d8 Update CMakeLists to 3.x style 2016-04-08 01:16:21 +08:00
Paul C Roberts
0c6e9d77a4 Add cmake support
This uses cmake to allow building as a static library and to build the tests

To use `cmake`

```
$ mkdir build
$ cd build
$ cmake ..
 .
 .
-- Build files have been written to: ~/json11/build
$ make
Scanning dependencies of target json11
[ 20%] Building CXX object CMakeFiles/json11.dir/json11.cpp.o
[ 40%] Linking CXX static library libjson11.a
[ 40%] Built target json11
Scanning dependencies of target json11_test
[ 60%] Building CXX object CMakeFiles/json11_test.dir/json11.cpp.o
[ 80%] Building CXX object CMakeFiles/json11_test.dir/test.cpp.o
[100%] Linking CXX executable json11_test
[100%] Built target json11_test
$ make test
running tests...
Test project /Users/paul/dev/json11/build
    Start 1: json11_test
    1/1 Test #1: json11_test ......................   Passed    0.00 sec

    100% tests passed, 0 tests failed out of 1

    Total Test time (real) =   0.01 sec
$
```
2015-08-19 14:53:28 -07:00