another change needed for qtcreator project generator to work with ninja.

This commit is contained in:
Campbell Barton
2012-10-15 14:26:14 +00:00
parent c2ba1324fb
commit e3ea7187ce

View File

@@ -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:
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)