Advertisement
orgads

Untitled

Mar 22nd, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.39 KB | None | 0 0
  1. diff --git a/src/libs/3rdparty/botan/botan.qbs b/src/libs/3rdparty/botan/botan.qbs
  2. index 3386128..7fe9388 100644
  3. --- a/src/libs/3rdparty/botan/botan.qbs
  4. +++ b/src/libs/3rdparty/botan/botan.qbs
  5. @@ -8,28 +8,33 @@ DynamicLibrary {
  6.      Depends { name: "qt"; submodules: 'core' }
  7.  
  8.      cpp.includePaths: ["build", "src"]
  9. -    cpp.staticLibraries: {
  10. -        if (qbs.targetOS == 'windows') {
  11. -            return [
  12. -                "advapi32.lib",
  13. -                "user32.lib"
  14. -            ]
  15. -        }
  16. -    }
  17.      cpp.dynamicLibraries: {
  18.          if (qbs.targetOS == 'linux' || qbs.targetOS == 'freebsd') {
  19.              return ['rt']
  20.          }
  21. +        else if (qbs.targetOS == 'windows') {
  22. +            return [
  23. +                "advapi32",
  24. +                "user32"
  25. +            ]
  26. +        }
  27.      }
  28.  
  29.      cpp.defines: {
  30.          var result = []
  31. -        if (qbs.toolchain == 'msvc2005' || qbs.toolchain == 'msvc2005' || qbs.toolchain == 'msvc2008' || qbs.toolchain == 'msvc2010')
  32. +        if (qbs.toolchain == 'msvc2005' || qbs.toolchain == 'msvc2008' || qbs.toolchain == 'msvc2010')
  33.              result.push('BOTAN_DLL=__declspec(dllexport)')
  34.          return result
  35.      }
  36.  
  37. -    // TODO: add those flags to mingw's compiler: -fpermissive -finline-functions -Wno-long-long
  38. +    Properties {
  39. +        condition: qbs.toolchain === 'mingw'
  40. +        cpp.cxxFlags: [
  41. +            '-fpermissive',
  42. +            '-finline-functions',
  43. +            '-Wno-long-long'
  44. +        ]
  45. +    }
  46.  
  47.      files: [
  48.          "src/algo_factory/algo_cache.h",
  49. @@ -536,4 +541,12 @@ DynamicLibrary {
  50.              "src/timer/posix_rt/tm_posix.cpp"
  51.          ]
  52.      }
  53. +
  54. +    ProductModule {
  55. +        cpp.linkerFlags: {
  56. +            if (qbs.toolchain === 'mingw') {
  57. +                return ['--enable-auto-import']
  58. +            }
  59. +        }
  60. +    }
  61.  }
  62. diff --git a/src/libs/symbianutils/symbianutils.qbs b/src/libs/symbianutils/symbianutils.qbs
  63. index ad8b060..7d1b014 100644
  64. --- a/src/libs/symbianutils/symbianutils.qbs
  65. +++ b/src/libs/symbianutils/symbianutils.qbs
  66. @@ -12,6 +12,7 @@ DynamicLibrary {
  67.      ]
  68.      cpp.defines: [
  69.          "SYMBIANUTILS_BUILD_LIB",
  70. +        "JSON_BUILD_LIB",
  71.          "HAS_SERIALPORT"
  72.      ]
  73.      cpp.optimization: "fast"
  74. @@ -59,6 +60,7 @@ DynamicLibrary {
  75.              "../../shared/json",
  76.              "."
  77.          ]
  78. +        cpp.defines: "JSON_INCLUDE_PRI"
  79.      }
  80.  }
  81.  
  82. diff --git a/src/libs/utils/utils.qbs b/src/libs/utils/utils.qbs
  83. index c7fe39e..3f1b281 100644
  84. --- a/src/libs/utils/utils.qbs
  85. +++ b/src/libs/utils/utils.qbs
  86. @@ -14,7 +14,7 @@ DynamicLibrary {
  87.  
  88.      Properties {
  89.          condition: qbs.targetOS == "windows"
  90. -        cpp.dynamicLibraries: ["User32.lib"]
  91. +        cpp.dynamicLibraries: ["user32"]
  92.      }
  93.  
  94.      Depends { name: "cpp" }
  95. diff --git a/src/libs/zeroconf/zeroconf.qbs b/src/libs/zeroconf/zeroconf.qbs
  96. index f6415d0..8c4edee 100644
  97. --- a/src/libs/zeroconf/zeroconf.qbs
  98. +++ b/src/libs/zeroconf/zeroconf.qbs
  99. @@ -8,6 +8,7 @@ DynamicLibrary {
  100.      Depends { name: "Qt.network" }
  101.  
  102.      cpp.includePaths: "."
  103. +    cpp.defines: ["ZEROCONF_LIBRARY"]
  104.      Properties {
  105.          condition: qbs.targetOS == "windows"
  106.          cpp.dynamicLibraries:  "ws2_32"
  107. diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs
  108. index d0fbcd5..476f346 100644
  109. --- a/src/plugins/coreplugin/coreplugin.qbs
  110. +++ b/src/plugins/coreplugin/coreplugin.qbs
  111. @@ -24,12 +24,6 @@ QtcPlugin {
  112.           buildDirectory
  113.      ]
  114.  
  115. -    cpp.staticLibraries: {
  116. -        if (qbs.targetOS == 'windows') return [
  117. -            "ole32.lib"
  118. -        ]
  119. -    }
  120. -
  121.      files: [
  122.          "fancyactionbar.qrc",
  123.          "generalsettings.ui",
  124. @@ -225,6 +219,9 @@ QtcPlugin {
  125.          files: [
  126.              "progressmanager/progressmanager_win.cpp"
  127.          ]
  128. +        cpp.dynamicLibraries: [
  129. +            "ole32"
  130. +        ]
  131.      }
  132.  
  133.      Group {
  134. diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs
  135. index 6b38889..4cf39f7 100644
  136. --- a/src/plugins/debugger/debugger.qbs
  137. +++ b/src/plugins/debugger/debugger.qbs
  138. @@ -295,6 +295,15 @@ QtcPlugin {
  139.          ]
  140.      }
  141.  
  142. +    Properties {
  143. +        condition: qbs.targetOS == "windows"
  144. +        cpp.dynamicLibraries: [
  145. +            "advapi32",
  146. +            "ole32",
  147. +            "shell32"
  148. +        ]
  149. +    }
  150. +
  151.      ProductModule {
  152.          cpp.includePaths: ["."]
  153.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement