nlohmann_jsonConfig.cmake 620 B

123456789101112131415
  1. include(FindPackageHandleStandardArgs)
  2. set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG ${CMAKE_CURRENT_LIST_FILE})
  3. find_package_handle_standard_args(nlohmann_json CONFIG_MODE)
  4. if(NOT TARGET nlohmann_json::nlohmann_json)
  5. include("${CMAKE_CURRENT_LIST_DIR}/nlohmann_jsonTargets.cmake")
  6. if((NOT TARGET nlohmann_json) AND
  7. (NOT nlohmann_json_FIND_VERSION OR
  8. nlohmann_json_FIND_VERSION VERSION_LESS 3.2.0))
  9. add_library(nlohmann_json INTERFACE IMPORTED)
  10. set_target_properties(nlohmann_json PROPERTIES
  11. INTERFACE_LINK_LIBRARIES nlohmann_json::nlohmann_json
  12. )
  13. endif()
  14. endif()