Rust: Let rustc link to the built libelektra.so
@@ -4,9 +4,10 @@ use std::env;
use std::path::PathBuf;
fn main() {
- // Tell cargo to tell rustc to link the system elektra
- // shared library.
- // Needs to depend on some CMAKE variable indicating static or shared build
+ // Add libelektra build directory to rustc's search path
+ println!("cargo:rustc-link-search=@CMAKE_BINARY_DIR@/lib");
+ // May need to depend on BUILD_SHARED or BUILD_STATIC
+ // Tell cargo to tell rustc to link the elektra shared library.
println!("cargo:rustc-link-lib=elektra");
// The bindgen::Builder is the main entry point
