format cmake files

This commit is contained in:
Andrej730
2025-12-20 13:27:35 +05:00
parent b686c19a25
commit d41985f23a
24 changed files with 441 additions and 393 deletions
+18 -13
View File
@@ -5,10 +5,12 @@ file(GLOB SERIALIZERS_CPP_FILES *.cpp)
set(SERIALIZERS_FILES ${SERIALIZERS_H_FILES} ${SERIALIZERS_CPP_FILES})
add_library(Serializers ${SERIALIZERS_FILES})
set_target_properties(Serializers PROPERTIES
COMPILE_FLAGS "-DSERIALIZERS_EXPORTS"
VERSION "${PROJECT_VERSION}"
SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}"
set_target_properties(
Serializers
PROPERTIES
COMPILE_FLAGS "-DSERIALIZERS_EXPORTS"
VERSION "${PROJECT_VERSION}"
SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}"
)
set(SERIALIZER_SCHEMA_LIBRARIES Serializers ${SERIALIZER_SCHEMA_LIBRARIES} PARENT_SCOPE)
@@ -21,18 +23,21 @@ if(WITH_PROJ)
target_link_libraries(Serializers PRIVATE PROJ::proj)
endif()
target_link_libraries(Serializers
target_link_libraries(
Serializers
PRIVATE
${SERIALIZER_SCHEMA_LIBRARIES} ${OPENCOLLADA_LIBRARIES} ${USD_LIBRARIES} ${GLTF_LIBRARIES}
IfcGeom ${OpenCASCADE_LIBRARIES} ${kernel_libraries} IfcParse
${SERIALIZER_SCHEMA_LIBRARIES}
${OPENCOLLADA_LIBRARIES}
${USD_LIBRARIES}
${GLTF_LIBRARIES}
IfcGeom
${OpenCASCADE_LIBRARIES}
${kernel_libraries}
IfcParse
)
install(TARGETS Serializers)
# Can't use `PUBLIC_HEADER` since we need two folders.
install(FILES ${SERIALIZERS_H_FILES}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/serializers/"
)
install(FILES ${SERIALIZERS_S_H_FILES}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/serializers/schema_dependent"
)
install(FILES ${SERIALIZERS_H_FILES} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/serializers/")
install(FILES ${SERIALIZERS_S_H_FILES} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/serializers/schema_dependent")
@@ -5,12 +5,14 @@ set(SERIALIZERS_S_FILES ${SERIALIZERS_S_H_FILES} ${SERIALIZERS_S_CPP_FILES})
foreach(schema ${SCHEMA_VERSIONS})
add_library(Serializers_ifc${schema} OBJECT ${SERIALIZERS_S_FILES})
set(SERIALIZER_SCHEMA_LIBRARIES ${SERIALIZER_SCHEMA_LIBRARIES} Serializers_ifc${schema})
set_target_properties(Serializers_ifc${schema} PROPERTIES COMPILE_FLAGS "-DIFC_GEOM_EXPORTS -DIfcSchema=Ifc${schema}")
set_target_properties(
Serializers_ifc${schema}
PROPERTIES COMPILE_FLAGS "-DIFC_GEOM_EXPORTS -DIfcSchema=Ifc${schema}"
)
target_link_libraries(Serializers_ifc${schema} ${HDF5_LIBRARIES} ${GLTF_LIBRARIES})
if(NOT WASM_BUILD)
target_link_libraries(Serializers_ifc${schema} IfcGeom ${OpenCASCADE_LIBRARIES})
endif()
endforeach()
set(SERIALIZER_SCHEMA_LIBRARIES ${SERIALIZER_SCHEMA_LIBRARIES} PARENT_SCOPE)