Created
July 29, 2015 17:18
-
-
Save PeterMitrano/7650470cf5c57a27fab9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// There are two hal libraries that are built | |
// - Desktop hal which is used by simulation (gcc/msvc) | |
// - Athena hal which is used by the roborio (arm) | |
apply plugin: 'cpp' | |
model { | |
platforms { | |
arm { | |
architecture "arm" | |
} | |
x86_64 { | |
architecture "x86_64" | |
} | |
} | |
components { | |
HALShared(NativeLibrarySpec) { | |
targetPlatform 'arm' | |
targetPlatform 'x86_64' | |
binaries.all { | |
if (toolChain in Gcc){ | |
cppCompiler.args "-std=c++1y" | |
} | |
} | |
sources { | |
cpp { | |
source { | |
srcDirs = ["lib/Shared"] | |
includes = ["**/*.cpp"] | |
} | |
exportedHeaders { | |
srcDirs = ["include", "lib/Shared"] | |
} | |
} | |
} | |
} | |
HALAthena(NativeLibrarySpec) { | |
targetPlatform 'arm' | |
tasks.withType(CppCompile) { | |
dependsOn addNiLibraryLinks | |
} | |
sources { | |
cpp { | |
source { | |
srcDirs = ["lib/Athena", "lib/Athena/FRC_FPGA_ChipObject"] | |
includes = ["**/*.cpp"] | |
} | |
exportedHeaders { | |
srcDirs = ["include", "lib/Athena", "lib/Athena/FRC_FPGA_ChipObject"] | |
} | |
lib library: 'HALShared', linkage: 'static' | |
} | |
} | |
} | |
HALDesktop(NativeLibrarySpec) { | |
targetPlatform 'x86_64' | |
sources { | |
cpp { | |
source { | |
srcDirs = ["lib/Desktop"] | |
includes = ["**/*.cpp"] | |
} | |
exportedHeaders { | |
srcDirs = ["include", "lib/Desktop"] | |
} | |
lib library: 'HALShared', linkage: 'static' | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment