Both are found in the documentation because both are acceptable. There isn’t really a fixed, strict standard for where the .cmake files should go in the installation directory.
Personally, I usually put them in lib/cmake/<package>.
Are you asking for CMake to generate the find_dependency(fmt) call in the generated file? That is a hard problem. The targets which use fmt may be guarded by COMPONENTS of your config.cmake file.
In your example, the UUID target should set _FOUND for the relevant component (setting the package-wide _FOUND variable if it is a required component).
get_filename_component(JSONUTILS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
#
# NOTE: We had to use find_package because find_dependency does not support
# COMPONENTS or MODULE until 3.15.0? CK
#
list(APPEND CMAKE_MODULE_PATH ${JSONUTILS_CMAKE_DIR})
# NOTE: to find FindRapidJSON.cmake
find_package(RAPIDJSON @MIN_RAPIDJSON_VERSION@ REQUIRED MODULE)
list(REMOVE_AT CMAKE_MODULE_PATH -1)
include(CMakeFindDependencyMacro)
find_dependency(boost_regex @MIN_BOOST_VERSION@ REQUIRED CONFIG)
if(NOT TARGET JSONUtils::JSONUtils)
include("${JSONUTILS_CMAKE_DIR}/JSONUtilsTargets.cmake")
endif()
set(JSONUTILS_lIBRARIES JSONUtils::JSONUtils)