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 13
13
14
14
allprojects {
15
15
group = " edu.wpi.first"
16
- version = " 2025.0 .0"
16
+ version = " 2025.1 .0"
17
17
18
18
if (project. hasProperty(' publishVersion' )) {
19
19
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) {
11
11
NativeUtilsExtension nativeExt = project .getExtensions ().getByType (NativeUtilsExtension .class );
12
12
13
13
nativeExt .addWpiExtension ();
14
+
15
+ project .getPluginManager ().apply (RpathRules .class );
14
16
}
15
17
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import edu.wpi.first.toolchain.NativePlatforms
2
2
3
3
plugins {
4
4
id " cpp"
5
- id " edu.wpi.first.NativeUtils" version " 2025.0 .0"
5
+ id " edu.wpi.first.NativeUtils" version " 2025.1 .0"
6
6
}
7
7
8
8
nativeUtils. addWpiNativeUtils()
You can’t perform that action at this time.
0 commit comments