Commit graph

8 commits

Author SHA1 Message Date
Chuck Atkins 1729db85c1 cmake: fix package config to deal with versioning and namespaces 2018-09-30 09:56:33 -04:00
Chuck Atkins 3b1a5cafad Use a version check to provide backwards comatible imported target names. 2018-09-18 13:59:19 -04:00
Chuck Atkins 33a2154f8d Enable target namespaces and build dir project config
CMake convention is to use a project namespace, i.e. Foo::, for imported
targets.  When multiple targets are imported from a project, this looks
like Foo::Bar1 Foo::Bar2, etc.  This adds the nlohmann_json:: namespace to
the exported target names.

This also allows the generated project config files to be used from the
build directory instead of just the install directory.
2018-04-10 09:08:38 -04:00
Niels Lohmann 99ee4c1eaf
🔨 cleaned up Makefiles and docs #698 2017-10-04 19:27:35 +02:00
dan-42 f434942371 REFACTOR: rewrite CMakeLists.txt for better inlcude and reuse
The rewrite uses more cmake build-in automatisms and build-in generates
variables to allow better generic reuse.
* cmake  files are installed to
``` <install_prefix>/lib/cmake/nlohmann_json/ ``` for best support on
most systems
* include path is set to ``` include ```  for usage as ``` #include
<nlohmann/json.hpp> ```
2017-07-29 11:59:09 +02:00
Tushar Maheshwari 85ce4d7b53 cmake compile time reduce using cotire
- Add prefix header
  - Include catch.hpp
  - Include json.hpp
    - Replace private with public for all json_unit files
- Move `unit.cpp` to an object library
- cotire issue: strip whitespace from CMAKE_INCLUDE_SYSTEM_FLAG_CXX
2017-02-19 13:35:54 +05:30
Christoph Jud e1b6a23049 relocation of install-include directory for other packages 2016-09-26 12:15:03 +02:00
Robert Marki b1a2e9a715 Create an install target for the project
- define the project's version in the cmake listfile
- create a config and config version file for the cmake package
- install the json.hpp file and the package's targets, config and
config version files
2016-04-25 10:27:19 +02:00