From 9de43ed3012088e34f5e8dff883a9ed1ee3af24c Mon Sep 17 00:00:00 2001 From: Romain Thomas Date: Sun, 1 Oct 2023 09:14:08 +0200 Subject: [PATCH] Set build temp --- api/python/setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/python/setup.py b/api/python/setup.py index 13dbeb0e1d..07bb49c210 100644 --- a/api/python/setup.py +++ b/api/python/setup.py @@ -408,7 +408,7 @@ def build_extension(self, ext): build_temp = Path(self.build_temp) build_lib = Path(self.build_lib) - cmake_output = build_temp.parent.absolute() + cmake_output = build_temp.absolute() cmake_bin = which("cmake") if cmake_bin is None: @@ -429,7 +429,11 @@ def build_extension(self, ext): } # 1. Configure - configure_cmd = [cmake_bin, "-S", LIEF_DIR.as_posix()] + cmake_conf.gen_cmake_option(cmake_output) + configure_cmd = ( + cmake_bin, + "-S", LIEF_DIR.as_posix(), + "-B", cmake_output.as_posix(), + ) + cmake_conf.gen_cmake_option(cmake_output) report("CMake Config:", " ".join(configure_cmd)) subprocess.check_call(configure_cmd, **cmake_subprocess_args)