Терминальный проект КиберПлат [open source]
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.1KB

  1. import qbs
  2. import qbs.TextFile
  3. import qbs.Environment
  4. Project {
  5. qbsSearchPaths: "../scripts/build/qbs"
  6. references: [
  7. "modules/modules.qbs",
  8. "apps/apps.qbs",
  9. "tools/tools.qbs",
  10. "plugins/plugins.qbs",
  11. "interface/interface.qbs",
  12. "../tests/tests.qbs"
  13. ]
  14. Product {
  15. name: "Core"
  16. qbsSearchPaths: "../scripts/build/qbs"
  17. type: [ "VersionUpdaterType" ]
  18. Depends { name: "cpp" }
  19. Depends { name: "VersionUpdater" }
  20. cpp.includePaths: [ "includes" ]
  21. files: [
  22. "includes/Common/Version.h.in",
  23. "includes/Common/Version.rc.in"
  24. ]
  25. property string TC_VERSION: Environment.getEnv("TC_VERSION")
  26. property string BUILD_NUMBER: Environment.getEnv("BUILD_NUMBER")
  27. property bool CYBERPLAT_BUILD: Boolean(Environment.getEnv("CYBERPLAT_BUILD"))
  28. property bool TC_DEBUG_BUILD: Boolean(Environment.getEnv("TC_DEBUG_BUILD"))
  29. property int TC_USE_TOKEN: Number(Environment.getEnv("TC_USE_TOKEN"))
  30. property int TC_USE_MD5: Number(Environment.getEnv("TC_USE_MD5"))
  31. property string TC_BRANCH: Environment.getEnv("TC_BRANCH")
  32. Export {
  33. Depends { name: "cpp" }
  34. Depends { name: "Thirdparty" }
  35. // cpp.warningLevel: "all"
  36. cpp.cLanguageVersion: "c11"
  37. cpp.cxxLanguageVersion: "c++14"
  38. cpp.includePaths: [
  39. product.buildDirectory + "/includes",
  40. product.sourceDirectory + "/includes"
  41. ]
  42. cpp.defines: {
  43. var defList = ["_UNICODE", "UNICODE", "_ATL_XP_TARGETING", "PSAPI_VERSION=1"];
  44. if (product.TC_USE_TOKEN > 0) defList.push("TC_USE_TOKEN");
  45. if (product.TC_USE_MD5 > 0) defList.push("TC_USE_MD5");
  46. if (product.CYBERPLAT_BUILD) defList.push("CYBERPLAT_BUILD");
  47. return defList;
  48. }
  49. Properties {
  50. condition: qbs.toolchain.contains('msvc')
  51. cpp.cppFlags: ["/Zc:wchar_t"]
  52. cpp.linkerFlags: ["/MAP"]
  53. }
  54. Properties {
  55. condition: qbs.buildVariant == "debug"
  56. cpp.debugInformation: true
  57. cpp.separateDebugInformation: false
  58. cpp.optimization: "none"
  59. }
  60. Properties {
  61. condition: product.TC_DEBUG_BUILD || (product.TC_BRANCH == "release")
  62. cpp.debugInformation: true
  63. cpp.separateDebugInformation: true
  64. }
  65. }
  66. }
  67. }