forked from PerfectlySoft/Perfect-MySQL
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
36 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,36 @@ | ||
// swift-tools-version:4.0 | ||
// Package.swift | ||
// Perfect-MySQL | ||
// | ||
// Created by Kyle Jessup on 3/22/16. | ||
// Copyright (C) 2016 PerfectlySoft, Inc. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This source file is part of the Perfect.org open source project | ||
// | ||
// Copyright (c) 2015 - 2016 PerfectlySoft Inc. and the Perfect project authors | ||
// Licensed under Apache License v2.0 | ||
// | ||
// See http://perfect.org/licensing.html for license information | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// swift-tools-version:5.2 | ||
|
||
import PackageDescription | ||
|
||
|
||
#if os(macOS) | ||
let clientPackage = "Perfect-mysqlclient" | ||
let mysqlclientPath = "Sources/mysqlclient-macos" | ||
#else | ||
let clientPackage = "Perfect-mysqlclient-Linux" | ||
let mysqlclientPath = "Sources/mysqlclient" | ||
#endif | ||
|
||
let package = Package( | ||
name: "PerfectMySQL", | ||
platforms: [ | ||
.macOS(.v10_15) | ||
], | ||
products: [ | ||
.library(name: "PerfectMySQL", targets: ["PerfectMySQL"]) | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/PerfectlySoft/Perfect-CRUD.git", from: "1.2.2"), | ||
.package(url: "https://github.com/PerfectlySoft/\(clientPackage).git", from: "2.0.0"), | ||
], | ||
.package(name: "PerfectCRUD", url: "https://github.com/123FLO321/Perfect-CRUD.git", .branch("swift5")) | ||
], | ||
targets: [ | ||
.target(name: "PerfectMySQL", dependencies: ["PerfectCRUD"]), | ||
.systemLibrary( | ||
name: "mysqlclient", | ||
path: mysqlclientPath, | ||
pkgConfig: "mysqlclient", | ||
providers: [ | ||
.brew(["mysql"]), | ||
.apt(["libmysqlclient-dev"]), | ||
] | ||
), | ||
.target(name: "PerfectMySQL", dependencies: ["PerfectCRUD", "mysqlclient"]), | ||
.testTarget(name: "PerfectMySQLTests", dependencies: ["PerfectMySQL"]) | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module mysqlclient { | ||
header "/usr/local/include/mysql/mysql.h" | ||
link "mysqlclient" | ||
export * | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module mysqlclient { | ||
header "/usr/include/mysql/mysql.h" | ||
link "mysqlclient" | ||
export * | ||
} |