cmake: Externalize geometry mapping target cmake config

This commit is contained in:
Esteban DUGUEPEROUX
2025-11-30 13:33:56 +01:00
committed by Thomas Krijnen
parent 986cb905b2
commit b7a9199253
4 changed files with 41 additions and 58 deletions
+16
View File
@@ -0,0 +1,16 @@
foreach(schema ${SCHEMA_VERSIONS})
file(GLOB IFCGEOM_I_FILES *.i)
file(GLOB IFCGEOM_H_FILES *.h)
file(GLOB IFCGEOM_CPP_FILES *.cpp)
set(IFCGEOM_FILES ${IFCGEOM_CPP_FILES} ${IFCGEOM_H_FILES} ${IFCGEOM_I_FILES})
add_library(geometry_mapping_ifc${schema} OBJECT ${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)
list(APPEND mapping_libraries geometry_mapping_ifc${schema})
install(TARGETS geometry_mapping_ifc${schema})
endforeach()
set(mapping_libraries ${mapping_libraries} PARENT_SCOPE)