Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/cmake/project_info.py')
-rwxr-xr-xbuild_files/cmake/project_info.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/build_files/cmake/project_info.py b/build_files/cmake/project_info.py
index a80ae623eb9..b154d578144 100755
--- a/build_files/cmake/project_info.py
+++ b/build_files/cmake/project_info.py
@@ -112,7 +112,7 @@ def is_glsl(filename):
def is_c(filename):
ext = splitext(filename)[1]
- return (ext in (".c", ".cpp", ".cxx", ".m", ".mm", ".rc", ".cc", ".inl"))
+ return (ext in {".c", ".cpp", ".cxx", ".m", ".mm", ".rc", ".cc", ".inl", ".osl"})
def is_c_any(filename):
@@ -133,12 +133,20 @@ def cmake_advanced_info():
""" Extracr includes and defines from cmake.
"""
+ make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")
+ make_exe_basename = os.path.basename(make_exe)
+
def create_eclipse_project():
print("CMAKE_DIR %r" % CMAKE_DIR)
if sys.platform == "win32":
cmd = 'cmake "%s" -G"Eclipse CDT4 - MinGW Makefiles"' % CMAKE_DIR
else:
- cmd = 'cmake "%s" -G"Eclipse CDT4 - Unix Makefiles"' % CMAKE_DIR
+ if make_exe_basename.startswith("make"):
+ cmd = 'cmake "%s" -G"Eclipse CDT4 - Unix Makefiles"' % CMAKE_DIR
+ elif make_exe_basename.startswith("ninja"):
+ cmd = 'cmake "%s" -G"Eclipse CDT4 - Ninja"' % CMAKE_DIR
+ else:
+ raise Exception("Unknown make program %r" % make_exe)
os.system(cmd)