1c5f01b2fSopenharmony_ci# This is essentially cmake's BasicConfigVersion-SameMajorVersion.cmake.in but
2c5f01b2fSopenharmony_ci# without the 32/64-bit check.  Since json is a header-only library, it doesn't
3c5f01b2fSopenharmony_ci# matter if it was built on a different platform than what it is used on (see
4c5f01b2fSopenharmony_ci# https://github.com/nlohmann/json/issues/1697).
5c5f01b2fSopenharmony_ciset(PACKAGE_VERSION "@PROJECT_VERSION@")
6c5f01b2fSopenharmony_ci
7c5f01b2fSopenharmony_ciif(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
8c5f01b2fSopenharmony_ci  set(PACKAGE_VERSION_COMPATIBLE FALSE)
9c5f01b2fSopenharmony_cielse()
10c5f01b2fSopenharmony_ci
11c5f01b2fSopenharmony_ci  if(PACKAGE_FIND_VERSION_MAJOR STREQUAL "@PROJECT_VERSION_MAJOR@")
12c5f01b2fSopenharmony_ci    set(PACKAGE_VERSION_COMPATIBLE TRUE)
13c5f01b2fSopenharmony_ci  else()
14c5f01b2fSopenharmony_ci    set(PACKAGE_VERSION_COMPATIBLE FALSE)
15c5f01b2fSopenharmony_ci  endif()
16c5f01b2fSopenharmony_ci
17c5f01b2fSopenharmony_ci  if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
18c5f01b2fSopenharmony_ci      set(PACKAGE_VERSION_EXACT TRUE)
19c5f01b2fSopenharmony_ci  endif()
20c5f01b2fSopenharmony_ciendif()
21