From c9fc6f8dd14af8648e403b519989b2d860a1a177 Mon Sep 17 00:00:00 2001 From: TSC21 Date: Fri, 10 Jan 2020 17:55:18 +0000 Subject: [PATCH] if building with catkin, don't specifically look for Python 3 --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f6db19623..e18c11e213 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -264,8 +264,14 @@ if (CATKIN_DEVEL_PREFIX) endif() # python +# If using catkin, Python 2 is found since it points +# to the Python libs installed with the ROS distro include(px4_find_python_module) -find_package(PythonInterp 3 REQUIRED) +if (NOT CATKIN_DEVEL_PREFIX) + find_package(PythonInterp 3 REQUIRED) +else() + find_package(PythonInterp REQUIRED) +endif() option(PYTHON_COVERAGE "Python code coverage" OFF) if(PYTHON_COVERAGE)