diff options
Diffstat (limited to 'build_files/cmake/cmake_qtcreator_project.py')
-rwxr-xr-x | build_files/cmake/cmake_qtcreator_project.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/build_files/cmake/cmake_qtcreator_project.py b/build_files/cmake/cmake_qtcreator_project.py index fc5c00ec2ec..a89bcd01523 100755 --- a/build_files/cmake/cmake_qtcreator_project.py +++ b/build_files/cmake/cmake_qtcreator_project.py @@ -40,6 +40,7 @@ from project_info import (SIMPLE_PROJECTFILE, is_py, cmake_advanced_info, cmake_compiler_defines, + project_name_get, ) import os @@ -59,7 +60,8 @@ def create_qtc_project_main(): f.write("\n".join(files_rel)) f = open(os.path.join(PROJECT_DIR, "%s.includes" % PROJECT_NAME), 'w') - f.write("\n".join(sorted(list(set(os.path.dirname(f) for f in files_rel if is_c_header(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) f = open(qtc_prj, 'w') @@ -73,10 +75,16 @@ def create_qtc_project_main(): includes, defines = cmake_advanced_info() # for some reason it doesnt give all internal includes - includes = list(set(includes) | set(os.path.dirname(f) for f in files_rel if is_c_header(f))) + includes = list(set(includes) | set(os.path.dirname(f) + for f in files_rel if is_c_header(f))) includes.sort() - PROJECT_NAME = "Blender" + if 0: + PROJECT_NAME = "Blender" + else: + # be tricky, get the project name from SVN if we can! + PROJECT_NAME = project_name_get(SOURCE_DIR) + FILE_NAME = PROJECT_NAME.lower() f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') f.write("\n".join(files_rel)) @@ -93,7 +101,7 @@ def create_qtc_project_main(): f.write("// ADD PREDEFINED MACROS HERE!\n") defines_final = [("#define %s %s" % item) for item in defines] if sys.platform != "win32": - defines_final += cmake_compiler_defines() # defines from the compiler + defines_final += cmake_compiler_defines() f.write("\n".join(defines_final)) print("Blender project file written to: %s" % qtc_prj) @@ -106,7 +114,12 @@ def create_qtc_project_python(): files_rel.sort() # --- qtcreator specific, simple format - PROJECT_NAME = "Blender_Python" + if 0: + PROJECT_NAME = "Blender_Python" + else: + # be tricky, get the project name from SVN if we can! + PROJECT_NAME = project_name_get(SOURCE_DIR) + "_Python" + FILE_NAME = PROJECT_NAME.lower() f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') f.write("\n".join(files_rel)) |