© ESO, 2017. We present a measurement of baryon acoustic oscillations (BAO) in the cross-correlation of quasars with the Lyα-forest flux transmission at a mean redshift of z = 2.40. The measurement uses the complete Sloan Digital Sky Survey (SDSS-III) data sample: 168 889 forests and 234 367 quasars from the SDSS data release DR12. In addition to the statistical improvement on our previous study using DR11, we have implemented numerous improvements at the analysis level enabling a more accurate measurement of this cross-correlation. We have also developed the first simulations of the cross-correlation that allow us to test different aspects of our data analysis and to search for potential systematic errors in the determination of the BAO peak position. We measure the two ratios DH(z = 2.40) /rd = 9.01 ± 0.36 and DM(z = 2.40) /rd = 35.7 ± 1.7, where the errors include marginalization over the non-linear velocity of quasars and the cross-correlation of metals and quasars, among other effects. These results are within 1.8σ of the prediction of the flat-ΛCDM model describing the observed cosmic microwave background anisotropies. We combine this study with the Lyα-forest auto-correlation function, yielding DH(z = 2.40) /rd = 8.94 ± 0.22 and DM(z = 2.40) /rd = 36.6 ± 1.2, within 2.3σ of the same flat-ΛCDM model.