diff --git a/microros_utils/library_builder.py b/microros_utils/library_builder.py index 3fed134..44a9efc 100644 --- a/microros_utils/library_builder.py +++ b/microros_utils/library_builder.py @@ -100,7 +100,7 @@ def download_dev_environment(self): def build_dev_environment(self): print("Building micro-ROS dev dependencies") - command = "cd {} && . {} && colcon build --cmake-args -DBUILD_TESTING=OFF".format(self.dev_folder, self.python_env) + command = "cd {} && . {} && colcon build --cmake-args -DBUILD_TESTING=OFF -DPython3_EXECUTABLE=`which python`".format(self.dev_folder, self.python_env) result = run_cmd(command, env=self.env) if 0 != result.returncode: @@ -174,7 +174,7 @@ def build_mcu_environment(self, meta_file, toolchain_file, user_meta = ""): print("Building micro-ROS library") common_meta_path = self.library_folder + '/metas/common.meta' - colcon_command = '. {} && colcon build --merge-install --packages-ignore-regex=.*_cpp --metas {} {} {} --cmake-args -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=OFF -DTHIRDPARTY=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE={}'.format(self.python_env, common_meta_path, meta_file, user_meta, toolchain_file) + colcon_command = '. {} && colcon build --merge-install --packages-ignore-regex=.*_cpp --metas {} {} {} --cmake-args -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=OFF -DTHIRDPARTY=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE={} -DPython3_EXECUTABLE=`which python`'.format(self.python_env, common_meta_path, meta_file, user_meta, toolchain_file) command = "cd {} && . {}/install/setup.sh && {}".format(self.mcu_folder, self.dev_folder, colcon_command) result = run_cmd(command, env=self.env)