2017-10-31 09:07:53 +01:00
|
|
|
model {
|
|
|
|
components {
|
2018-05-02 22:25:50 +02:00
|
|
|
DataODBC(NativeLibrarySpec) { m ->
|
2017-10-31 09:07:53 +01:00
|
|
|
sources {
|
|
|
|
rc {
|
|
|
|
source {
|
|
|
|
srcDir '../..'
|
|
|
|
include 'DLLVersion.rc'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cpp {
|
|
|
|
source {
|
|
|
|
srcDir 'src'
|
|
|
|
include '**/*.cpp'
|
|
|
|
exclude 'Unicode_WIN32.cpp'
|
|
|
|
exclude 'Unicode_UNIXODBC.cpp'
|
|
|
|
}
|
|
|
|
exportedHeaders {
|
|
|
|
srcDir 'include'
|
|
|
|
}
|
|
|
|
lib project: ':Data', library: 'Data'
|
|
|
|
lib project: ':Foundation', library: 'Foundation'
|
|
|
|
}
|
|
|
|
}
|
2018-05-02 23:00:58 +02:00
|
|
|
/*
|
|
|
|
binaries.all {
|
|
|
|
sources {
|
|
|
|
if (targetPlatform.operatingSystem.windows) {
|
|
|
|
platformWindows(CppSourceSet) {
|
|
|
|
lib m.sources.cpp
|
|
|
|
source {
|
|
|
|
srcDir 'src'
|
|
|
|
include 'Unicode_WIN32.cpp'
|
|
|
|
}
|
|
|
|
lib project: ':Foundation', library: 'Foundation'
|
2018-05-02 22:25:50 +02:00
|
|
|
}
|
2018-05-02 23:00:58 +02:00
|
|
|
} else
|
|
|
|
if (targetPlatform.operatingSystem.macOsX || targetPlatform.operatingSystem.linux) {
|
|
|
|
platformNix(CppSourceSet) {
|
|
|
|
lib m.sources.cpp
|
|
|
|
source {
|
|
|
|
srcDir 'src'
|
|
|
|
include 'Unicode_UNIXODBC.cpp'
|
|
|
|
}
|
|
|
|
lib project: ':Foundation', library: 'Foundation'
|
2018-05-02 22:25:50 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-05-02 23:00:58 +02:00
|
|
|
*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
binaries {
|
|
|
|
all {
|
2018-05-02 22:25:50 +02:00
|
|
|
|
2017-10-31 09:07:53 +01:00
|
|
|
if (toolChain in VisualCpp) {
|
|
|
|
cppCompiler.define "THREADSAFE=1"
|
|
|
|
}
|
2018-09-24 21:46:23 +02:00
|
|
|
if (toolChain in Gcc || toolChain in Clang) {
|
2018-09-24 21:31:55 +02:00
|
|
|
cppCompiler.define "POCO_UNIXODBC"
|
2018-09-24 21:46:23 +02:00
|
|
|
linker.args "-lodbc"
|
2018-09-24 21:31:55 +02:00
|
|
|
}
|
2017-10-31 09:07:53 +01:00
|
|
|
}
|
|
|
|
withType(SharedLibraryBinarySpec) {
|
|
|
|
if (toolChain in VisualCpp) {
|
|
|
|
cppCompiler.define "ODBC_EXPORTS"
|
|
|
|
linker.args 'odbc32.lib'
|
|
|
|
linker.args 'odbccp32.lib'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
withType(StaticLibraryBinarySpec) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
task poco { dependsOn "assemble" }
|
|
|
|
|
|
|
|
|