nlohmann_jsonConfigVersion.cmake.in 709 B

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