How to use CMakePackageConfigHelpers right?

I have learned, there is no generic way to do it.

But I found this block: https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/

One more way to do it:

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)