pass cmake argments

This commit is contained in:
Naoto Kondo
2022-03-21 22:09:45 +09:00
parent 01a8cdd86c
commit 4a2c6f1244

View File

@@ -18,8 +18,13 @@ class CMakeBuild(build_ext):
os.chdir(build_dir) os.chdir(build_dir)
install_dir = os.path.join(build_dir, 'install') install_dir = os.path.join(build_dir, 'install')
if not self.dry_run: if not self.dry_run:
self.spawn( cmake_args = ['cmake', '..',
['cmake', '..', '-DCMAKE_INSTALL_PREFIX=%s' % install_dir]) '-DCMAKE_INSTALL_PREFIX=%s' % install_dir]
if "CMAKE_ARGS" in os.environ:
cmake_args += [
item for item in os.environ["CMAKE_ARGS"].split(" ") if item]
print(cmake_args)
self.spawn(cmake_args)
if self.debug: if self.debug:
self.spawn(['cmake', '--build', '.', '--config', self.spawn(['cmake', '--build', '.', '--config',
'Debug', '--target', 'install']) 'Debug', '--target', 'install'])