Package.swift 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. // swift-tools-version:5.3
  2. // The swift-tools-version declares the minimum version of Swift required to build this package.
  3. import PackageDescription
  4. let package = Package(
  5. name: "KeePass",
  6. platforms: [.iOS(.v13), .macOS(.v10_15)],
  7. products: [
  8. // The `Binary` manipulate bytes with ease.
  9. .library(
  10. name: "Binary",
  11. targets: ["Binary"]
  12. ),
  13. // `Crypto` defines cryptographic interfaces used by KeePass.
  14. .library(
  15. name: "Crypto",
  16. targets: ["Crypto"]
  17. ),
  18. // `KeePass` library defines interfaces to work with KeePass files.
  19. .library(
  20. name: "KeePass",
  21. targets: ["KeePass"]
  22. ),
  23. ],
  24. targets: [
  25. .target(
  26. name: "KeePass",
  27. dependencies: ["Binary",
  28. "KDB",
  29. "KDBX"]
  30. ),
  31. .testTarget(
  32. name: "KeePassTests",
  33. dependencies: ["KeePass"],
  34. resources: [.process("Fixtures")]
  35. ),
  36. .target(
  37. name: "KDB",
  38. dependencies: ["Binary",
  39. "Crypto"]
  40. ),
  41. .target(
  42. name: "KDBX",
  43. dependencies: ["Binary",
  44. "Crypto",
  45. "Gzip",
  46. "XML"]
  47. ),
  48. .target(
  49. name: "Binary",
  50. dependencies: []
  51. ),
  52. .testTarget(
  53. name: "BinaryTests",
  54. dependencies: ["Binary"]
  55. ),
  56. .target(
  57. name: "Crypto",
  58. dependencies: ["Binary",
  59. "Sodium",
  60. "Argon2",
  61. "Twofish"]
  62. ),
  63. .testTarget(
  64. name: "CryptoTests",
  65. dependencies: ["Crypto"]
  66. ),
  67. .target(
  68. name: "Gzip",
  69. dependencies: ["Binary"],
  70. exclude: ["LICENSE"]
  71. ),
  72. .target(
  73. name: "XML",
  74. dependencies: []
  75. ),
  76. // MARK: KeePass Cryptographic Libraries
  77. .target(
  78. name: "Sodium",
  79. dependencies: [],
  80. exclude: ["LICENSE"],
  81. cSettings: [
  82. .headerSearchPath("include/sodium"),
  83. .define("CONFIGURED"),
  84. ]
  85. ),
  86. .target(
  87. name: "Argon2",
  88. dependencies: [],
  89. exclude: ["LICENSE"]
  90. ),
  91. .target(
  92. name: "Twofish",
  93. dependencies: []
  94. ),
  95. ]
  96. )