Configures a new resource compilation command specific to a condition, usually a toolset selection condition. The possible options are: * (rc|windres) - Indicates the type of options the command accepts. Even though the ar
(command = None, condition = None, options = None)
| 41 | pass |
| 42 | |
| 43 | def configure (command = None, condition = None, options = None): |
| 44 | """ |
| 45 | Configures a new resource compilation command specific to a condition, |
| 46 | usually a toolset selection condition. The possible options are: |
| 47 | |
| 48 | * <rc-type>(rc|windres) - Indicates the type of options the command |
| 49 | accepts. |
| 50 | |
| 51 | Even though the arguments are all optional, only when a command, condition, |
| 52 | and at minimum the rc-type option are given will the command be configured. |
| 53 | This is so that callers don't have to check auto-configuration values |
| 54 | before calling this. And still get the functionality of build failures when |
| 55 | the resource compiler can't be found. |
| 56 | """ |
| 57 | rc_type = feature.get_values('<rc-type>', options) |
| 58 | if rc_type: |
| 59 | assert(len(rc_type) == 1) |
| 60 | rc_type = rc_type[0] |
| 61 | |
| 62 | if command and condition and rc_type: |
| 63 | flags('rc.compile.resource', '.RC', condition, command) |
| 64 | flags('rc.compile.resource', '.RC_TYPE', condition, rc_type.lower()) |
| 65 | flags('rc.compile.resource', 'DEFINES', [], ['<define>']) |
| 66 | flags('rc.compile.resource', 'INCLUDES', [], ['<include>']) |
| 67 | if debug(): |
| 68 | print 'notice: using rc compiler ::', condition, '::', command |
| 69 | |
| 70 | engine = get_manager().engine() |
| 71 |