Skip to content

Commit

Permalink
update build
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta committed Nov 20, 2023
1 parent defe690 commit 57219e5
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions shared/setupBuild.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ model {
}
exportedHeaders {
srcDirs 'src/main/native/include', "$buildDir/generated/source/proto/main/cpp"
include '**/*.h'
include "**/*.h"
}
}
}

binaries.all {
if (it instanceof SharedLibraryBinarySpec) {
it.buildable = false
Expand Down Expand Up @@ -60,28 +61,26 @@ model {
include '**/*.cpp'
}
exportedHeaders {
srcDirs 'src/test/native/include', 'src/main/native/cpp'
srcDirs 'src/test/native/include', "$buildDir/generated/source/proto/main/cpp"
}
}
}

binaries.all {
it.tasks.withType(CppCompile) {
it.dependsOn generateProto
}
if(project.hasProperty('includePhotonTargeting')) {
lib project: ':photon-targeting', library: 'photontargeting', linkage: 'shared'
}
}

nativeUtils.useRequiredLibrary(it, "wpilib_executable_shared")
nativeUtils.useRequiredLibrary(it, "googletest_static")
nativeUtils.useRequiredLibrary(it, "apriltag_shared")
nativeUtils.useRequiredLibrary(it, "opencv_shared")
}
}
binaries {
withType(GoogleTestTestSuiteBinarySpec) {
it.tasks.withType(CppCompile) {
it.dependsOn generateProto
}

if(project.hasProperty('includePhotonTargeting')) {
lib project: ':photon-targeting', library: 'photontargeting', linkage: 'shared'
}
}
}
}

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

0 comments on commit 57219e5

Please sign in to comment.