Page MenuHomePhabricator

[CMake] Resolve rust library include directory
ClosedPublic

Authored by jon on Feb 5 2023, 6:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 22, 4:17 AM
Unknown Object (File)
Fri, Mar 22, 4:17 AM
Unknown Object (File)
Wed, Mar 20, 3:25 AM
Unknown Object (File)
Wed, Mar 20, 3:24 AM
Unknown Object (File)
Sun, Mar 10, 3:36 AM
Unknown Object (File)
Feb 22 2024, 2:12 PM
Unknown Object (File)
Feb 22 2024, 11:11 AM
Unknown Object (File)
Feb 22 2024, 10:46 AM
Subscribers

Details

Summary

When consuming rust_native_library from many
projects, the directory path needs to be resolved fully to work
when the build directory may be different; as is the case when
using 'add_subdirectory()' in CMake.

REALPATH was chosen over ABSPATH as REALPATH will still provide
an abssolute path but with symlinks resolved.

Depends on D6498

Test Plan

Android build gate is successful
Tested fully in D6507

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

max added inline comments.
shared/cmake/corrosion-cxx.cmake
56 ↗(On Diff #22109)

Maybe we should change the variable name to reflect that this is a real path.

This revision is now accepted and ready to land.Feb 6 2023, 3:15 AM
jon marked an inline comment as done.

Apply feedback, rebase on master

jon added inline comments.
shared/cmake/corrosion-cxx.cmake
56 ↗(On Diff #22109)

split the difference with REALPATH_BINARY_DIR. As BINARY_REALPATH says "realpath to a binary file" to me.

This revision was automatically updated to reflect the committed changes.
jon marked an inline comment as done.