diff --git a/CMakeLists.txt b/CMakeLists.txt index d0677128..1f39c45f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,10 @@ find_package(orocos_kdl REQUIRED) find_package(catkin REQUIRED geometry_msgs kdl_conversions tf) find_package(Eigen3 REQUIRED) +set(Python_ADDITIONAL_VERSIONS 3.6;3.7;3.8) ## https://stackoverflow.com/questions/29245558/how-to-link-with-python3-libs-with-cmake +find_package(PythonInterp 3 REQUIRED) ## tf_python3 :: use Python3 by default +find_package(PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") + catkin_python_setup() catkin_package( @@ -53,6 +57,6 @@ endif() # RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}) ## tf_pytyhon3 :: re-set PROJECT_NAME to tf -set(PROJECT_NAME tf) +set(PROJECT_NAME tf_conversions) ## tf_pytyhon3 :: re-set CATKIN_PACKAGE_PYTHON_DESTINATION with PROJECT_NAME as tf set(CATKIN_PACKAGE_PYTHON_DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages/${PROJECT_NAME})