2025-11-09 08:26:33 +01:00
|
|
|
file(GLOB IFCPARSE_H_FILES_ALL *.h)
|
|
|
|
|
file(GLOB IFCPARSE_CPP_FILES_ALL *.cpp)
|
|
|
|
|
|
|
|
|
|
foreach(file ${IFCPARSE_H_FILES_ALL})
|
|
|
|
|
get_filename_component(filename "${file}" NAME)
|
|
|
|
|
|
|
|
|
|
if(NOT "${filename}" MATCHES "[0-9]")
|
|
|
|
|
list(APPEND IFCPARSE_H_FILES "${file}")
|
|
|
|
|
endif()
|
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
|
|
foreach(file ${IFCPARSE_CPP_FILES_ALL})
|
|
|
|
|
get_filename_component(filename "${file}" NAME)
|
|
|
|
|
|
|
|
|
|
if(NOT "${filename}" MATCHES "[0-9]")
|
|
|
|
|
list(APPEND IFCPARSE_CPP_FILES "${file}")
|
|
|
|
|
endif()
|
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
|
|
foreach(schema ${SCHEMA_VERSIONS})
|
|
|
|
|
list(APPEND IFCPARSE_H_FILES
|
|
|
|
|
Ifc${schema}.h
|
|
|
|
|
Ifc${schema}-definitions.h
|
|
|
|
|
)
|
|
|
|
|
list(APPEND IFCPARSE_CPP_FILES
|
|
|
|
|
Ifc${schema}.cpp
|
|
|
|
|
Ifc${schema}-schema.cpp
|
|
|
|
|
)
|
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
|
|
set(IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_FILES})
|
|
|
|
|
|
|
|
|
|
add_library(IfcParse ${IFCPARSE_FILES})
|
2025-12-12 18:25:59 +05:00
|
|
|
target_compile_definitions(IfcParse PUBLIC ${SCHEMA_DEFINITIONS})
|
2025-12-12 14:28:07 +05:00
|
|
|
set_target_properties(IfcParse
|
|
|
|
|
PROPERTIES
|
|
|
|
|
COMPILE_FLAGS -DIFC_PARSE_EXPORTS
|
|
|
|
|
VERSION "${PROJECT_VERSION}"
|
|
|
|
|
SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}"
|
|
|
|
|
PUBLIC_HEADER "${IFCPARSE_H_FILES}"
|
|
|
|
|
)
|
2025-11-09 08:26:33 +01:00
|
|
|
|
|
|
|
|
if(IFCXML_SUPPORT)
|
2025-11-28 17:40:22 +01:00
|
|
|
find_package(LibXml2 REQUIRED)
|
2025-12-02 17:46:00 +05:00
|
|
|
target_compile_definitions(IfcParse PUBLIC WITH_IFCXML)
|
2025-12-02 17:46:22 +05:00
|
|
|
set(SWIG_DEFINES ${SWIG_DEFINES} -DWITH_IFCXML PARENT_SCOPE)
|
2025-11-09 08:26:33 +01:00
|
|
|
|
|
|
|
|
target_link_libraries(IfcParse LibXml2::LibXml2)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WASM_BUILD)
|
|
|
|
|
target_link_libraries(IfcParse ${BCRYPT_LIBRARIES})
|
|
|
|
|
else()
|
|
|
|
|
target_link_libraries(IfcParse ${Boost_LIBRARIES} ${BCRYPT_LIBRARIES})
|
|
|
|
|
endif()
|
|
|
|
|
|
2025-12-12 17:35:11 +05:00
|
|
|
target_link_libraries(IfcParse ${ROCKSDB_LIBRARIES})
|
2025-11-09 08:26:33 +01:00
|
|
|
|
2025-12-11 19:22:49 +05:00
|
|
|
install(TARGETS IfcParse
|
|
|
|
|
EXPORT ${IFCOPENSHELL_EXPORT_TARGETS}
|
2025-12-12 14:28:07 +05:00
|
|
|
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ifcparse"
|
2025-12-15 18:21:59 +05:00
|
|
|
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
2025-12-11 19:22:49 +05:00
|
|
|
)
|