diff --git a/CMakeLists.txt b/CMakeLists.txt index d01470a2..a28d2da1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.12) project(rcutils) @@ -16,6 +16,8 @@ include(CheckLibraryExists) find_package(ament_cmake_python REQUIRED) find_package(ament_cmake_ros REQUIRED) +find_package(Python3 REQUIRED COMPONENTS Interpreter) + ament_python_install_package(${PROJECT_NAME}) if(UNIX AND NOT APPLE) @@ -102,7 +104,7 @@ em.invoke( \ string(REPLACE ";" "$" python_code "${python_code}") add_custom_command(OUTPUT include/rcutils/logging_macros.h COMMAND ${CMAKE_COMMAND} -E make_directory "include/rcutils" - COMMAND ${PYTHON_EXECUTABLE} ARGS -c "${python_code}" + COMMAND Python3::Interpreter ARGS -c "${python_code}" DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/logging_macros.h.em.watch" "${CMAKE_CURRENT_BINARY_DIR}/logging.py.watch"