Due to the large masses of the charm and bottom quarks, their production cross sections are calculable within the perturbative QCD. This makes the heavy-quark mesons important observables in high-energy collisions of protons and nuclei. However, the available calculations for heavy-flavored-meson hadroproduction have been somewhat problematic in reliably describing the cross sections across the full kinematic range from zero to very high $p_{\rm T}$. This has put some question marks on the robustness of LHC heavy-flavored-meson measurements in studying the partonic structure of the colliding hadrons and nuclei. Here, we introduce SACOT-$m_{\rm T}$ - a novel scheme for open heavy-flavour hadroproduction within the general-mass variable-flavour-number formalism that solves this problem. The introduced scheme is an analogue of the SACOT-$\chi$ scheme often used for deeply-inelastic scattering in global analyses of PDFs.