summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ros/ament_cmake_core/files/findpython.patch')
-rw-r--r--dev-ros/ament_cmake_core/files/findpython.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/dev-ros/ament_cmake_core/files/findpython.patch b/dev-ros/ament_cmake_core/files/findpython.patch
new file mode 100644
index 000000000000..790b0631b82c
--- /dev/null
+++ b/dev-ros/ament_cmake_core/files/findpython.patch
@@ -0,0 +1,15 @@
+Index: ament_cmake_core/cmake/core/python.cmake
+===================================================================
+--- ament_cmake_core.orig/cmake/core/python.cmake
++++ ament_cmake_core/cmake/core/python.cmake
+@@ -17,6 +17,10 @@
+ # Example:
+ # find_package(Python3 3.8 REQUIRED)
+ # find_package(ament_cmake REQUIRED)
++
++if (CMAKE_GENTOO_BUILD OR CMAKE_BUILD_TYPE STREQUAL Gentoo)
++ set(Python3_FIND_UNVERSIONED_NAMES FIRST)
++endif()
+ if(NOT TARGET Python3::Interpreter)
+ find_package(Python3 REQUIRED COMPONENTS Interpreter)
+ endif()