Skip to content

Commit

Permalink
fix: build for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
homuler committed Dec 13, 2020
1 parent 0481ff0 commit b24e3eb
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ obj/
*.csproj
*.sln

*.aar
*.dll
*.dylib
*.so
*.aar

bazel-*

Expand Down
32 changes: 32 additions & 0 deletions Assets/MediaPipe/SDK/Plugins/libmediapipe_c.dylib.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion C/mediapipe_api/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,29 @@ cc_library(
)

cc_binary(
name = "libmediapipe_c",
name = "libmediapipe_c.so",
deps = [":mediapipe_c"],
linkshared = True,
linkstatic = True,
visibility = ["//visibility:public"],
)

cc_binary(
name = "libmediapipe_c.dylib",
deps = [":mediapipe_c"],
linkshared = True,
linkstatic = True,
visibility = ["//visibility:public"],
)

alias(
name = "libmediapipe_c",
actual = select({
"@com_google_mediapipe//mediapipe:macos": ":libmediapipe_c.dylib",
"//conditions:default": ":libmediapipe_c.so",
}),
)

# It is recommended that you include only neccessary calculators.
cc_library(
name = "calculators",
Expand Down

0 comments on commit b24e3eb

Please sign in to comment.