ifcwrap cmake - override _d interface suffix in debug builds (d004410cc)

https://discourse.cmake.org/t/a-correct-way-to-add-d-debug-prefix-for-debug-python-extensions-on-windows/15132
This commit is contained in:
Andrej730
2025-09-02 17:16:54 +05:00
parent d419e50ece
commit aaf980b6b3
+6
View File
@@ -78,6 +78,12 @@ SET_PROPERTY(
utils/typemaps_in.i
utils/typemaps_out.i
)
# Debug build on Windows add required `_d` suffix to the resulting .pyd file.
# If we won't override -interface name,
# swig py wrapper will try to import `_ifcopenshell_wrapper_d` module and would fail.
set(SWIG_MODULE_ifcopenshell_wrapper_EXTRA_FLAGS "-interface" "_ifcopenshell_wrapper")
swig_add_library(ifcopenshell_wrapper LANGUAGE python SOURCES IfcPython.i)
SET_PROPERTY(TARGET ${SWIG_MODULE_ifcopenshell_wrapper_REAL_NAME} PROPERTY SWIG_DEPENDS ${IFCOPENSHELL_LIBRARIES})
if("$ENV{LDFLAGS}" MATCHES ".undefined.suppress")