mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 22:31:14 +00:00
Clean up generated C++ include directory handling
Don't generate the headers by default in the source directory, put them into a sub-directory in OUT_DIR instead and convey that location via links to the C++ test driver.
This commit is contained in:
parent
499ab6645c
commit
324fb48499
5 changed files with 19 additions and 10 deletions
|
@ -20,8 +20,12 @@ fn main() -> Result<(), anyhow::Error> {
|
|||
manifest_dir.to_string_lossy()
|
||||
));
|
||||
|
||||
let output_dir = std::env::var_os("SIXTYFPS_GENERATED_INCLUDE_DIR")
|
||||
.unwrap_or_else(|| Path::new(&manifest_dir).join("generated_include").into());
|
||||
let output_dir = std::env::var_os("SIXTYFPS_GENERATED_INCLUDE_DIR").unwrap_or_else(|| {
|
||||
Path::new(&std::env::var_os("OUT_DIR").unwrap()).join("generated_include").into()
|
||||
});
|
||||
let output_dir = Path::new(&output_dir);
|
||||
|
||||
cbindgen::gen_all(&root_dir, &Path::new(&output_dir))
|
||||
println!("cargo:GENERATED_INCLUDE_DIR={}", output_dir.display());
|
||||
|
||||
cbindgen::gen_all(&root_dir, &output_dir)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue