include vs find_package rules of thumb

You are 100% right. Just put an include guard in the module and use include().

find_package is usually used to import targets. You could have a package of all cmake modules, but that would still imply a separate package/distribution, not simply a module distributed as part of your source tree.

3 Likes