mirror of
https://github.com/nlohmann/json.git
synced 2026-07-02 16:54:19 +00:00
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> ```
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
@PACKAGE_INIT@
|
||||
set_and_check(JSON_INCLUDE_DIR "@PACKAGE_JSON_INCLUDE_DESTINATION@")
|
||||
|
||||
cmake_policy(PUSH)
|
||||
cmake_policy(SET CMP0024 OLD)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/@JSON_TARGETS_FILENAME@)
|
||||
cmake_policy(POP)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@NLOHMANN_JSON_TARGETS_EXPORT_NAME@.cmake")
|
||||
check_required_components("@PROJECT_NAME@")
|
||||
|
||||
Reference in New Issue
Block a user