forked from qt-creator/qt-creator
Qbs: Fixes for Windows compilation
Change-Id: Ia392b8dc566e1d4ffadd67c09a30ace7f64b9f3f Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
committed by
Joerg Bornemann
parent
0d807d597d
commit
46a6e9e9e8
33
src/libs/3rdparty/botan/botan.qbs
vendored
33
src/libs/3rdparty/botan/botan.qbs
vendored
@@ -8,28 +8,33 @@ DynamicLibrary {
|
|||||||
Depends { name: "qt"; submodules: 'core' }
|
Depends { name: "qt"; submodules: 'core' }
|
||||||
|
|
||||||
cpp.includePaths: ["build", "src"]
|
cpp.includePaths: ["build", "src"]
|
||||||
cpp.staticLibraries: {
|
|
||||||
if (qbs.targetOS == 'windows') {
|
|
||||||
return [
|
|
||||||
"advapi32.lib",
|
|
||||||
"user32.lib"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cpp.dynamicLibraries: {
|
cpp.dynamicLibraries: {
|
||||||
if (qbs.targetOS == 'linux' || qbs.targetOS == 'freebsd') {
|
if (qbs.targetOS == 'linux' || qbs.targetOS == 'freebsd') {
|
||||||
return ['rt']
|
return ['rt']
|
||||||
}
|
}
|
||||||
|
else if (qbs.targetOS == 'windows') {
|
||||||
|
return [
|
||||||
|
"advapi32",
|
||||||
|
"user32"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cpp.defines: {
|
cpp.defines: {
|
||||||
var result = []
|
var result = []
|
||||||
if (qbs.toolchain == 'msvc2005' || qbs.toolchain == 'msvc2005' || qbs.toolchain == 'msvc2008' || qbs.toolchain == 'msvc2010')
|
if (qbs.toolchain == 'msvc2005' || qbs.toolchain == 'msvc2008' || qbs.toolchain == 'msvc2010')
|
||||||
result.push('BOTAN_DLL=__declspec(dllexport)')
|
result.push('BOTAN_DLL=__declspec(dllexport)')
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: add those flags to mingw's compiler: -fpermissive -finline-functions -Wno-long-long
|
Properties {
|
||||||
|
condition: qbs.toolchain === 'mingw'
|
||||||
|
cpp.cxxFlags: [
|
||||||
|
'-fpermissive',
|
||||||
|
'-finline-functions',
|
||||||
|
'-Wno-long-long'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
"src/algo_factory/algo_cache.h",
|
"src/algo_factory/algo_cache.h",
|
||||||
@@ -536,4 +541,12 @@ DynamicLibrary {
|
|||||||
"src/timer/posix_rt/tm_posix.cpp"
|
"src/timer/posix_rt/tm_posix.cpp"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ProductModule {
|
||||||
|
cpp.linkerFlags: {
|
||||||
|
if (qbs.toolchain === 'mingw') {
|
||||||
|
return ['--enable-auto-import']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -12,6 +12,7 @@ DynamicLibrary {
|
|||||||
]
|
]
|
||||||
cpp.defines: [
|
cpp.defines: [
|
||||||
"SYMBIANUTILS_BUILD_LIB",
|
"SYMBIANUTILS_BUILD_LIB",
|
||||||
|
"JSON_BUILD_LIB",
|
||||||
"HAS_SERIALPORT"
|
"HAS_SERIALPORT"
|
||||||
]
|
]
|
||||||
cpp.optimization: "fast"
|
cpp.optimization: "fast"
|
||||||
@@ -59,6 +60,7 @@ DynamicLibrary {
|
|||||||
"../../shared/json",
|
"../../shared/json",
|
||||||
"."
|
"."
|
||||||
]
|
]
|
||||||
|
cpp.defines: "JSON_INCLUDE_PRI"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ DynamicLibrary {
|
|||||||
|
|
||||||
Properties {
|
Properties {
|
||||||
condition: qbs.targetOS == "windows"
|
condition: qbs.targetOS == "windows"
|
||||||
cpp.dynamicLibraries: ["User32.lib"]
|
cpp.dynamicLibraries: ["user32"]
|
||||||
}
|
}
|
||||||
|
|
||||||
Depends { name: "cpp" }
|
Depends { name: "cpp" }
|
||||||
|
@@ -8,13 +8,19 @@ DynamicLibrary {
|
|||||||
Depends { name: "Qt.network" }
|
Depends { name: "Qt.network" }
|
||||||
|
|
||||||
cpp.includePaths: "."
|
cpp.includePaths: "."
|
||||||
|
cpp.defines: ["ZEROCONF_LIBRARY"]
|
||||||
Properties {
|
Properties {
|
||||||
condition: qbs.targetOS == "windows"
|
condition: qbs.targetOS == "windows"
|
||||||
cpp.dynamicLibraries: "ws2_32"
|
cpp.dynamicLibraries: "ws2_32"
|
||||||
}
|
}
|
||||||
Properties {
|
Properties {
|
||||||
condition: qbs.targetOS == "linux"
|
condition: qbs.targetOS == "linux"
|
||||||
cpp.defines: [ "_GNU_SOURCE HAVE_IPV6", "USES_NETLINK", "HAVE_LINUX", "TARGET_OS_LINUX" ]
|
cpp.defines: outer.concat([
|
||||||
|
"_GNU_SOURCE HAVE_IPV6",
|
||||||
|
"USES_NETLINK",
|
||||||
|
"HAVE_LINUX",
|
||||||
|
"TARGET_OS_LINUX"
|
||||||
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
|
@@ -24,9 +24,9 @@ QtcPlugin {
|
|||||||
buildDirectory
|
buildDirectory
|
||||||
]
|
]
|
||||||
|
|
||||||
cpp.staticLibraries: {
|
cpp.dynamicLibraries: {
|
||||||
if (qbs.targetOS == 'windows') return [
|
if (qbs.targetOS == 'windows') return [
|
||||||
"ole32.lib"
|
"ole32"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -295,6 +295,15 @@ QtcPlugin {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Properties {
|
||||||
|
condition: qbs.targetOS == "windows"
|
||||||
|
cpp.dynamicLibraries: [
|
||||||
|
"advapi32",
|
||||||
|
"ole32",
|
||||||
|
"shell32"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
ProductModule {
|
ProductModule {
|
||||||
cpp.includePaths: ["."]
|
cpp.includePaths: ["."]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user