File tree Expand file tree Collapse file tree 4 files changed +25
-2
lines changed
src/main/java/edu/wpi/first/nativeutils Expand file tree Collapse file tree 4 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 1313
1414allprojects {
1515 group = " edu.wpi.first"
16- version = " 2025.0 .0"
16+ version = " 2025.1 .0"
1717
1818 if (project. hasProperty(' publishVersion' )) {
1919 version = project. publishVersion
Original file line number Diff line number Diff line change 1+ package edu .wpi .first .nativeutils ;
2+
3+ import org .gradle .api .Task ;
4+ import org .gradle .model .ModelMap ;
5+ import org .gradle .model .RuleSource ;
6+ import org .gradle .nativeplatform .SharedLibraryBinarySpec ;
7+ import org .gradle .nativeplatform .tasks .LinkSharedLibrary ;
8+ import org .gradle .platform .base .BinaryTasks ;
9+
10+ public class RpathRules extends RuleSource {
11+ @ BinaryTasks
12+ public void createRpathSharedBinaryTasks (ModelMap <Task > tasks , SharedLibraryBinarySpec binary ) {
13+ if (!binary .getTargetPlatform ().getOperatingSystem ().isMacOsX ()) {
14+ return ;
15+ }
16+
17+ binary .getTasks ().withType (LinkSharedLibrary .class , link -> {
18+ link .getInstallName ().set ("@rpath/" + binary .getSharedLibraryFile ().getName ());
19+ });
20+ }
21+ }
Original file line number Diff line number Diff line change @@ -11,5 +11,7 @@ public void apply(Project project) {
1111 NativeUtilsExtension nativeExt = project .getExtensions ().getByType (NativeUtilsExtension .class );
1212
1313 nativeExt .addWpiExtension ();
14+
15+ project .getPluginManager ().apply (RpathRules .class );
1416 }
1517}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import edu.wpi.first.toolchain.NativePlatforms
22
33plugins {
44 id " cpp"
5- id " edu.wpi.first.NativeUtils" version " 2025.0 .0"
5+ id " edu.wpi.first.NativeUtils" version " 2025.1 .0"
66}
77
88nativeUtils. addWpiNativeUtils()
You can’t perform that action at this time.
0 commit comments