]> granicus.if.org Git - json-c/commit
The real CMake support
authorUnmanned Player <36690541+unmanned-player@users.noreply.github.com>
Mon, 23 Jul 2018 22:06:13 +0000 (08:06 +1000)
committerUnmanned Player <36690541+unmanned-player@users.noreply.github.com>
Mon, 23 Jul 2018 22:06:13 +0000 (08:06 +1000)
commitf2e991a3419ee4078e8915e840b1a0d9003b349e
treed5b46b105eda3293707b691c14b33e0efabe56f7
parent2327b23d8e9111ad7d0df7452546c611c0e7ad7e
The real CMake support

This patch provides a CMakeLists.txt file to build JSON-C library without relying on auto-tools support. This makes the build a bit more portable and cleaner.

It can detect headers and symbols and generate config.h header file based on those detections. It cannot yet handle ctest(1) as the testing itself depends on comparing the output against files. Testing would need some creative abuse of CMake :) This will be provided a few patches later and may possibly involve refactoring test cases.

The patch has been tested on GCC 4.8.5 (Linux), GCC 7.2.0 (MinGW) and Microsoft Visual C++ 16.0 (2010?) locally. Also, compiles correctly on Travis CI and AppVeyor without errors.
CMakeLists.txt
README.md
appveyor.yml
cmake/Config.cmake.in [new file with mode: 0644]
cmake/config.h.in [new file with mode: 0644]
cmake/json_config.h.in [new file with mode: 0644]