~ubuntu-branches/ubuntu/saucy/clinica/saucy

« back to all changes in this revision

Viewing changes to waflib/Tools/winres.py

  • Committer: Package Import Robot
  • Author(s): Leonardo Robol
  • Date: 2013-07-15 11:27:05 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130715112705-3jskr3zv254a2qf2
Tags: 0.3.0-1
* New upstream version of Clinica.
* Remove explicit dependency on valac-0.16 (Closes: #709719)
* Correct FTBFS (Closes: #707361)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /usr/bin/env python
2
 
# encoding: utf-8
3
 
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
 
 
5
 
from waflib import Task
6
 
from waflib.TaskGen import extension
7
 
def rc_file(self,node):
8
 
        obj_ext='.rc.o'
9
 
        if self.env['WINRC_TGT_F']=='/fo':
10
 
                obj_ext='.res'
11
 
        rctask=self.create_task('winrc',node,node.change_ext(obj_ext))
12
 
        try:
13
 
                self.compiled_tasks.append(rctask)
14
 
        except AttributeError:
15
 
                self.compiled_tasks=[rctask]
16
 
class winrc(Task.Task):
17
 
        run_str='${WINRC} ${WINRCFLAGS} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${WINRC_TGT_F} ${TGT} ${WINRC_SRC_F} ${SRC}'
18
 
        color='BLUE'
19
 
def configure(conf):
20
 
        v=conf.env
21
 
        v['WINRC_TGT_F']='-o'
22
 
        v['WINRC_SRC_F']='-i'
23
 
        if not conf.env.WINRC:
24
 
                if v.CC_NAME=='msvc':
25
 
                        conf.find_program('RC',var='WINRC',path_list=v['PATH'])
26
 
                        v['WINRC_TGT_F']='/fo'
27
 
                        v['WINRC_SRC_F']=''
28
 
                else:
29
 
                        conf.find_program('windres',var='WINRC',path_list=v['PATH'])
30
 
        if not conf.env.WINRC:
31
 
                conf.fatal('winrc was not found!')
32
 
        v['WINRCFLAGS']=[]
33
 
 
34
 
extension('.rc')(rc_file)
 
 
b'\\ No newline at end of file'