diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e5ee8f71b00a..6f9b7517f396b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,7 @@ mark_as_advanced(protobuf_DEBUG_POSTFIX) include(${protobuf_SOURCE_DIR}/cmake/protobuf-options.cmake) if (protobuf_BUILD_SHARED_LIBS) + # This is necessary for linking in Abseil. set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif ()