certainly, that is the recommended way indeed, and I would say nowadays it's probably best to use Conan or another package manager. The main point being, you don't have control over or know exactly where your library will be used and how it will be built, using the globals means some techniques won't work, but that will be detected most likely through odd build failures