If your dependency is neither providing config and target files nor has anyone written a find module for it, you can always write such a module yourself.
This is not something you'll do very often, so we'll try to just skim the topic. For an in-depth description, you should also read the guidelines in the official CMake documentation (linked in the Further reading section) or just look at a few find modules installed with CMake (usually in a directory such as /usr/share/cmake-3.17/Modules on Unix systems). For simplicity, we assume there's just one configuration of your dependency that you'd like to find, but it's possible to find Release and Debug binaries separately. This will result in different targets with different associated variables being set.
The script name determines the argument you'll pass to find_package; for example, if you wish to end up with find_package(Foo), then your script should be named FindFoo.cmake.
A good...