Open zachcran opened 1 year ago
@zachcran was this addressed by your recent rpath changes?
@ryanmrichard In theory, yes, but I haven't tested it on a Mac yet.
@ryanmrichard In theory, yes, but I haven't tested it on a Mac yet.
Actually, scratch that. I apparently did test it on Mac (see #133 checklist).
Describe the bug The current implementation in CMaize for setting the RPATH on targets only supports Linux RPATH settings. Apple has a similar feature, but different keywords.
To Reproduce Must be on a Mac
repo_1
.repo_2
, with a test calledtest_repo_2
. This test should not directly depend onrepo_1
.repo_1
and add the install path to your CMAKE_PREFIX_PATH.repo_2
andtest_repo_2
.test_repo_2
test.repo_1
dylib not being found.Expected behavior The RPATH of generated libraries and executables should be set properly to find dependencies after the CMake build.
Additional context The best practice appears to be to special-case Apple build RPATH settings. Craig Scott has a great talk about CMake installs and RPATHs from CppCon 2019 that helps explain where to start, but does not go into details about how to handle Apple systems. (Timestamp at 50:26: https://youtu.be/m0DwB4OvDXk?t=3026)