Skip to content

Fix static build on macOS #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ package openssl

// #cgo linux windows freebsd openbsd solaris pkg-config: libssl libcrypto
// #cgo linux freebsd openbsd solaris CFLAGS: -Wno-deprecated-declarations
// #cgo darwin CFLAGS: -I/usr/local/opt/[email protected]/include -I/usr/local/opt/openssl/include -Wno-deprecated-declarations
// #cgo darwin LDFLAGS: -L/usr/local/opt/[email protected]/lib -L/usr/local/opt/openssl/lib -lssl -lcrypto
// #cgo darwin,386 CFLAGS: -I/usr/local/opt/openssl/include -Wno-deprecated-declarations
// #cgo darwin,386 LDFLAGS: -L/usr/local/opt/openssl/lib -lssl -lcrypto
// #cgo darwin,amd64 CFLAGS: -I/usr/local/opt/openssl/include -Wno-deprecated-declarations
// #cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/openssl/lib -lssl -lcrypto
// #cgo darwin,arm64 CFLAGS: -I/opt/homebrew/opt/openssl/include -Wno-deprecated-declarations
// #cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/openssl/lib -lssl -lcrypto
// #cgo windows CFLAGS: -DWIN32_LEAN_AND_MEAN
import "C"
8 changes: 6 additions & 2 deletions build_static.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ package openssl

// #cgo linux windows freebsd openbsd solaris pkg-config: --static libssl libcrypto
// #cgo linux freebsd openbsd solaris CFLAGS: -Wno-deprecated-declarations
// #cgo darwin CFLAGS: -I/usr/local/opt/[email protected]/include -I/usr/local/opt/openssl/include -Wno-deprecated-declarations
// #cgo darwin LDFLAGS: -L/usr/local/opt/[email protected]/lib -L/usr/local/opt/openssl/lib -lssl -lcrypto
// #cgo darwin,386 CFLAGS: -I/usr/local/opt/openssl/include -Wno-deprecated-declarations
// #cgo darwin,386 LDFLAGS: /usr/local/opt/openssl/lib/libcrypto.a /usr/local/opt/openssl/lib/libssl.a
// #cgo darwin,amd64 CFLAGS: -I/usr/local/opt/openssl/include -Wno-deprecated-declarations
// #cgo darwin,amd64 LDFLAGS: /usr/local/opt/openssl/lib/libcrypto.a /usr/local/opt/openssl/lib/libssl.a
// #cgo darwin,arm64 CFLAGS: -I/opt/homebrew/opt/openssl/include -Wno-deprecated-declarations
// #cgo darwin,arm64 LDFLAGS: /opt/homebrew/opt/openssl/lib/libcrypto.a /opt/homebrew/opt/openssl/lib/libssl.a
// #cgo windows CFLAGS: -DWIN32_LEAN_AND_MEAN
import "C"