Skip to content

Commit

Permalink
fix: add -framework Security to extism-static.pc on macOS (#94)
Browse files Browse the repository at this point in the history
* fix: add Security framework for macos

* fix: use Libs instead of Libs.private
  • Loading branch information
zshipko authored Jun 11, 2024
1 parent afd4144 commit 3e6a227
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ func runLibInstall(cmd *cobra.Command, installArgs *libInstallArgs) error {
line = "prefix=" + installArgs.prefix + "\n"
}

// Inject `-framework Security` on macOS
if installArgs.os == "darwin" && strings.HasPrefix(line, "Libs:") {
line = strings.ReplaceAll(line, "Libs: ", "Libs: -framework Security ")
}

io.WriteString(out, line)
}
out.Close()
Expand Down

0 comments on commit 3e6a227

Please sign in to comment.