Skip to content

Commit

Permalink
Add ceres
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold856 committed Oct 22, 2024
1 parent c4666c3 commit 89d015a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions shared/ceres.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
nativeUtils {
nativeDependencyContainer {
ceres(getNativeDependencyTypeClass('WPIStaticMavenDependency')) {
groupId = "edu.wpi.first.thirdparty.frc2024.ceres"
artifactId = "ceres-cpp"
headerClassifier = "headers"
sourceClassifier = "sources"
ext = "zip"
version = '2.2-1'
targetPlatforms.addAll(nativeUtils.wpi.platforms.allPlatforms)
}
}
}
2 changes: 2 additions & 0 deletions wpical/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ apply from: "${rootDir}/shared/config.gradle"
def wpilibVersionFileInput = file("src/main/generate/WPILibVersion.cpp.in")
def wpilibVersionFileOutput = file("$buildDir/generated/main/cpp/WPILibVersion.cpp")

apply from: "${rootDir}/shared/ceres.gradle"
apply from: "${rootDir}/shared/opencv.gradle"

task generateCppVersion() {
Expand Down Expand Up @@ -112,6 +113,7 @@ model {
lib project: ':thirdparty:imgui_suite', library: 'imgui', linkage: 'static'
lib project: ':wpimath', library: 'wpimath', linkage: 'static'
lib project: ':apriltag', library: 'apriltag', linkage: 'static'
nativeUtils.useRequiredLibrary(it, 'ceres')
if (it.targetPlatform.operatingSystem.isWindows()) {
it.linker.args << 'Gdi32.lib' << 'Shell32.lib' << 'd3d11.lib' << 'd3dcompiler.lib'
} else if (it.targetPlatform.operatingSystem.isMacOsX()) {
Expand Down

0 comments on commit 89d015a

Please sign in to comment.