3 # Copyright 2014 PDFium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
7 # This script is wrapper for PDFium that adds some support for how GYP
8 # is invoked by PDFium beyond what can be done in the gclient hooks.
14 script_dir = os.path.dirname(os.path.realpath(__file__))
15 pdfium_root = os.path.abspath(os.path.join(script_dir, os.pardir))
17 sys.path.insert(0, os.path.join(pdfium_root, 'build', 'gyp', 'pylib'))
24 print 'Error running GYP'
30 args.append(os.path.join(script_dir, 'all.gyp'))
33 args.append(os.path.join(pdfium_root, 'build', 'standalone.gypi'))
35 args.extend(['-D', 'gyp_output_dir=out'])
37 # Set the GYP DEPTH variable to the root of the PDFium project.
38 args.append('--depth=' + os.path.relpath(pdfium_root))
40 print 'Updating projects from gyp files...'
46 if __name__ == '__main__':