From e8a382b02afa181c34e346f2fce7f05d9df2ee6b Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 9 Oct 2025 13:24:31 +0200 Subject: [PATCH] Only use cyclic dependencies when amongst static libs #7180 --- cmake/CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 994ed7d52c..2814511b8d 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1043,11 +1043,7 @@ if(BUILD_IFCGEOM) foreach(schema ${SCHEMA_VERSIONS}) set(IFCGEOM_SCHEMA_LIBRARIES ${IFCGEOM_SCHEMA_LIBRARIES} geometry_mapping_ifc${schema}) endforeach() - if(WASM_BUILD) - set(IFCOPENSHELL_LIBRARIES ${IFCOPENSHELL_LIBRARIES} IfcGeom ${IFCGEOM_SCHEMA_LIBRARIES}) - else() - set(IFCOPENSHELL_LIBRARIES ${IFCOPENSHELL_LIBRARIES} IfcGeom ${IFCGEOM_SCHEMA_LIBRARIES} IfcGeom ${IFCGEOM_SCHEMA_LIBRARIES} IfcGeom) - endif() + set(IFCOPENSHELL_LIBRARIES ${IFCOPENSHELL_LIBRARIES} IfcGeom ${IFCGEOM_SCHEMA_LIBRARIES}) endif() if(BUILD_CONVERT OR BUILD_IFCPYTHON) @@ -1177,6 +1173,9 @@ if(BUILD_IFCGEOM) add_library(geometry_mapping_ifc${schema} STATIC ${IFCGEOM_FILES}) set_target_properties(geometry_mapping_ifc${schema} PROPERTIES COMPILE_FLAGS "-DIFC_GEOM_EXPORTS -DIfcSchema=Ifc${schema}") target_link_libraries(geometry_mapping_ifc${schema} IfcParse) + if (NOT BUILD_SHARED_LIBS) + target_link_libraries(geometry_mapping_ifc${schema} IfcGeom) + endif() list(APPEND mapping_libraries geometry_mapping_ifc${schema}) endforeach()