Commit 46a6e9e9 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Joerg Bornemann

Qbs: Fixes for Windows compilation

Change-Id: Ia392b8dc566e1d4ffadd67c09a30ace7f64b9f3f
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@nokia.com>
parent 0d807d59
......@@ -8,28 +8,33 @@ DynamicLibrary {
Depends { name: "qt"; submodules: 'core' }
cpp.includePaths: ["build", "src"]
cpp.staticLibraries: {
if (qbs.targetOS == 'windows') {
return [
"advapi32.lib",
"user32.lib"
]
}
}
cpp.dynamicLibraries: {
if (qbs.targetOS == 'linux' || qbs.targetOS == 'freebsd') {
return ['rt']
}
else if (qbs.targetOS == 'windows') {
return [
"advapi32",
"user32"
]
}
}
cpp.defines: {
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)')
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: [
"src/algo_factory/algo_cache.h",
......@@ -536,4 +541,12 @@ DynamicLibrary {
"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: [
"SYMBIANUTILS_BUILD_LIB",
"JSON_BUILD_LIB",
"HAS_SERIALPORT"
]
cpp.optimization: "fast"
......@@ -59,6 +60,7 @@ DynamicLibrary {
"../../shared/json",
"."
]
cpp.defines: "JSON_INCLUDE_PRI"
}
}
......@@ -14,7 +14,7 @@ DynamicLibrary {
Properties {
condition: qbs.targetOS == "windows"
cpp.dynamicLibraries: ["User32.lib"]
cpp.dynamicLibraries: ["user32"]
}
Depends { name: "cpp" }
......
......@@ -8,13 +8,19 @@ DynamicLibrary {
Depends { name: "Qt.network" }
cpp.includePaths: "."
cpp.defines: ["ZEROCONF_LIBRARY"]
Properties {
condition: qbs.targetOS == "windows"
cpp.dynamicLibraries: "ws2_32"
}
Properties {
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: [
......
......@@ -24,9 +24,9 @@ QtcPlugin {
buildDirectory
]
cpp.staticLibraries: {
cpp.dynamicLibraries: {
if (qbs.targetOS == 'windows') return [
"ole32.lib"
"ole32"
]
}
......
......@@ -295,6 +295,15 @@ QtcPlugin {
]
}
Properties {
condition: qbs.targetOS == "windows"
cpp.dynamicLibraries: [
"advapi32",
"ole32",
"shell32"
]
}
ProductModule {
cpp.includePaths: ["."]
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment