Source release v3.0.0-0-g8d3792b-ce + third_party
Change-Id: I399e71ddfffcd436171d1c60283c63ab4658e0b1
This commit is contained in:
15
build.py
15
build.py
@@ -3,14 +3,17 @@
|
||||
"""Generates build files and builds the CDM source release."""
|
||||
|
||||
import argparse
|
||||
import imp
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import gyp
|
||||
|
||||
cdm_top = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
# If gyp has been installed locally in third_party, this will find it.
|
||||
# Irrelevant if gyp has been installed globally.
|
||||
sys.path.insert(1, os.path.join(cdm_top, 'third_party'))
|
||||
import gyp
|
||||
|
||||
def IsNinjaInstalled():
|
||||
"""Determine if ninja is installed."""
|
||||
@@ -74,16 +77,14 @@ def ImportPlatform(name, gyp_args):
|
||||
|
||||
platforms_path = os.path.join(cdm_top, 'platforms')
|
||||
target_path = os.path.join(platforms_path, name)
|
||||
platform_gypi_path = os.path.join(target_path, name + '.gypi')
|
||||
global_gypi_path = os.path.join(platforms_path, 'global_config.gypi')
|
||||
platform_gypi_path = os.path.join(target_path, 'settings.gypi')
|
||||
output_path = os.path.join(cdm_top, 'out', name)
|
||||
|
||||
gyp_args.append('--include=%s' % platform_gypi_path)
|
||||
gyp_args.append('--include=%s' % global_gypi_path)
|
||||
gyp_args.append('-Goutput_dir=%s' % output_path)
|
||||
|
||||
sys.path.insert(0, target_path)
|
||||
target = __import__(name)
|
||||
platform_environment_path = os.path.join(target_path, 'environment.py')
|
||||
target = imp.load_source('environment', platform_environment_path)
|
||||
|
||||
if hasattr(target, 'export_variables'):
|
||||
for k, v in target.export_variables.iteritems():
|
||||
|
||||
Reference in New Issue
Block a user