Hi.
I am trying to build visual-studio project under gradle and i need to define preprocessor defifnitions for c compiler.
Where do i have to write PreprocessingTool ? What do i wrong? Thanks in advance.
here my build.gradle file:
apply plugin: 'cpp’
apply plugin: 'c’
apply plugin: 'native-component’
def VS_2015_INCLUDE_DIR = "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10150.0/ucrt"
def VS_2015_LIB_DIR = “C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10150.0/ucrt”
model {
toolChains {
visualCpp(VisualCpp) {
windowsSdkDir "C:/Program Files (x86)/Windows Kits/8.1"
installDir "C:/Program Files (x86)/Microsoft Visual Studio 14.0"
}
}
buildTypes {
debug
release
}
platforms {
x86 {
architecture "x86"
}
x64 {
architecture "x86_64"
}
}
flavors {
community
enterprise
}
PreprocessingTool(PreprocessingTool) {
define("-D SYS_WINNT -D _DEBUG -D BUILDING_ABLYR_DLL")
}
components {
SystemAl(NativeLibrarySpec) {
binaries.all {
if (flavor == flavors.enterprise) {
cppCompiler.define "ENTERPRISE"
}
cppCompiler.args "-I" + VS_2015_INCLUDE_DIR
linker.args "/LIBPATH:" + VS_2015_LIB_DIR
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = ‘2.10’
}