From b0d90b2361e22d6576b276912106ca03aed293d1 Mon Sep 17 00:00:00 2001 From: tilsche Date: Sun, 3 Dec 2023 17:15:55 +0100 Subject: [PATCH] fix: CMake/protobuf/abseil, fixes #38 This uses the config version of FindPackage. But we have to sue the module compatibiltiy, because the build commands of config version are totally different and undocumented. see https://github.com/protocolbuffers/protobuf/issues/12637#issuecomment-1537453958 see https://stackoverflow.com/a/56896032/620382 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb517bd..410ba82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,9 @@ include(cmake/DefaultBuildType.cmake) include(cmake/GitSubmoduleUpdate.cmake) git_submodule_update() -find_package(Protobuf 3.0 REQUIRED) +set(protobuf_MODULE_COMPATIBLE ON CACHE BOOL "") +find_package(Protobuf CONFIG REQUIRED) + find_package(Git) if(NOT METRICQ_POSITION_INDEPENDENT_CODE)