@@ -42,7 +42,8 @@ class IfcopenshellConan(ConanFile):
42
42
"with_hdf5" : True ,
43
43
}
44
44
# Limit the default set of schemas to the basic ones and the latest to limit the size of the build.
45
- default_options .update ({f"schema_{ schema } " : schema in ["4x3_add2" ] for schema in IFC_SCHEMAS })
45
+ default_options .update ({f"schema_{ schema } " : schema in ["2x3" , "4" , "4x3_add2" ] for schema in IFC_SCHEMAS })
46
+ implements = ["auto_shared_fpic" ]
46
47
47
48
@property
48
49
def _selected_ifc_schemas (self ):
@@ -124,9 +125,13 @@ def libdir(dep):
124
125
if self .options .get_safe ("with_hdf5" ):
125
126
tc .variables ["HDF5_INCLUDE_DIR" ] = includedir ("hdf5" )
126
127
tc .variables ["HDF5_LIBRARY_DIR" ] = libdir ("hdf5" )
128
+
129
+ if self .settings .compiler == "msvc" :
130
+ existing_flags = tc .variables .get ("CMAKE_CXX_FLAGS" , "" )
131
+ tc .variables ["CMAKE_CXX_FLAGS" ] = existing_flags + " /permissive- /EHsc"
132
+
127
133
tc .generate ()
128
134
129
- tc .generate ()
130
135
131
136
deps = CMakeDeps (self )
132
137
deps .generate ()
@@ -222,8 +227,8 @@ def _add_component(name, requires=None):
222
227
_add_component (component_name )
223
228
self .cpp_info .components ["Serializers" ].requires .append (component_name )
224
229
225
- geometry_serializer = _add_component ("geometry_serializer" )
230
+ geometry_serializer = _add_component ("geometry_serializer" , [ "IfcParse" , "IfcGeom" , "opencascade::occt_tktopalgo" , "opencascade::occt_tkbrep" ] )
226
231
for schema in self ._selected_ifc_schemas :
227
232
component_name = f"geometry_serializer_ifc{ schema } "
228
- _add_component (component_name , requires = ["opencascade::occt_tkbrep" ])
233
+ _add_component (component_name , requires = ["opencascade::occt_tkmesh" , "opencascade::occt_tkxmesh" , "opencascade::occt_tkmeshvs" , "opencascade::occt_tktopalgo" , "opencascade:: occt_tkbrep" , "opencascade::occt_tkgeomalgo " ])
229
234
geometry_serializer .requires .append (component_name )
0 commit comments