CMake understands what private library dependencies for a static library means and handles it correctly. (cherry picked from commit f6d44ced)