cmake: Use OBJECT target instead of STATIC one to avoid mix static and shared targets in a same build

This commit is contained in:
Esteban DUGUEPEROUX
2025-11-23 16:16:17 +01:00
committed by Andrej730
parent 37d29e5d47
commit 8fb10d2ff3
2 changed files with 4 additions and 7 deletions
@@ -3,7 +3,7 @@ file(GLOB SERIALIZERS_S_CPP_FILES *.cpp)
set(SERIALIZERS_S_FILES ${SERIALIZERS_S_H_FILES} ${SERIALIZERS_S_CPP_FILES})
foreach(schema ${SCHEMA_VERSIONS})
add_library(Serializers_ifc${schema} STATIC ${SERIALIZERS_S_FILES})
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}")
if(WASM_BUILD)