Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parameter to corrosion_import_crate to return list of added targets #312

Merged
merged 4 commits into from Jan 25, 2023
Merged

Conversation

temeddix
Copy link
Contributor

@temeddix temeddix commented Jan 25, 2023

This PR adds new IMPORTED_CRATES flag to corrosion_import_crate() to retrieve the list of imported crates in the current scope. Idea was from issue #218.

With this PR, this kind of operation is made possible.

# Part of CMAKE file
corrosion_import_crate(MANIFEST_PATH ../native/Cargo.toml IMPORTED_CRATES crates_list)
target_link_libraries(${BINARY_NAME} PRIVATE ${crates_list})

I checked that this works as intended in an actual Rust/C++ project.

@temeddix temeddix changed the title Add parameter to corrosion_import_crate to return list of added targets #218 Add parameter to corrosion_import_crate to return list of added targets Jan 25, 2023
@jschwe jschwe merged commit 44749a9 into corrosion-rs:master Jan 25, 2023
@jschwe
Copy link
Collaborator

jschwe commented Jan 25, 2023

Thanks for the PR!

jschwe pushed a commit that referenced this pull request Feb 17, 2023
…ts (#312)

* Allow retrieving list of imported crates
* Write about retrieving imported crates list in docs

(cherry picked from commit 44749a9)
jschwe pushed a commit that referenced this pull request Feb 17, 2023
…ts (#312)

* Allow retrieving list of imported crates
* Write about retrieving imported crates list in docs

(cherry picked from commit 44749a9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants