Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit a138e1d

Browse files
committed
Import WebRTC headers from WebRTC framework.
WebRTC headers are imported from libwebrtc source code during SDK development. They need to be replaced with WebRTC framework paths, so apps can find these headers correctly.
1 parent 7bdbb39 commit a138e1d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

scripts/build.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020
import re
2121
import distutils.dir_util
2222

23+
HOME_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
24+
2325
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(__file__)),'build','config','mac'))
26+
sys.path.append(os.path.join(HOME_PATH, 'third_party', 'webrtc','tools_webrtc','apple'))
2427
import sdk_info
28+
import copy_framework_header
29+
2530

26-
HOME_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
2731
OUT_PATH = os.path.join(HOME_PATH, 'out')
2832
# The lib contains all target architectures and external libs(OpenSSL).
2933
OUT_LIB_NAME = 'libowt.a'
@@ -79,7 +83,11 @@ def ninjabuild(arch, scheme, targets):
7983
def copyheaders(headers_target_folder):
8084
if os.path.exists(headers_target_folder):
8185
shutil.rmtree(headers_target_folder)
82-
shutil.copytree(HEADER_PATH, headers_target_folder)
86+
os.mkdir(headers_target_folder)
87+
for _, _, file_names in os.walk(HEADER_PATH):
88+
for file_name in file_names:
89+
copy_framework_header.process(os.path.join(
90+
HEADER_PATH, file_name), os.path.join(headers_target_folder, file_name))
8391

8492
def getexternalliblist(ssl_root):
8593
libs = []

0 commit comments

Comments
 (0)