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 | ||||
| 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 | ||||
| 
 | ||||
| # Path for downloading native Bullet | ||||
|  | ||||
| @ -29,15 +29,29 @@ task cleanZipFile(type: Delete) { | ||||
| model { | ||||
|     components { | ||||
|         bulletjme(NativeLibrarySpec) { | ||||
|             targetPlatform 'Windows64' | ||||
|             targetPlatform 'Windows32' | ||||
|             targetPlatform 'Mac64' | ||||
|             targetPlatform 'Mac32' | ||||
|             targetPlatform 'Linux64' | ||||
|             targetPlatform 'Linux32' | ||||
|             targetPlatform 'LinuxArm' | ||||
|             targetPlatform 'LinuxArmHF' | ||||
|             targetPlatform 'LinuxArm64' | ||||
| 
 | ||||
| 
 | ||||
|             String[] targets=[ | ||||
|                 "Windows64", | ||||
|                 "Windows32", | ||||
|                 "Mac64", | ||||
|                 "Mac32", | ||||
|                 "Linux64", | ||||
|                 "Linux32", | ||||
|                 "LinuxArm", | ||||
|                 "LinuxArmHF", | ||||
|                 "LinuxArm64"     | ||||
|             ]; | ||||
|            | ||||
|             String[] filter=buildForPlatforms.split(","); | ||||
|             for(String target:targets){ | ||||
|                 for(String f:filter){ | ||||
|                     if(f.equals(target)){ | ||||
|                         targetPlatform(target); | ||||
|                         break; | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
| 
 | ||||
|             sources { | ||||
|                 cpp { | ||||
| @ -66,22 +80,26 @@ model { | ||||
|         } | ||||
|     } | ||||
|      | ||||
|     | ||||
|     toolChains { | ||||
|         visualCpp(VisualCpp) | ||||
|         gcc(Gcc) | ||||
|         clang(Clang) | ||||
|         gccArm(Gcc) { | ||||
|             // Fun Fact: Gradle uses gcc as linker frontend, so we don't specify ld directly here | ||||
|             target("LinuxArm"){ | ||||
|                 path "/usr/bin" | ||||
|                 cCompiler.executable = "arm-linux-gnueabi-gcc-7" | ||||
|                 cppCompiler.executable = "arm-linux-gnueabi-g++-7" | ||||
|                 linker.executable = "arm-linux-gnueabi-gcc-7" | ||||
|                 cCompiler.executable = "arm-linux-gnueabi-gcc-8" | ||||
|                 cppCompiler.executable = "arm-linux-gnueabi-g++-8" | ||||
|                 linker.executable = "arm-linux-gnueabi-gcc-8" | ||||
|                 assembler.executable = "arm-linux-gnueabi-as" | ||||
|             } | ||||
| 
 | ||||
|             target("LinuxArmHF"){ | ||||
|                 path "/usr/bin" | ||||
|                 cCompiler.executable = "arm-linux-gnueabihf-gcc-7" | ||||
|                 cppCompiler.executable = "arm-linux-gnueabihf-g++-7" | ||||
|                 linker.executable = "arm-linux-gnueabihf-gcc-7" | ||||
|                 cCompiler.executable = "arm-linux-gnueabihf-gcc-8" | ||||
|                 cppCompiler.executable = "arm-linux-gnueabihf-g++-8" | ||||
|                 linker.executable = "arm-linux-gnueabihf-gcc-8" | ||||
|                 assembler.executable = "arm-linux-gnueabihf-as" | ||||
|             } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user