[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51178] trunk/blender/build_files/cmake/ cmake_qtcreator_project.py: Allow user config files in qtcreator project.
Lukas Toenne
lukas.toenne at googlemail.com
Mon Oct 8 13:02:12 CEST 2012
Revision: 51178
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51178
Author: lukastoenne
Date: 2012-10-08 11:02:11 +0000 (Mon, 08 Oct 2012)
Log Message:
-----------
Allow user config files in qtcreator project.
The blender.config file used for local #defines in qtcreator projects is rewritten on every project update. To avoid losing user settings these can now be written to an optional blender_custom.config file, which is then merged into the main blender.config on updates.
Modified Paths:
--------------
trunk/blender/build_files/cmake/cmake_qtcreator_project.py
Modified: trunk/blender/build_files/cmake/cmake_qtcreator_project.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_qtcreator_project.py 2012-10-08 10:50:18 UTC (rev 51177)
+++ trunk/blender/build_files/cmake/cmake_qtcreator_project.py 2012-10-08 11:02:11 UTC (rev 51178)
@@ -105,7 +105,14 @@
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
f = open(qtc_cfg, 'w')
- f.write("// ADD PREDEFINED MACROS HERE!\n")
+ f.write("// ADD PREDEFINED MACROS TO %s_custom.config!\n" % FILE_NAME)
+ qtc_custom_cfg = os.path.join(PROJECT_DIR, "%s_custom.config" % FILE_NAME)
+ if os.path.exists(qtc_custom_cfg):
+ f.write(fc.read())
+ fc = open(qtc_custom_cfg, 'r')
+ f.write(fc.read())
+ fc.close()
+ f.write("\n")
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
if sys.platform != "win32":
defines_final += cmake_compiler_defines()
More information about the Bf-blender-cvs
mailing list