CMake does not provide a FindCapnProto.cmake module and never will, because CapnProto already ships CMake package configuration files. Make sure to skip the search for the CMake module and avoid the confusing “By not providing …” error message if CapnProto is not installed.
Current error message if CapnProto is not intalled:
0CMake Error at CMakeLists.txt:16 (find_package):
1 By not providing "FindCapnProto.cmake" in CMAKE_MODULE_PATH this project
2 has asked CMake to find a package configuration file provided by
3 "CapnProto", but CMake did not find one.
4
5 Could not find a package configuration file provided by "CapnProto"
6 (requested version 0.7) with any of the following names:
7
8 CapnProtoConfig.cmake
9 capnproto-config.cmake
10
11 Add the installation prefix of "CapnProto" to CMAKE_PREFIX_PATH or set
12 "CapnProto_DIR" to a directory containing one of the above files. If
13 "CapnProto" provides a separate development package or SDK, be sure it has
14 been installed.
15
16
17-- Configuring incomplete, errors occurred!
with NO_MODULE:
0CMake Error at CMakeLists.txt:16 (find_package):
1 Could not find a package configuration file provided by "CapnProto"
2 (requested version 0.7) with any of the following names:
3
4 CapnProtoConfig.cmake
5 capnproto-config.cmake
6
7 Add the installation prefix of "CapnProto" to CMAKE_PREFIX_PATH or set
8 "CapnProto_DIR" to a directory containing one of the above files. If
9 "CapnProto" provides a separate development package or SDK, be sure it has
10 been installed.
11
12
13-- Configuring incomplete, errors occurred!