mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-17 03:03:23 +02:00
Use closure to add specific platform c++ code
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
model {
|
model {
|
||||||
components {
|
components {
|
||||||
DataODBC(NativeLibrarySpec) {
|
DataODBC(NativeLibrarySpec) { m ->
|
||||||
sources {
|
sources {
|
||||||
rc {
|
rc {
|
||||||
source {
|
source {
|
||||||
@@ -25,7 +25,28 @@ model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
binaries {
|
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) {
|
if (toolChain in VisualCpp) {
|
||||||
cppCompiler.define "THREADSAFE=1"
|
cppCompiler.define "THREADSAFE=1"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user