diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-21 19:24:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-03-21 19:35:13 +0300 |
commit | 9ff3d8eafae92a7071d86028d3c71308ad28125b (patch) | |
tree | 5ecefdaaef8bbd096867c0bb3cb1aa67a1123ea3 /build_files | |
parent | 8e9c9fde427c228111cfe2da6dfac9e54abb2a3d (diff) |
Cleanup: minor edits to project generators
Diffstat (limited to 'build_files')
-rwxr-xr-x | build_files/cmake/cmake_netbeans_project.py | 25 | ||||
-rwxr-xr-x | build_files/cmake/cmake_qtcreator_project.py | 42 |
2 files changed, 35 insertions, 32 deletions
diff --git a/build_files/cmake/cmake_netbeans_project.py b/build_files/cmake/cmake_netbeans_project.py index 81b1a460f67..25d07373569 100755 --- a/build_files/cmake/cmake_netbeans_project.py +++ b/build_files/cmake/cmake_netbeans_project.py @@ -29,18 +29,19 @@ Example linux usage Windows not supported so far """ -from project_info import (SIMPLE_PROJECTFILE, - SOURCE_DIR, - CMAKE_DIR, - PROJECT_DIR, - source_list, - is_project_file, - is_c_header, - # is_py, - cmake_advanced_info, - cmake_compiler_defines, - project_name_get, - ) +from project_info import ( + SIMPLE_PROJECTFILE, + SOURCE_DIR, + CMAKE_DIR, + PROJECT_DIR, + source_list, + is_project_file, + is_c_header, + # is_py, + cmake_advanced_info, + cmake_compiler_defines, + project_name_get, + ) import os diff --git a/build_files/cmake/cmake_qtcreator_project.py b/build_files/cmake/cmake_qtcreator_project.py index 1676d634cf2..67302c89a68 100755 --- a/build_files/cmake/cmake_qtcreator_project.py +++ b/build_files/cmake/cmake_qtcreator_project.py @@ -22,26 +22,27 @@ # <pep8 compliant> -""" +r""" +Example Linux usage: + python ~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py ~/blender-git/cmake + Example Win32 usage: c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py c:\blender_dev\cmake_build - -example linux usage - python ~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py ~/blender-git/cmake """ -from project_info import (SIMPLE_PROJECTFILE, - SOURCE_DIR, - # CMAKE_DIR, - PROJECT_DIR, - source_list, - is_project_file, - is_c_header, - is_py, - cmake_advanced_info, - cmake_compiler_defines, - project_name_get, - ) +from project_info import ( + SIMPLE_PROJECTFILE, + SOURCE_DIR, + # CMAKE_DIR, + PROJECT_DIR, + source_list, + is_project_file, + is_c_header, + is_py, + cmake_advanced_info, + cmake_compiler_defines, + project_name_get, + ) import os import sys @@ -63,18 +64,19 @@ def create_qtc_project_main(): if SIMPLE_PROJECTFILE: # --- qtcreator specific, simple format PROJECT_NAME = "Blender" - with open(os.path.join(PROJECT_DIR, "%s.files" % PROJECT_NAME), 'w') as f: + FILE_NAME = PROJECT_NAME.lower() + with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f: f.write("\n".join(files_rel)) - with open(os.path.join(PROJECT_DIR, "%s.includes" % PROJECT_NAME), 'w') as f: + with open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w') as f: f.write("\n".join(sorted(list(set(os.path.dirname(f) for f in files_rel if is_c_header(f)))))) - qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % PROJECT_NAME) + qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME) with open(qtc_prj, 'w') as f: f.write("[General]\n") - qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % PROJECT_NAME) + qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME) if not os.path.exists(qtc_cfg): with open(qtc_cfg, 'w') as f: f.write("// ADD PREDEFINED MACROS HERE!\n") |