Package.swift 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. // `Crypto` defines cryptographic interfaces used by KeePass.
  13. .library(
  14. name: "Crypto",
  15. targets: ["Crypto"]),
  16. // `KeePass` library defines interfaces to work with KeePass files.
  17. .library(
  18. name: "KeePass",
  19. targets: ["KeePass"]),
  20. ],
  21. targets: [
  22. .target(
  23. name: "KeePass",
  24. dependencies: [ "Binary",
  25. "KDB",
  26. "KDBX"]),
  27. .testTarget(
  28. name: "KeePassTests",
  29. dependencies: ["KeePass"],
  30. resources: [ .process("Fixtures") ]),
  31. .target(
  32. name: "KDB",
  33. dependencies: [ "Binary",
  34. "Crypto"]),
  35. .target(
  36. name: "KDBX",
  37. dependencies: [ "Binary",
  38. "Crypto",
  39. "Gzip",
  40. "XML"]),
  41. .target(
  42. name: "Binary",
  43. dependencies: []),
  44. .testTarget(
  45. name: "BinaryTests",
  46. dependencies: ["Binary"]),
  47. .target(
  48. name: "Crypto",
  49. dependencies: [ "Binary",
  50. "Sodium",
  51. "Argon2",
  52. "Twofish"]),
  53. .testTarget(
  54. name: "CryptoTests",
  55. dependencies: ["Crypto"]),
  56. .target(
  57. name: "Gzip",
  58. dependencies: ["Binary"],
  59. exclude: ["LICENSE"]),
  60. .target(
  61. name: "XML",
  62. dependencies: []),
  63. // MARK: KeePass Cryptographic Libraries
  64. .target(
  65. name: "Sodium",
  66. dependencies: [],
  67. exclude: ["LICENSE"],
  68. cSettings: [
  69. .headerSearchPath("include/sodium"),
  70. .define("CONFIGURED")
  71. ]),
  72. .target(
  73. name: "Argon2",
  74. dependencies: [],
  75. exclude: ["LICENSE"]),
  76. .target(
  77. name: "Twofish",
  78. dependencies: []),
  79. ]
  80. )