Skip to content

Commit 878e84d

Browse files
committed
Merge #203: cmake: search capnproto in package mode only
3bee07a cmake: search capnproto in package mode only (Daniel Pfeifer) Pull request description: 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: ``` CMake Error at CMakeLists.txt:16 (find_package): By not providing "FindCapnProto.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "CapnProto", but CMake did not find one. Could not find a package configuration file provided by "CapnProto" (requested version 0.7) with any of the following names: CapnProtoConfig.cmake capnproto-config.cmake Add the installation prefix of "CapnProto" to CMAKE_PREFIX_PATH or set "CapnProto_DIR" to a directory containing one of the above files. If "CapnProto" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred! ``` with `NO_MODULE`: ``` CMake Error at CMakeLists.txt:16 (find_package): Could not find a package configuration file provided by "CapnProto" (requested version 0.7) with any of the following names: CapnProtoConfig.cmake capnproto-config.cmake Add the installation prefix of "CapnProto" to CMAKE_PREFIX_PATH or set "CapnProto_DIR" to a directory containing one of the above files. If "CapnProto" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred! ``` ACKs for top commit: ryanofsky: Code review ACK 3bee07a. Thanks for the improvement! Tree-SHA512: 6a0b5568179dc3ffe0a8ac202287dc88a320db016002426c43e33a716191eebf40404af60554244ca601c8c9314b1343d9b190ae69eaa8262648960bf8213089
2 parents 1a85da5 + 3bee07a commit 878e84d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ endif()
1313
include("cmake/compat_find.cmake")
1414

1515
find_package(Threads REQUIRED)
16-
find_package(CapnProto 0.7 REQUIRED)
16+
find_package(CapnProto 0.7 REQUIRED NO_MODULE)
1717

1818
# Check for list-of-pointers memory access bug from Nov 2022
1919
# https://nvd.nist.gov/vuln/detail/CVE-2022-46149

0 commit comments

Comments
 (0)