mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-16 18:56:52 +02:00
Use closure to add specific platform c++ code
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
model {
|
||||
components {
|
||||
DataODBC(NativeLibrarySpec) {
|
||||
DataODBC(NativeLibrarySpec) { m ->
|
||||
sources {
|
||||
rc {
|
||||
source {
|
||||
@@ -25,7 +25,28 @@ model {
|
||||
}
|
||||
}
|
||||
binaries {
|
||||
all {
|
||||
all {
|
||||
sources {
|
||||
if (targetPlatform.operatingSystem.windows) {
|
||||
platformWindows(CppSourceSet) {
|
||||
lib m.sources.cpp
|
||||
source {
|
||||
srcDir 'src'
|
||||
include 'Unicode_WIN32.cpp'
|
||||
}
|
||||
}
|
||||
} else
|
||||
if (targetPlatform.operatingSystem.macOsX || targetPlatform.operatingSystem.linux) {
|
||||
platformNix(CppSourceSet) {
|
||||
lib m.sources.cpp
|
||||
source {
|
||||
srcDir 'src'
|
||||
include 'Unicode_UNIXODBC.cpp'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (toolChain in VisualCpp) {
|
||||
cppCompiler.define "THREADSAFE=1"
|
||||
}
|
||||
|
Reference in New Issue
Block a user