diff --git a/fastdds_python/test/types/CMakeLists.txt b/fastdds_python/test/types/CMakeLists.txt index 876c696a..c1815bc9 100644 --- a/fastdds_python/test/types/CMakeLists.txt +++ b/fastdds_python/test/types/CMakeLists.txt @@ -48,7 +48,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 "") @@ -148,7 +153,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 "") @@ -249,7 +259,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 "") diff --git a/fastdds_python_examples/HelloWorldExample/CMakeLists.txt b/fastdds_python_examples/HelloWorldExample/CMakeLists.txt index 84a53ee6..89735e43 100644 --- a/fastdds_python_examples/HelloWorldExample/CMakeLists.txt +++ b/fastdds_python_examples/HelloWorldExample/CMakeLists.txt @@ -48,7 +48,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 "")