Skip to content

Commit

Permalink
fix: CMake/protobuf/abseil, fixes #38
Browse files Browse the repository at this point in the history
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 protocolbuffers/protobuf#12637 (comment)
see https://stackoverflow.com/a/56896032/620382
  • Loading branch information
tilsche committed Dec 3, 2023
1 parent 00216eb commit 8f64c21
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8f64c21

Please sign in to comment.