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)
Sun, Apr 21, 2:26 PM
Unknown Object (File)
Mon, Apr 15, 1:31 AM
Unknown Object (File)
Mon, Apr 15, 1:31 AM
Unknown Object (File)
Mon, Apr 15, 1:31 AM
Unknown Object (File)
Mon, Apr 15, 1:30 AM
Unknown Object (File)
Mon, Apr 15, 1:28 AM
Unknown Object (File)
Sun, Mar 31, 12:56 AM
Unknown Object (File)
Mar 22 2024, 4:17 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
No Lint Coverage
Unit
No Test Coverage

Event Timeline

max added inline comments.
shared/cmake/corrosion-cxx.cmake
56

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

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.