From 4e177d2227e8cb1e3ada2bd88dc74a2d43b52252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez=20Moreno?= Date: Mon, 1 Jul 2024 08:43:45 +0200 Subject: [PATCH] Refs #21268. Add trick to Ubuntu noble MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ricardo González Moreno --- .../java/com/eprosima/fastdds/idl/templates/SwigCMake.stg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/eprosima/fastdds/idl/templates/SwigCMake.stg b/src/main/java/com/eprosima/fastdds/idl/templates/SwigCMake.stg index 644720de..ffa880c8 100644 --- a/src/main/java/com/eprosima/fastdds/idl/templates/SwigCMake.stg +++ b/src/main/java/com/eprosima/fastdds/idl/templates/SwigCMake.stg @@ -71,7 +71,12 @@ target_link_libraries(\${PROJECT_NAME} ############################################################################### # Python bindings for type -find_package(SWIG REQUIRED) +find_package(SWIG) +if (NOT SWIG_FOUND) + # Trick to find swig4.1 in Ubuntu noble. + find_program(SWIG_EXECUTABLE NAMES swig4.1 swig) + find_package(SWIG REQUIRED) +endif() include(\${SWIG_USE_FILE}) set(CMAKE_SWIG_FLAGS "")