The CMake\'s ExternalProject allows to define how to an external project is going to be downloaded, configured, built and installed. All whose steps are going to be performed at
The Hunter C++ package manager does what I asked for. Hunter is based on CMake ExternalProject, but comes with a set of predefined projects. Also, it builds the dependencies during configuration and they can be accessed by find_package(... CONFIG). Very nice stuff!