@@ -100,13 +100,13 @@ else()
100100 set (SWIG_MODULE_ifcopenshell_wrapper_EXTRA_FLAGS "-interface" "_ifcopenshell_wrapper" )
101101 swig_add_library (ifcopenshell_wrapper LANGUAGE python SOURCES IfcPython.i )
102102 set_target_properties (
103- ${SWIG_MODULE_ifcopenshell_wrapper_REAL_NAME} PROPERTIES
103+ ifcopenshell_wrapper PROPERTIES
104104 DEBUG_POSTFIX "${Python_DEBUG_POSTFIX} "
105105 )
106106endif ()
107107
108108swig_link_libraries (ifcopenshell_wrapper PRIVATE Python::Module )
109- SET_PROPERTY (TARGET ${SWIG_MODULE_ifcopenshell_wrapper_REAL_NAME} PROPERTY SWIG_DEPENDS ${IFCOPENSHELL_LIBRARIES} )
109+ SET_PROPERTY (TARGET ifcopenshell_wrapper PROPERTY SWIG_DEPENDS ${IFCOPENSHELL_LIBRARIES} )
110110if (WASM_BUILD)
111111 # SIDE_MODULE=1 - add to .so all symbols from linked archives (default used by pyodide).
112112 # Since currently libIfcGeom.a seems to be linked twice it results in duplicated symbols and compilation errors.
@@ -123,7 +123,7 @@ if (WASM_BUILD)
123123 )
124124 endif ()
125125 target_link_options (
126- ${SWIG_MODULE_ifcopenshell_wrapper_REAL_NAME}
126+ ifcopenshell_wrapper
127127 PRIVATE "SHELL:-s EXPORTED_FUNCTIONS=_PyInit__ifcopenshell_wrapper -s SIDE_MODULE=2"
128128 )
129129endif ()
@@ -134,7 +134,7 @@ else()
134134swig_link_libraries (ifcopenshell_wrapper PRIVATE ${IFCOPENSHELL_LIBRARIES} ${LIBSVGFILL} )
135135endif ()
136136if ((NOT WIN32 ) AND BUILD_SHARED_LIBS )
137- SET_INSTALL_RPATHS (${SWIG_MODULE_ifcopenshell_wrapper_REAL_NAME} "${IFCDIRS} ;${OCC_LIBRARY_DIR} " )
137+ SET_INSTALL_RPATHS (ifcopenshell_wrapper "${IFCDIRS} ;${OCC_LIBRARY_DIR} " )
138138endif ()
139139
140140# Try to find the Python interpreter to get the site-packages
@@ -158,7 +158,7 @@ IF(Python_Interpreter_FOUND OR PYTHON_MODULE_INSTALL_DIR)
158158 set (PYTHON_EXTENSION_SUFFIX ".${Python_SOABI} .so" )
159159 endif ()
160160 set_target_properties (
161- ${SWIG_MODULE_ifcopenshell_wrapper_REAL_NAME} PROPERTIES
161+ ifcopenshell_wrapper PROPERTIES
162162 SUFFIX ${PYTHON_EXTENSION_SUFFIX}
163163 )
164164 if (PYTHON_MODULE_INSTALL_DIR)
@@ -193,10 +193,10 @@ IF(Python_Interpreter_FOUND OR PYTHON_MODULE_INSTALL_DIR)
193193 ENDFOREACH ()
194194 INSTALL (FILES "${CMAKE_BINARY_DIR} /ifcwrap/ifcopenshell_wrapper.py"
195195 DESTINATION "${python_package_dir} /ifcopenshell" )
196- INSTALL (TARGETS ${SWIG_MODULE_ifcopenshell_wrapper_REAL_NAME}
196+ INSTALL (TARGETS ifcopenshell_wrapper
197197 DESTINATION "${python_package_dir} /ifcopenshell" )
198198 if (MSVC )
199- INSTALL (FILES $<TARGET_PDB_FILE :${SWIG_MODULE_ifcopenshell_wrapper_REAL_NAME} > DESTINATION bin OPTIONAL )
199+ INSTALL (FILES $<TARGET_PDB_FILE :ifcopenshell_wrapper > DESTINATION bin OPTIONAL )
200200 endif ()
201201 ENDIF ()
202202ELSE ()
0 commit comments