diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-05-11 10:21:38 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-05-11 10:21:38 +0400 |
commit | ccbac7862fad74bff7d507ea5cd96430202a589e (patch) | |
tree | 3f16a3813ed13e6f52873750f53824d7ca6521a3 /build_files/cmake/project_info.py | |
parent | da644a9b5845bf367241eb6730fbf639c8abea4d (diff) |
CMake: use project name when generating project files
Diffstat (limited to 'build_files/cmake/project_info.py')
-rwxr-xr-x | build_files/cmake/project_info.py | 25 |
1 files changed, 2 insertions, 23 deletions
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") |