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). 5set(PACKAGE_VERSION "@PROJECT_VERSION@") 6 7if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) 8 set(PACKAGE_VERSION_COMPATIBLE FALSE) 9else() 10 11 if(PACKAGE_FIND_VERSION_MAJOR STREQUAL "@PROJECT_VERSION_MAJOR@") 12 set(PACKAGE_VERSION_COMPATIBLE TRUE) 13 else() 14 set(PACKAGE_VERSION_COMPATIBLE FALSE) 15 endif() 16 17 if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) 18 set(PACKAGE_VERSION_EXACT TRUE) 19 endif() 20endif() 21