Skip to content

access ${cargo_build_dir} for additional byproducts (cbindgen headers) #526

Answered by jschwe
diresi asked this question in Q&A
Discussion options

You must be logged in to vote

corrosion_experimental_cbindgen() is definitly usable and will probably be renamed to just corrosion_cbindgen() when i have some spare time.

Static libs are copied to the target directory (something outside of $CMAKE_BINARY_DIR/corrosion) alright, but that affects only .a files. Headers next to libs are left out.

Corrosion can't know what a user defined build script will do. Corrosion does know what corrosion_experimental_cbindgen() does.

I had the idea to explicitly use _add_cargo_build()

Don't rely on implementation details of corrosion please.

If you want to use build.rs (and thats a perfectly viable option), you can use corrosion_set_env_vars() to set an environment variable with …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by diresi
Comment options

You must be logged in to vote
1 reply
@diresi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants