mirror of
https://github.com/nlohmann/json
synced 2024-11-23 04:20:06 +00:00
Use a version check to provide backwards comatible imported target names.
This commit is contained in:
parent
99939d6340
commit
3b1a5cafad
@ -1,5 +1,9 @@
|
||||
@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@")
|
||||
|
Loading…
Reference in New Issue
Block a user