Hello, I’ve stumbled into a bit of a problem regarding a build I’ve inherited. We’ve recently moved to gradle so I’m still getting up to speed. My problem is I need to produce both a 32bit and 64bit version of our dll. This would be easy if it wasn’t for the fact that we have a dependency on another runtime dll.
Unfortunately the 32bit version of the dependency has been built with Visual Studio 2008 (and hence requires the msvc80 runtime) whilst the 64bit version is built with Visual studio 2012.
I can produce a build.gradle to build our dll for each of these targets but I am struggling to have a single build file that produces both 32bit and 64bit versions.
I’ve specified the plaforms as follows
platforms {
x64 {
architecture "x86_64"
}
x86 {
architecture "x86"
}
}
and the component as
model {
components {
MyComponent(NativeLibrarySpec) {
targetPlatform "x86"
targetPlatform "x64"
sources {
cpp {
source {
etc but the problem is each platform requires a different toolChain. I can define my toolChains as follows
toolChains {
visualCpp32(VisualCpp) {
windowsSdkDir winSdkDir32
installDir visualCppDir32
}
visualCpp64(VisualCpp) {
windowsSdkDir winSdkDir64
installDir visualCppDir64
}
}
but there is no way to select which toolChain to use for each target platform. The visualCpp toolChain does not allow
toolChains {
visualCpp32(VisualCpp) {
target("x86") {
windowsSdkDir winSdkDir32
installDir visualCppDir32
}
}
visualCpp64(VisualCpp) {
target("x64") {
windowsSdkDir winSdkDir64
installDir visualCppDir64
}
}
}
Is there an easy way to achieve this without resorting to 2 build files ?