Unverified Commit e4bc98d0 authored by Niels Lohmann's avatar Niels Lohmann Committed by GitHub

Merge pull request #1245 from chuckatkins/fix-target-namespace-backward-compatibility

Use a version check to provide backwards comatible CMake imported target names
parents 99939d63 3b1a5caf
@PACKAGE_INIT@
if(NOT TARGET @PROJECT_NAME@::@NLOHMANN_JSON_TARGET_NAME@)
include("${CMAKE_CURRENT_LIST_DIR}/@NLOHMANN_JSON_TARGETS_EXPORT_NAME@.cmake")
if((NOT TARGET @NLOHMANN_JSON_TARGET_NAME@) AND
(PACKAGE_FIND_VERSION VERSION_LESS 3.2.0))
add_library(@NLOHMANN_JSON_TARGET_NAME@ ALIAS @PROJECT_NAME@::@NLOHMANN_JSON_TARGET_NAME@)
endif()
endif()
check_required_components("@PROJECT_NAME@")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment