diff options
Diffstat (limited to 'build_files')
-rwxr-xr-x | build_files/cmake/cmake_netbeans_project.py | 2 | ||||
-rwxr-xr-x | build_files/cmake/cmake_qtcreator_project.py | 6 | ||||
-rwxr-xr-x | build_files/cmake/project_info.py | 25 |
3 files changed, 6 insertions, 27 deletions
diff --git a/build_files/cmake/cmake_netbeans_project.py b/build_files/cmake/cmake_netbeans_project.py index 17490e36bb3..17668f10c0c 100755 --- a/build_files/cmake/cmake_netbeans_project.py +++ b/build_files/cmake/cmake_netbeans_project.py @@ -68,7 +68,7 @@ def create_nb_project_main(): PROJECT_NAME = "Blender" else: # be tricky, get the project name from SVN if we can! - PROJECT_NAME = project_name_get(SOURCE_DIR) + PROJECT_NAME = project_name_get() # --------------- NB spesific defines = [("%s=%s" % cdef) if cdef[1] else cdef[0] for cdef in defines] diff --git a/build_files/cmake/cmake_qtcreator_project.py b/build_files/cmake/cmake_qtcreator_project.py index 4cf854aad77..76f1efa6ccb 100755 --- a/build_files/cmake/cmake_qtcreator_project.py +++ b/build_files/cmake/cmake_qtcreator_project.py @@ -92,8 +92,8 @@ def create_qtc_project_main(): if 0: PROJECT_NAME = "Blender" else: - # be tricky, get the project name from SVN if we can! - PROJECT_NAME = project_name_get(SOURCE_DIR) + # be tricky, get the project name from CMake if we can! + PROJECT_NAME = project_name_get() FILE_NAME = PROJECT_NAME.lower() f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') @@ -134,7 +134,7 @@ def create_qtc_project_python(): PROJECT_NAME = "Blender_Python" else: # be tricky, get the project name from SVN if we can! - PROJECT_NAME = project_name_get(SOURCE_DIR) + "_Python" + PROJECT_NAME = project_name_get() + "_Python" FILE_NAME = PROJECT_NAME.lower() f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') diff --git a/build_files/cmake/project_info.py b/build_files/cmake/project_info.py index 5d756a6320f..fcd4501f231 100755 --- a/build_files/cmake/project_info.py +++ b/build_files/cmake/project_info.py @@ -239,26 +239,5 @@ def cmake_compiler_defines(): return lines -def project_name_get(path, fallback="Blender", prefix="Blender_"): - if not os.path.isdir(os.path.join(path, ".svn")): - return fallback - - import subprocess - try: - info = subprocess.Popen(["svn", "info", path], - stdout=subprocess.PIPE).communicate()[0] - except: - # possibly 'svn' isnt found/installed - return fallback - - # string version, we only want the URL - info = info.decode(encoding="utf-8", errors="ignore") - - for l in info.split("\n"): - l = l.strip() - if l.startswith("URL"): - # https://svn.blender.org/svnroot/bf-blender/branches/bmesh/blender - # --> bmesh - if "/branches/" in l: - return prefix + l.rsplit("/branches/", 1)[-1].split("/", 1)[0] - return fallback +def project_name_get(): + return cmake_cache_var("CMAKE_PROJECT_NAME") |