2025-11-15 21:13:05 +01:00
|
|
|
add_subdirectory(schema_dependent)
|
|
|
|
|
|
|
|
|
|
file(GLOB SERIALIZERS_H_FILES *.h)
|
|
|
|
|
file(GLOB SERIALIZERS_CPP_FILES *.cpp)
|
2026-04-17 11:24:09 +02:00
|
|
|
file(GLOB SERIALIZERS_S_H_FILES schema_dependent/*.h)
|
2025-11-15 21:13:05 +01:00
|
|
|
set(SERIALIZERS_FILES ${SERIALIZERS_H_FILES} ${SERIALIZERS_CPP_FILES})
|
|
|
|
|
|
|
|
|
|
add_library(Serializers ${SERIALIZERS_FILES})
|
2026-04-14 13:50:23 +02:00
|
|
|
add_library(serialization ALIAS Serializers)
|
2025-11-15 21:13:05 +01:00
|
|
|
set_target_properties(Serializers PROPERTIES COMPILE_FLAGS "-DSERIALIZERS_EXPORTS" VERSION "${PROJECT_VERSION}" SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
|
|
|
|
|
|
|
|
|
if(WITH_PROJ)
|
|
|
|
|
find_package(proj REQUIRED)
|
|
|
|
|
target_compile_definitions(Serializers PRIVATE "WITH_PROJ")
|
|
|
|
|
if(PROJ_STATIC)
|
|
|
|
|
target_compile_definitions(Serializers PRIVATE "PROJ_DLL=")
|
|
|
|
|
endif()
|
|
|
|
|
target_link_libraries(Serializers PRIVATE proj::proj)
|
|
|
|
|
endif()
|
|
|
|
|
|
2025-12-02 17:58:35 +05:00
|
|
|
target_link_libraries(Serializers
|
|
|
|
|
PRIVATE
|
2026-04-17 11:24:09 +02:00
|
|
|
plugin ${OPENCOLLADA_LIBRARIES} ${USD_LIBRARIES}
|
2026-04-14 13:50:23 +02:00
|
|
|
IfcGeom ${OpenCASCADE_LIBRARIES} IfcParse
|
2025-12-02 17:58:35 +05:00
|
|
|
)
|
2025-11-15 21:13:05 +01:00
|
|
|
|
2026-04-15 18:07:28 +02:00
|
|
|
if(WITH_OPENCASCADE)
|
|
|
|
|
target_link_libraries(Serializers PRIVATE geometry_kernel_opencascade)
|
|
|
|
|
endif()
|
|
|
|
|
|
2026-04-17 11:24:09 +02:00
|
|
|
install(TARGETS Serializers ${document_serializer_libraries})
|
2025-11-15 21:13:05 +01:00
|
|
|
|
|
|
|
|
install(FILES ${SERIALIZERS_H_FILES}
|
|
|
|
|
DESTINATION ${INCLUDEDIR}/serializers/
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
install(FILES ${SERIALIZERS_S_H_FILES}
|
|
|
|
|
DESTINATION ${INCLUDEDIR}/serializers/schema_dependent
|
|
|
|
|
)
|
2026-04-17 11:24:09 +02:00
|
|
|
|
|
|
|
|
set(IFCOPENSHELL_LIBRARIES ${IFCOPENSHELL_LIBRARIES} Serializers)
|
|
|
|
|
set(IFCOPENSHELL_LIBRARIES ${IFCOPENSHELL_LIBRARIES} PARENT_SCOPE)
|
|
|
|
|
set(document_serializer_libraries ${document_serializer_libraries} PARENT_SCOPE)
|