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, Nov 22, 11:38 AM
Unknown Object (File)
Wed, Nov 20, 3:16 PM
Unknown Object (File)
Tue, Nov 19, 12:50 AM
Unknown Object (File)
Tue, Nov 19, 12:50 AM
Unknown Object (File)
Fri, Nov 15, 1:53 AM
Unknown Object (File)
Fri, Nov 15, 1:52 AM
Unknown Object (File)
Sat, Nov 9, 11:17 AM
Unknown Object (File)
Fri, Nov 1, 8:19 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.