added search for python3 while generate grpc code
@@ -2,13 +2,17 @@ include(CMakeParseArguments)
macro(generate_grpc)
find_program(PYTHON python)
-
+ if (NOT PYTHON)
+ find_program(PYTHON python3)
+ endif()
+ if (NOT PYTHON)
+ message(FATAL_ERROR "python and python3 not found!")
+ endif()
# we need (for code generation) the root where the package lib goes to
get_filename_component(DST_ROOT ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION} DIRECTORY)
# and also the multimaster_fkie absolute path
get_filename_component(MM_ROOT ${PROJECT_SOURCE_DIR} DIRECTORY)
set(GRPC_GENERATED_SRC_DIR "${DST_ROOT}/${PROJECT_NAME}/grpc")
- # set(GRPC_GENERATED_SRC_DIR "${PROJECT_SOURCE_DIR}/src/${PROJECT_NAME}")
cmake_parse_arguments(proto_arg "" "" "PROTO_FILES" ${ARGN})
message(STATUS "gRPC proto files: ${proto_arg_PROTO_FILES}")
set(GRPC_GENERATED_SOURCES "")
