[build, wpiutil] Switch macos to universal binaries (#4628)

This commit is contained in:
Thad House
2022-11-14 11:36:33 -07:00
committed by GitHub
parent 5a320c326b
commit b53ce1d3f0
6 changed files with 7 additions and 23 deletions

View File

@@ -66,7 +66,6 @@ jobs:
- os: macOS-11
artifact-name: macOS
architecture: x64
build-options: "-Pbuildalldesktop"
task: "build"
outputs: "build/allOutputs"
- os: windows-2022

View File

@@ -5,5 +5,5 @@ repositories {
}
}
dependencies {
implementation "edu.wpi.first:native-utils:2023.6.1"
implementation "edu.wpi.first:native-utils:2023.7.0"
}

View File

@@ -15,9 +15,9 @@ nativeUtils {
configureDependencies {
wpiVersion = "-1"
niLibVersion = "2023.1.0"
opencvVersion = "4.6.0-2"
googleTestVersion = "1.11.0-3"
imguiVersion = "1.88-8"
opencvVersion = "4.6.0-3"
googleTestVersion = "1.11.0-4"
imguiVersion = "1.88-9"
wpimathVersion = "-1"
}
}
@@ -34,14 +34,6 @@ nativeUtils.setSinglePrintPerPlatform()
nativeUtils.enableSourceLink()
nativeUtils.platformConfigs.each {
if (it.name.contains('windows')) {
it.cppCompiler.args.remove("/std:c++17")
it.cppCompiler.args.add("/std:c++20")
return
} else if (it.name == 'linuxx86-64' || it.name == 'osxx86-64' || it.name == 'osxarm64') {
it.cppCompiler.args.remove("-std=c++17")
it.cppCompiler.args.add("-std=c++20")
}
if (it.name.contains('osx')) {
it.linker.args << '-Wl,-rpath,\'@loader_path\''
it.linker.args << "-headerpad_max_install_names"

View File

@@ -6,7 +6,7 @@ nativeUtils {
headerClassifier = "headers"
sourceClassifier = "sources"
ext = "zip"
version = '0.95-5'
version = '0.95-6'
targetPlatforms.addAll(nativeUtils.wpi.platforms.allPlatforms)
}
}

View File

@@ -30,8 +30,7 @@
"windowsx86-64",
"windowsx86",
"linuxx86-64",
"osxx86-64",
"osxarm64"
"osxuniversal"
]
}
]

View File

@@ -31,13 +31,7 @@ public final class RuntimeDetector {
} else if (isMac()) {
filePrefix = "lib";
fileExtension = ".dylib";
if (intel32) {
filePath = "/osx/x86/";
} else if (arm64) {
filePath = "/osx/arm64/";
} else {
filePath = "/osx/x86-64/";
}
filePath = "/osx/universal/";
} else if (isLinux()) {
filePrefix = "lib";
fileExtension = ".so";