Skip to content

Commit 5f3776c

Browse files
committed
Refs #23483. Remove from generated code
Signed-off-by: Ricardo González <ricardo@richiware.dev>
1 parent e2e4fbe commit 5f3776c

2 files changed

Lines changed: 4 additions & 42 deletions

File tree

fastdds_python_examples/HelloWorldExample/generated_code/CMakeLists.txt

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,7 @@ endif()
7878
include(${SWIG_USE_FILE})
7979
set(CMAKE_SWIG_FLAGS "")
8080

81-
if(USE_PYTHON_STABLE_ABI)
82-
find_package(Python3 COMPONENTS Interpreter Development.SABIModule REQUIRED)
83-
else()
84-
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
85-
endif()
81+
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
8682

8783
set(PYTHON_INCLUDE_PATH ${Python3_INCLUDE_DIRS})
8884
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
@@ -114,23 +110,8 @@ if(UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 8)
114110
set_property(TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_COMPILE_DEFINITIONS SWIGWORDSIZE64)
115111
endif()
116112

117-
if(MSVC OR MSVC_IDE)
118-
if(USE_PYTHON_STABLE_ABI)
119-
target_compile_definitions(${${PROJECT_NAME}_MODULE}
120-
PRIVATE
121-
NOMINMAX
122-
Py_LIMITED_API=0x03040000
123-
)
124-
endif()
125-
endif()
126-
127-
if(USE_PYTHON_STABLE_ABI)
128-
target_link_libraries(${${PROJECT_NAME}_MODULE} Python3::SABIModule)
129-
else()
130-
target_link_libraries(${${PROJECT_NAME}_MODULE} Python3::Module)
131-
endif()
132-
133113
target_link_libraries(${${PROJECT_NAME}_MODULE}
114+
Python3::Module
134115
fastdds
135116
${PROJECT_NAME}
136117
)

fastdds_python_examples/RPCExample/generated_code/CMakeLists.txt

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,7 @@ endif()
7373
include(${SWIG_USE_FILE})
7474
set(CMAKE_SWIG_FLAGS "")
7575

76-
if(USE_PYTHON_STABLE_ABI)
77-
find_package(Python3 COMPONENTS Interpreter Development.SABIModule REQUIRED)
78-
else()
79-
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
80-
endif()
76+
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
8177

8278
set(PYTHON_INCLUDE_PATH ${Python3_INCLUDE_DIRS})
8379
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
@@ -109,23 +105,8 @@ if(UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 8)
109105
set_property(TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_COMPILE_DEFINITIONS SWIGWORDSIZE64)
110106
endif()
111107

112-
if(MSVC OR MSVC_IDE)
113-
if(USE_PYTHON_STABLE_ABI)
114-
target_compile_definitions(${${PROJECT_NAME}_MODULE}
115-
PRIVATE
116-
NOMINMAX
117-
Py_LIMITED_API=0x03040000
118-
)
119-
endif()
120-
endif()
121-
122-
if(USE_PYTHON_STABLE_ABI)
123-
target_link_libraries(${${PROJECT_NAME}_MODULE} Python3::SABIModule)
124-
else()
125-
target_link_libraries(${${PROJECT_NAME}_MODULE} Python3::Module)
126-
endif()
127-
128108
target_link_libraries(${${PROJECT_NAME}_MODULE}
109+
Python3::Module
129110
fastdds
130111
${PROJECT_NAME}
131112
)

0 commit comments

Comments
 (0)