From 6fd0136d4418cf818ddcb873d4627a54779cd08f Mon Sep 17 00:00:00 2001 From: "-T.K.-" Date: Tue, 12 Nov 2024 05:38:17 -0800 Subject: [PATCH] fix: let CMake find the correct Python version when building for ROS2 Foxy (#38) * fix: finding correct python version --------- Co-authored-by: robotsfan --- src/rl_sar/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rl_sar/CMakeLists.txt b/src/rl_sar/CMakeLists.txt index 68b2eb9..951d4bd 100644 --- a/src/rl_sar/CMakeLists.txt +++ b/src/rl_sar/CMakeLists.txt @@ -29,7 +29,8 @@ find_package(rclpy REQUIRED) find_package(gazebo_msgs REQUIRED) find_package(std_srvs REQUIRED) -find_package(Python3 COMPONENTS Interpreter Development REQUIRED) +# Make sure to find Python 3.8 +find_package(Python3 3.8 EXACT COMPONENTS Interpreter Development REQUIRED) link_directories(/usr/local/lib) include_directories(${YAML_CPP_INCLUDE_DIR})