Fix toolchain. Add way to select wich platform you want to build.
This commit is contained in:
parent
88385ba647
commit
273f65b651
@ -14,7 +14,10 @@ buildJavaDoc = true
|
|||||||
buildNativeProjects = false
|
buildNativeProjects = false
|
||||||
buildAndroidExamples = false
|
buildAndroidExamples = false
|
||||||
|
|
||||||
# Path to Android NDK for building native libraries
|
buildForPlatforms = Linux64,Linux32,Windows64,Windows32,Mac64,Mac32
|
||||||
|
|
||||||
|
# Path to android NDK for building native libraries
|
||||||
|
#ndkPath=/Users/normenhansen/Documents/Code-Import/android-ndk-r7
|
||||||
ndkPath = /opt/android-ndk-r16b
|
ndkPath = /opt/android-ndk-r16b
|
||||||
|
|
||||||
# Path for downloading native Bullet
|
# Path for downloading native Bullet
|
||||||
|
@ -29,15 +29,29 @@ task cleanZipFile(type: Delete) {
|
|||||||
model {
|
model {
|
||||||
components {
|
components {
|
||||||
bulletjme(NativeLibrarySpec) {
|
bulletjme(NativeLibrarySpec) {
|
||||||
targetPlatform 'Windows64'
|
|
||||||
targetPlatform 'Windows32'
|
|
||||||
targetPlatform 'Mac64'
|
String[] targets=[
|
||||||
targetPlatform 'Mac32'
|
"Windows64",
|
||||||
targetPlatform 'Linux64'
|
"Windows32",
|
||||||
targetPlatform 'Linux32'
|
"Mac64",
|
||||||
targetPlatform 'LinuxArm'
|
"Mac32",
|
||||||
targetPlatform 'LinuxArmHF'
|
"Linux64",
|
||||||
targetPlatform 'LinuxArm64'
|
"Linux32",
|
||||||
|
"LinuxArm",
|
||||||
|
"LinuxArmHF",
|
||||||
|
"LinuxArm64"
|
||||||
|
];
|
||||||
|
|
||||||
|
String[] filter=buildForPlatforms.split(",");
|
||||||
|
for(String target:targets){
|
||||||
|
for(String f:filter){
|
||||||
|
if(f.equals(target)){
|
||||||
|
targetPlatform(target);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sources {
|
sources {
|
||||||
cpp {
|
cpp {
|
||||||
@ -66,22 +80,26 @@ model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
toolChains {
|
toolChains {
|
||||||
|
visualCpp(VisualCpp)
|
||||||
|
gcc(Gcc)
|
||||||
|
clang(Clang)
|
||||||
gccArm(Gcc) {
|
gccArm(Gcc) {
|
||||||
// Fun Fact: Gradle uses gcc as linker frontend, so we don't specify ld directly here
|
// Fun Fact: Gradle uses gcc as linker frontend, so we don't specify ld directly here
|
||||||
target("LinuxArm"){
|
target("LinuxArm"){
|
||||||
path "/usr/bin"
|
path "/usr/bin"
|
||||||
cCompiler.executable = "arm-linux-gnueabi-gcc-7"
|
cCompiler.executable = "arm-linux-gnueabi-gcc-8"
|
||||||
cppCompiler.executable = "arm-linux-gnueabi-g++-7"
|
cppCompiler.executable = "arm-linux-gnueabi-g++-8"
|
||||||
linker.executable = "arm-linux-gnueabi-gcc-7"
|
linker.executable = "arm-linux-gnueabi-gcc-8"
|
||||||
assembler.executable = "arm-linux-gnueabi-as"
|
assembler.executable = "arm-linux-gnueabi-as"
|
||||||
}
|
}
|
||||||
|
|
||||||
target("LinuxArmHF"){
|
target("LinuxArmHF"){
|
||||||
path "/usr/bin"
|
path "/usr/bin"
|
||||||
cCompiler.executable = "arm-linux-gnueabihf-gcc-7"
|
cCompiler.executable = "arm-linux-gnueabihf-gcc-8"
|
||||||
cppCompiler.executable = "arm-linux-gnueabihf-g++-7"
|
cppCompiler.executable = "arm-linux-gnueabihf-g++-8"
|
||||||
linker.executable = "arm-linux-gnueabihf-gcc-7"
|
linker.executable = "arm-linux-gnueabihf-gcc-8"
|
||||||
assembler.executable = "arm-linux-gnueabihf-as"
|
assembler.executable = "arm-linux-gnueabihf-as"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user