Skip to content

Commit 81c3e19

Browse files
authored
Merge pull request #48 from walkingsmarts/master
Add instructions for macports
2 parents ad5763b + f1cd8f9 commit 81c3e19

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ No need to worry about closing the connection.
7171

7272
### macOS
7373

74+
#### Using brew
75+
7476
Install MySQL
7577

7678
```shell
@@ -81,12 +83,29 @@ mysql.server start
8183

8284
Link MySQL during `swift build`
8385

84-
```swift
86+
```shell
8587
swift build -Xswiftc -I/usr/local/include/mysql -Xlinker -L/usr/local/lib
8688
```
8789

8890
`-I` tells the compiler where to find the MySQL header files, and `-L` tells the linker where to find the library. This is required to compile and run on macOS.
8991

92+
#### Using macports
93+
94+
Install MySQL
95+
96+
```shell
97+
sudo port install mysql57
98+
sudo port select mysql mysql57
99+
```
100+
101+
Link MySQL during `swift build`
102+
103+
```shell
104+
swift build -Xswiftc -I/opt/local/include/mysql57/mysql/mysql -Xlinker -L/opt/local/lib/mysql57/mysql
105+
```
106+
107+
`-I` tells the compiler where to find the MySQL header files, and `-L` tells the linker where to find the library. This is required to compile and run on macOS.
108+
90109
### Linux
91110
92111
Install MySQL

0 commit comments

Comments
 (0)