diff --git a/.gitmodules b/.gitmodules index e69de29..8e6d60a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "source"] + path = cpp-api + url = https://github.com/Vector35/binaryninja-api diff --git a/binaryninjacore-sys/build.rs b/binaryninjacore-sys/build.rs index 2980ca3..de7c5cd 100644 --- a/binaryninjacore-sys/build.rs +++ b/binaryninjacore-sys/build.rs @@ -44,7 +44,7 @@ fn link_path() -> PathBuf { } fn main() { - println!("cargo:rerun-if-changed=source/binaryninjacore.h"); + println!("cargo:rerun-if-changed=cpp-api/binaryninjacore.h"); //Cargo's output directory let out_dir = env::var("OUT_DIR").unwrap(); @@ -79,7 +79,7 @@ fn main() { let minimum_line = "#define BN_MINIMUM_UI_ABI_VERSION "; let mut current_version = "0".to_string(); let mut minimum_version = "0".to_string(); - let file = File::open("source/ui/uitypes.h").expect("Couldn't open uitypes.h"); + let file = File::open("cpp-api/ui/uitypes.h").expect("Couldn't open uitypes.h"); for line in BufReader::new(file).lines() { let line = line.unwrap(); if let Some(version) = line.strip_prefix(current_line) { @@ -90,7 +90,7 @@ fn main() { } bindgen::builder() - .header("source/binaryninjacore.h") + .header("cpp-api/binaryninjacore.h") .clang_arg("-std=c++17") .clang_arg("-x") .clang_arg("c++") diff --git a/cpp-api b/cpp-api new file mode 160000 index 0000000..2d45ae4 --- /dev/null +++ b/cpp-api @@ -0,0 +1 @@ +Subproject commit 2d45ae4ea90d0792627927def462ed7c2350bb89