Skip to content

Commit

Permalink
Support building with Bazel (#530)
Browse files Browse the repository at this point in the history
This allows build rules to add this as their tool dependency.
  • Loading branch information
thii committed Aug 18, 2021
1 parent 0ea6400 commit 4405d29
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ src/ios-deploy/lldb.py.h
package-lock.json
/ios-deploy.xcodeproj/xcuserdata
/ios-deploy.xcodeproj/project.xcworkspace
/bazel-*
27 changes: 27 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
genrule(
name = "lldb_py_h",
srcs = [":src/scripts/lldb.py"],
outs = ["lldb.py.h"],
cmd = """awk '{ print "\\""$$0"\\\\n\\""}' $< > $@""",
)

objc_library(
name = "ios_deploy_lib",
srcs = [
"src/ios-deploy/MobileDevice.h",
"src/ios-deploy/device_db.h",
"src/ios-deploy/errors.h",
"src/ios-deploy/version.h",
":lldb_py_h",
],
non_arc_srcs = ["src/ios-deploy/ios-deploy.m"],
)

apple_binary(
name = "ios_deploy",
linkopts = ["-F/Library/Apple/System/Library/PrivateFrameworks"],
platform_type = "macos",
sdk_frameworks = ["MobileDevice"],
visibility = ["//visibility:public"],
deps = [":ios_deploy_lib"],
)
Empty file added WORKSPACE
Empty file.

0 comments on commit 4405d29

Please sign in to comment.