From c8fcac1254a6e4a5cc1ff7a49859300713210c9b Mon Sep 17 00:00:00 2001 From: Normen Hansen Date: Tue, 13 Jan 2015 20:13:19 +0100 Subject: [PATCH] - fix build script for native bullet on windows using VisualStudio --- jme3-bullet-native/build.gradle | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/jme3-bullet-native/build.gradle b/jme3-bullet-native/build.gradle index f0128b6c5..d7562b366 100644 --- a/jme3-bullet-native/build.gradle +++ b/jme3-bullet-native/build.gradle @@ -16,7 +16,12 @@ libraries { } all { binaries.all { - cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include" + if (toolChain in VisualCpp) { + cppCompiler.args "/I${org.gradle.internal.jvm.Jvm.current().javaHome}\\include" + } else{ + cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include" + } + if (targetPlatform.operatingSystem.name == "osx") { cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/darwin" } else if (targetPlatform.operatingSystem.name == "linux") { @@ -28,8 +33,13 @@ libraries { // linker.args "-static-libgcc" // linker.args "-static-libstdc++" } else if (targetPlatform.operatingSystem.name == "windows") { - cppCompiler.args "-I${org.gradle.internal.jvm.Jvm.current().javaHome}/include/win32" -// cppCompiler.define('WIN32') + if (toolChain in Gcc) { + cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/win32" + } + else if (toolChain in VisualCpp) { + cppCompiler.args "/I${org.gradle.internal.jvm.Jvm.current().javaHome}\\include\\win32" + } + cppCompiler.define('WIN32') // linker.args 'Shlwapi.lib', 'Advapi32.lib' } }