@@ -963,12 +963,7 @@ if(BUILD_IFCGEOM)
963963endif ()
964964
965965if (BUILD_CONVERT OR BUILD_IFCPYTHON)
966- foreach (schema ${SCHEMA_VERSIONS} )
967- set (SERIALIZER_SCHEMA_LIBRARIES ${SERIALIZER_SCHEMA_LIBRARIES} Serializers_ifc${schema} )
968- endforeach ()
969- set (IFCOPENSHELL_LIBRARIES ${IFCOPENSHELL_LIBRARIES} Serializers ${SERIALIZER_SCHEMA_LIBRARIES} )
970-
971- if (WITH_OPENCASCADE)
966+ if (WITH_OPENCASCADE)
972967 foreach (schema ${SCHEMA_VERSIONS} )
973968 set (GEOM_SERIALIZER_SCHEMA_LIBRARIES ${GEOM_SERIALIZER_SCHEMA_LIBRARIES} GeometrySerializers_ifc${schema} )
974969
@@ -1041,39 +1036,8 @@ if(BUILD_IFCGEOM)
10411036endif (BUILD_IFCGEOM )
10421037
10431038if (BUILD_CONVERT OR BUILD_IFCPYTHON)
1044- # Serializers
1045- file (GLOB SERIALIZERS_H_FILES ../src/serializers/*.h )
1046- file (GLOB SERIALIZERS_CPP_FILES ../src/serializers/*.cpp )
1047- set (SERIALIZERS_FILES ${SERIALIZERS_H_FILES} ${SERIALIZERS_CPP_FILES} )
1048- file (GLOB SERIALIZERS_S_H_FILES ../src/serializers/schema_dependent/*.h )
1049- file (GLOB SERIALIZERS_S_CPP_FILES ../src/serializers/schema_dependent/*.cpp )
1050- set (SERIALIZERS_S_FILES ${SERIALIZERS_S_H_FILES} ${SERIALIZERS_S_CPP_FILES} )
1051-
1052- foreach (schema ${SCHEMA_VERSIONS} )
1053- add_library (Serializers_ifc${schema} STATIC ${SERIALIZERS_S_FILES} )
1054- set_target_properties (Serializers_ifc${schema} PROPERTIES COMPILE_FLAGS "-DSERIALIZERS_EXPORTS -DIfcSchema=Ifc${schema} " )
1055-
1056- if (WASM_BUILD)
1057- target_link_libraries (Serializers_ifc${schema} ${HDF5_LIBRARIES} )
1058- else ()
1059- target_link_libraries (Serializers_ifc${schema} IfcGeom ${OPENCASCADE_LIBRARIES} ${HDF5_LIBRARIES} )
1060- endif ()
1061- endforeach ()
1062-
1063- add_library (Serializers ${SERIALIZERS_FILES} )
1064- set_target_properties (Serializers PROPERTIES COMPILE_FLAGS "-DSERIALIZERS_EXPORTS" VERSION "${PROJECT_VERSION} " SOVERSION "${PROJECT_VERSION_MAJOR} .${PROJECT_VERSION_MINOR} " )
1065-
1066- if (WITH_PROJ)
1067- target_compile_definitions (Serializers PRIVATE "WITH_PROJ" )
1068- if (PROJ_STATIC)
1069- target_compile_definitions (Serializers PRIVATE "PROJ_DLL=" )
1070- endif ()
1071- target_include_directories (Serializers PRIVATE ${PROJ_INCLUDE_DIR} ${SQLITE_INCLUDE_DIR} )
1072- target_link_libraries (Serializers ${PROJ_LIBRARIES} )
1073- endif ()
1074-
1075- target_link_libraries (Serializers ${SERIALIZER_SCHEMA_LIBRARIES} ${OPENCOLLADA_LIBRARIES} ${USD_LIBRARIES} IfcGeom ${OPENCASCADE_LIBRARIES} ${kernel_libraries} IfcParse )
1076-
1039+ add_subdirectory (../src/serializers serializers )
1040+ set (IFCOPENSHELL_LIBRARIES ${IFCOPENSHELL_LIBRARIES} ${SERIALIZER_SCHEMA_LIBRARIES} )
10771041endif (BUILD_CONVERT OR BUILD_IFCPYTHON )
10781042
10791043if (BUILD_CONVERT)
@@ -1224,22 +1188,6 @@ if(BUILD_IFCGEOM)
12241188 )
12251189endif (BUILD_IFCGEOM )
12261190
1227- if (BUILD_CONVERT)
1228- install (TARGETS Serializers ${SERIALIZER_SCHEMA_LIBRARIES}
1229- ARCHIVE DESTINATION ${LIBDIR}
1230- LIBRARY DESTINATION ${LIBDIR}
1231- RUNTIME DESTINATION ${BINDIR}
1232- )
1233-
1234- install (FILES ${SERIALIZERS_H_FILES}
1235- DESTINATION ${INCLUDEDIR} /serializers/
1236- )
1237-
1238- install (FILES ${SERIALIZERS_S_H_FILES}
1239- DESTINATION ${INCLUDEDIR} /serializers/schema_dependent
1240- )
1241- endif (BUILD_CONVERT )
1242-
12431191if (BUILD_CONVERT OR BUILD_IFCPYTHON)
12441192 if (WITH_OPENCASCADE)
12451193 install (TARGETS geometry_serializer ${geometry_serializer_libraries}
0 commit comments