C++ native: Linking external libaries with cpp-application

How to link with shared libraries installed on the system?

https://docs.gradle.org/current/userguide/building_cpp_projects.html
I found this documentation a bit lacking. Does not say how to link to external libraries, other than using dependencies from binaries stored in a maven repository.

The libraries I want to use are installed on the system through the Linux package manager.

It is so easy with CMake:
First find the package, then link it.
Here I am linking with Google Protobuf, which requires the package protobuf-devel to be installed through the package manager.
I do not need to know the path of this library on my system, nor the libraries to link it.

find_package(Protobuf REQUIRED)

target_include_directories(application PRIVATE
  ${Protobuf_INCLUDE_DIRS}
)

target_link_libraries(application PRIVATE
  ${Protobuf_LIBRARIES}
)

I found some similar questions, but none of these has been answered.