File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,11 @@ endif()
5353include (${SWIG_USE_FILE} )
5454set (CMAKE_SWIG_FLAGS "" )
5555
56- find_package (Python3 COMPONENTS Interpreter Development.SABIModule REQUIRED )
56+ if (USE_PYTHON_STABLE_ABI)
57+ find_package (Python3 COMPONENTS Interpreter Development.SABIModule REQUIRED )
58+ else ()
59+ find_package (Python3 COMPONENTS Interpreter Development REQUIRED )
60+ endif ()
5761
5862find_package (fastcdr REQUIRED )
5963find_package (fastdds 3 REQUIRED )
Original file line number Diff line number Diff line change @@ -59,15 +59,24 @@ endif()
5959
6060if (MSVC OR MSVC_IDE )
6161 target_compile_options (${PROJECT_NAME } PRIVATE /bigobj )
62- target_compile_definitions (${PROJECT_NAME }
63- PRIVATE
64- NOMINMAX
65- Py_LIMITED_API=0x03040000
66- )
62+
63+ if (USE_PYTHON_STABLE_ABI)
64+ target_compile_definitions (${PROJECT_NAME }
65+ PRIVATE
66+ NOMINMAX
67+ Py_LIMITED_API=0x03040000
68+ )
69+ endif ()
70+
71+ endif ()
72+
73+ if (USE_PYTHON_STABLE_ABI)
74+ target_link_libraries (${PROJECT_NAME } Python3::SABIModule )
75+ else ()
76+ target_link_libraries (${PROJECT_NAME } Python3::Module )
6777endif ()
6878
6979target_link_libraries (${PROJECT_NAME }
70- Python3::SABIModule
7180 fastcdr
7281 fastdds
7382 )
You can’t perform that action at this time.
0 commit comments