@@ -29,15 +29,29 @@ task cleanZipFile(type: Delete) {
2929model {
3030 components {
3131 bulletjme(NativeLibrarySpec ) {
32- targetPlatform ' Windows64'
33- targetPlatform ' Windows32'
34- targetPlatform ' Mac64'
35- targetPlatform ' Mac32'
36- targetPlatform ' Linux64'
37- targetPlatform ' Linux32'
38- targetPlatform ' LinuxArm'
39- targetPlatform ' LinuxArmHF'
40- targetPlatform ' LinuxArm64'
32+
33+
34+ String [] targets= [
35+ " Windows64" ,
36+ " Windows32" ,
37+ " Mac64" ,
38+ " Mac32" ,
39+ " Linux64" ,
40+ " Linux32" ,
41+ " LinuxArm" ,
42+ " LinuxArmHF" ,
43+ " LinuxArm64"
44+ ];
45+
46+ String [] filter= buildForPlatforms. split(" ," );
47+ for (String target :targets){
48+ for (String f :filter){
49+ if (f. equals(target)){
50+ targetPlatform(target);
51+ break ;
52+ }
53+ }
54+ }
4155
4256 sources {
4357 cpp {
@@ -66,25 +80,29 @@ model {
6680 }
6781 }
6882
83+
6984 toolChains {
85+ visualCpp(VisualCpp )
86+ gcc(Gcc )
87+ clang(Clang )
7088 gccArm(Gcc ) {
7189 // Fun Fact: Gradle uses gcc as linker frontend, so we don't specify ld directly here
7290 target(" LinuxArm" ){
7391 path " /usr/bin"
74- cCompiler. executable = " arm-linux-gnueabi-gcc-7 "
75- cppCompiler. executable = " arm-linux-gnueabi-g++-7 "
76- linker. executable = " arm-linux-gnueabi-gcc-7 "
92+ cCompiler. executable = " arm-linux-gnueabi-gcc-8 "
93+ cppCompiler. executable = " arm-linux-gnueabi-g++-8 "
94+ linker. executable = " arm-linux-gnueabi-gcc-8 "
7795 assembler. executable = " arm-linux-gnueabi-as"
7896 }
79-
97+
8098 target(" LinuxArmHF" ){
8199 path " /usr/bin"
82- cCompiler. executable = " arm-linux-gnueabihf-gcc-7 "
83- cppCompiler. executable = " arm-linux-gnueabihf-g++-7 "
84- linker. executable = " arm-linux-gnueabihf-gcc-7 "
100+ cCompiler. executable = " arm-linux-gnueabihf-gcc-8 "
101+ cppCompiler. executable = " arm-linux-gnueabihf-g++-8 "
102+ linker. executable = " arm-linux-gnueabihf-gcc-8 "
85103 assembler. executable = " arm-linux-gnueabihf-as"
86104 }
87-
105+
88106 target(" LinuxArm64" ){
89107 path " /usr/bin"
90108 cCompiler. executable = " aarch64-linux-gnu-gcc-8"
0 commit comments