Skip to content

Commit

Permalink
Support compilation againt Ubuntu 24.04 swig4.1 (#153)
Browse files Browse the repository at this point in the history
* Refs #21268. Compilation againt swig4.1

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #21268. Regenerate code

Signed-off-by: Ricardo González Moreno <[email protected]>

---------

Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware authored Jul 4, 2024
1 parent 93c94a1 commit 577f1ee
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
8 changes: 7 additions & 1 deletion fastdds_python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ endif()
# Dependencies
###############################################################################

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 "")

Expand Down
21 changes: 18 additions & 3 deletions fastdds_python/test/types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "")

Expand Down Expand Up @@ -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 "")

Expand Down Expand Up @@ -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 "")

Expand Down
7 changes: 6 additions & 1 deletion fastdds_python_examples/HelloWorldExample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "")

Expand Down

0 comments on commit 577f1ee

Please sign in to comment.