pub struct QtToolRcc { /* private fields */ }Expand description
A wrapper around the rcc tool
Implementations§
Source§impl QtToolRcc
impl QtToolRcc
Sourcepub fn new(qt_installation: &dyn QtInstallation) -> Self
pub fn new(qt_installation: &dyn QtInstallation) -> Self
Construct a QtToolRcc from a given QtInstallation
Sourcepub fn custom_args(
self,
args: impl IntoIterator<Item = impl AsRef<OsStr>>,
) -> Self
pub fn custom_args( self, args: impl IntoIterator<Item = impl AsRef<OsStr>>, ) -> Self
Append custom arguments to the end of the rcc invocation.
Sourcepub fn compile(&self, input_file: impl AsRef<Path>) -> Initializer
pub fn compile(&self, input_file: impl AsRef<Path>) -> Initializer
Run rcc on a .qrc file and save the output into cargo’s OUT_DIR.
The path to the generated C++ file is returned, which can then be passed to cc::Build::files.
This function also returns a String that contains the name of the resource initializer
function.
The build system must ensure that if the .cpp file is built into a static library, either
the +whole-archive flag is used, or the initializer function is called by the
application.