Updated publication reference for PubMed record(s): 25675208. Targeted proteomics by selected/multiple reaction monitoring or, on a larger scale, by SWATH MS relies on spectral reference libraries for peptide identification. Quality and coverage of these libraries are therefore of critical importance. Here we present a detailed protocol that has been successfully used to build high-quality, extensive reference libraries supporting targeted proteomics by SWATH MS. We describe each step of the process, including data acquisition by discovery proteomics, assertion of peptide-spectrum matches, generation of consensus spectra and compilation of mass spectrometric coordinates that uniquely define each targeted peptide. Crucial steps of this process such as FDR control, retention time normalization and handling of post-translationally modified peptides are discussed in detail. Finally we show how to use the library to extract SWATH data with the open-source software Skyline. The protocol takes 2-3 days to complete, depending on the extent of the library and the computational resources available.