pub struct LocalLibrary { /* private fields */ }
Expand description
Local library configuration.
This contains all the information required to link against a local library.
Implementations§
Source§impl LocalLibrary
impl LocalLibrary
Sourcepub fn new(install_directory: &Path) -> LocalLibrary
pub fn new(install_directory: &Path) -> LocalLibrary
Create a new LocalLibrary
instance from a specific path.
This is useful when you want to ship binaries with your crate.
Sourcepub fn from(repository: CMakeBuilder) -> LocalLibrary
pub fn from(repository: CMakeBuilder) -> LocalLibrary
Create a new LocalLibrary
instance from a CMakeBuilder
.
Sourcepub fn add_include_directory(&mut self, path: &Path) -> &mut LocalLibrary
pub fn add_include_directory(&mut self, path: &Path) -> &mut LocalLibrary
Add a directory that will be searched for include files.
The path should be relative to the installation directory.
Sourcepub fn add_library_directory(&mut self, path: &Path) -> &mut LocalLibrary
pub fn add_library_directory(&mut self, path: &Path) -> &mut LocalLibrary
Add a directory that will be searched for library files.
The path should be relative to the installation directory.
Sourcepub fn link_target(&mut self, target: &str) -> &mut LocalLibrary
pub fn link_target(&mut self, target: &str) -> &mut LocalLibrary
Add a target to link against.
Before linking, the crate will check if the library exists. If it finds a static and shared library with the same name, it will always prefer the static library.
When linking against a shared library, the shared object will be copied to the target directory.
Sourcepub fn link_system_target(&mut self, target: &str) -> &mut LocalLibrary
pub fn link_system_target(&mut self, target: &str) -> &mut LocalLibrary
Add a system target to link against.
Unlike link_target
, this will not check if the library exists and will always assume that
the library is shared and available on the system.
system link targets will not be copied to the target directory.
Sourcepub fn get(&self) -> LocalLibrary
pub fn get(&self) -> LocalLibrary
Finalize the LocalLibrary
configuration.
Trait Implementations§
Source§impl Clone for LocalLibrary
impl Clone for LocalLibrary
Source§fn clone(&self) -> LocalLibrary
fn clone(&self) -> LocalLibrary
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more