poco/Util/build.gradle
2017-10-31 09:07:53 +01:00

61 lines
1.1 KiB
Groovy

model {
components {
Util(NativeLibrarySpec) { m ->
sources {
rc {
source {
srcDir '..'
include 'DLLVersion.rc'
}
}
c {
source {
srcDir 'src'
include '**/*.c'
}
exportedHeaders {
srcDir 'include'
}
}
cpp {
source {
srcDir 'src'
include '**/*.cpp'
exclude '**/Win*.cpp'
}
exportedHeaders {
srcDir 'include'
}
lib project: ':Foundation', library: 'Foundation'
lib project: ':XML', library: 'XML'
lib project: ':JSON', library: 'JSON'
}
}
binaries.all {
if (targetPlatform.operatingSystem.windows) {
sources {
platformWindows(CppSourceSet) {
lib m.sources.cpp
source {
srcDir 'src'
include '**/Win*.cpp'
}
lib project: ':Foundation', library: 'Foundation'
lib project: ':XML', library: 'XML'
lib project: ':JSON', library: 'JSON'
}
}
}
}
}
}
binaries {
withType(SharedLibraryBinarySpec) {
if (toolChain in VisualCpp) {
cppCompiler.define "Util_EXPORTS"
}
}
}
}
task poco { dependsOn "assemble" }