| OLD | NEW |
| 1 #!/usr/bin/python2.4 | 1 #!/usr/bin/python2.4 |
| 2 # Copyright 2008, Google Inc. | 2 # Copyright 2008, Google Inc. |
| 3 # All rights reserved. | 3 # All rights reserved. |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
| 7 # met: | 7 # met: |
| 8 # | 8 # |
| 9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
| 10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 import sys | 34 import sys |
| 35 | 35 |
| 36 | 36 |
| 37 def generate(env): | 37 def generate(env): |
| 38 # NOTE: SCons requires the use of this name, which fails gpylint. | 38 # NOTE: SCons requires the use of this name, which fails gpylint. |
| 39 """SCons entry point for this tool.""" | 39 """SCons entry point for this tool.""" |
| 40 | 40 |
| 41 # TODO(rspangler): Should this really be a bit, or should we have a | 41 # TODO(rspangler): Should this really be a bit, or should we have a |
| 42 # COLLADA_DOM_VERSION variable | 42 # COLLADA_DOM_VERSION variable |
| 43 env['COLLADA_DOM_VERSION'] = '1.3.0' | 43 env['COLLADA_DOM_VERSION'] = '1.3.0' |
| 44 |
| 44 env.Append(CPPDEFINES=['COLLADA_DOM_130']) | 45 env.Append(CPPDEFINES=['COLLADA_DOM_130']) |
| 45 | 46 |
| 46 if sys.platform in ('win32', 'cygwin'): | 47 if sys.platform in ('win32', 'cygwin'): |
| 47 # Use /I for collada includes, so SCons won't scan for their | 48 # Use /I for collada includes, so SCons won't scan for their |
| 48 # dependencies (as it would if they were added to CPPPATH). | 49 # dependencies (as it would if they were added to CPPPATH). |
| 49 env.Append(CCFLAGS=[ | 50 env.Append(CCFLAGS=[ |
| 50 '/I$COLLADA_DIR/include', | 51 '/I$COLLADA_DIR/include', |
| 51 '/I$COLLADA_DIR/include/1.4', | 52 '/I$COLLADA_DIR/include/1.4', |
| 52 ]) | 53 ]) |
| 53 else: | 54 else: |
| 54 env.Append(CCFLAGS=[ | 55 env.Append(CCFLAGS=[ |
| 55 '-I$COLLADA_DIR/include', | 56 '-I$COLLADA_DIR/include', |
| 56 '-I$COLLADA_DIR/include/1.4', | 57 '-I$COLLADA_DIR/include/1.4', |
| 57 ]) | 58 ]) |
| 58 | 59 |
| 59 | 60 |
| 60 def exists(env): | 61 def exists(env): |
| 61 """Returns true if tool exists.""" | 62 """Returns true if tool exists.""" |
| 62 # NOTE: SCons requires the use of this name, which fails gpylint. | 63 # NOTE: SCons requires the use of this name, which fails gpylint. |
| 63 | 64 |
| 64 # If directory explicitly specified, we exist | 65 # If directory explicitly specified, we exist |
| 65 if env.get('COLLADA_DIR'): | 66 if env.get('COLLADA_DIR'): |
| 66 return 1 | 67 return 1 |
| 67 else: | 68 else: |
| 68 # TODO(rspangler): Don't know how to find it otherwise! | 69 # TODO(rspangler): Don't know how to find it otherwise! |
| 69 return 0 | 70 return 0 |
| OLD | NEW |