Skip to content

Commit

Permalink
Merge pull request #297 from jxsl13/fix/homebrew-linking
Browse files Browse the repository at this point in the history
fix 'leptonica/allheaders.h' file not found on macOS (brew)
  • Loading branch information
otiai10 authored Dec 4, 2023
2 parents ee227ad + 2a5fced commit 33edae1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions preprocessflags_darwin.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package gosseract

// #cgo CXXFLAGS: -std=c++0x
// #cgo CPPFLAGS: -I/opt/homebrew/include -I/usr/local/include
// #cgo CPPFLAGS: -Wno-unused-result
// #cgo LDFLAGS: -L/opt/homebrew/lib -L/usr/local/lib -lleptonica -ltesseract
import "C"
2 changes: 2 additions & 0 deletions preprocessflags_x.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !darwin

package gosseract

// #cgo CXXFLAGS: -std=c++0x
Expand Down

0 comments on commit 33edae1

Please sign in to comment.