If you use the command or the pkgsrc subsystem to add the application, both will notice that the library has not been installed, and automatically install the library first.
You might be wondering why pkgsrc® bothers with both.
There are quarterly releases of pkgsrc that are specifically designed for stability.
You should in general follow these, rather than the bleeding edge pkgsrc.
However, you still need to download the pkgsrc tree for building applications with these tools.