~ubuntu-branches/ubuntu/saucy/blender/saucy-proposed

« back to all changes in this revision

Viewing changes to build_files/cmake/cmake_qtcreator_project.py

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
 
1
#!/usr/bin/env python3
2
2
 
3
3
# ***** BEGIN GPL LICENSE BLOCK *****
4
4
#
81
81
    else:
82
82
        includes, defines = cmake_advanced_info()
83
83
 
 
84
        if (includes, defines) == (None, None):
 
85
            return
 
86
 
84
87
        # for some reason it doesnt give all internal includes
85
88
        includes = list(set(includes) | set(os.path.dirname(f)
86
89
                        for f in files_rel if is_c_header(f)))
105
108
 
106
109
        qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
107
110
        f = open(qtc_cfg, 'w')
108
 
        f.write("// ADD PREDEFINED MACROS HERE!\n")
 
111
        f.write("// ADD PREDEFINED MACROS TO %s_custom.config!\n" % FILE_NAME)
 
112
        qtc_custom_cfg = os.path.join(PROJECT_DIR, "%s_custom.config" % FILE_NAME)
 
113
        if os.path.exists(qtc_custom_cfg):
 
114
            fc = open(qtc_custom_cfg, 'r')
 
115
            f.write(fc.read())
 
116
            fc.close()
 
117
            f.write("\n")
109
118
        defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
110
119
        if sys.platform != "win32":
111
120
            defines_final += cmake_compiler_defines()