fix: let CMake find the correct Python version when building for ROS2 Foxy (#38)

* fix: finding correct python version

---------

Co-authored-by: robotsfan <fanziqi614@gmail.com>
This commit is contained in:
-T.K.- 2024-11-12 05:38:17 -08:00 committed by GitHub
parent 64fc72d613
commit 6fd0136d44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

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