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

cmake export (find_package) becomes portable #509

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

thorsten-klein
Copy link
Contributor

@thorsten-klein thorsten-klein commented Apr 23, 2024

Description:
Currently the cmake export CorrosionConfig.cmake adds a hardcoded path (CMAKE_INSTALL_FULL_DATADIR) to CMAKE_MODULE_PATH. Unfortunately this path is only valid during build time of corrosion.
If the resulting package is shipped (e.g. via a package manager like conan), then the path and therefore also the corrosion package becomes invalid.

Solution:
Instead, the import prefix of the package (PACKAGE_PREFIX_DIR) is used.

@jschwe
Copy link
Collaborator

jschwe commented Apr 23, 2024

Thanks, sounds reasonable.

e.g. via a package manager like conan

Can I assume you tested the fix and can confirm it works with conan?

@thorsten-klein
Copy link
Contributor Author

thorsten-klein commented Apr 23, 2024

Can I assume you tested the fix and can confirm it works with conan?

Yes, tested with cmake 3.26.3 in conan. I am able to consume corrosion now via conan (by using env variable CMAKE_PREFIX_PATH)

@jschwe jschwe merged commit 2a4137a into corrosion-rs:master Apr 23, 2024
36 checks passed
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.

2 participants