-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (28 loc) · 964 Bytes
/
Makefile
File metadata and controls
33 lines (28 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
PROTO_SOURCE=./protocol/protobufs
proto: protoc protoc-swift
protoc --swift_out=Sources/LiveKit/protos -I=${PROTO_SOURCE} \
${PROTO_SOURCE}/livekit_models.proto \
${PROTO_SOURCE}/livekit_rtc.proto \
${PROTO_SOURCE}/livekit_metrics.proto
@# Use internal import for xcframework builds to keep SwiftProtobuf out of .swiftinterface
@for f in Sources/LiveKit/protos/*.pb.swift; do \
sed -i '' 's/^import SwiftProtobuf/#if LK_XCFRAMEWORK\ninternal import SwiftProtobuf\n#else\nimport SwiftProtobuf\n#endif/' "$$f"; \
done
docs: swift-docs
swift doc generate Sources/LiveKit \
--module-name "LiveKit Swift Client SDK" \
--output Documentation \
--format html \
--base-url /client-sdk-swift
protoc-swift:
ifeq (, $(shell which protoc-gen-swift))
brew install swift-protobuf
endif
protoc:
ifeq (, $(shell which protoc))
brew install protobuf
endif
swift-docs:
ifeq (, $(shell which swift-doc))
brew install swiftdocorg/formulae/swift-doc
endif