@@ -262,7 +262,7 @@ if(WITH_CGAL)
262262 else ()
263263 set (CGAL_Boost_USE_STATIC_LIBS "${Boost_USE_STATIC_LIBS} " )
264264 endif ()
265- find_package (CGAL REQUIRED )
265+ find_package (CGAL REQUIRED )
266266 if (NOT CGAL_DIR)
267267 message (
268268 FATAL_ERROR
@@ -957,6 +957,7 @@ if(NOT Boost_VERSION LESS 105800)
957957 add_definitions (-DBOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE )
958958endif ()
959959
960+ add_subdirectory (../src/ifcparse ifcparse )
960961set (IFCOPENSHELL_LIBRARIES IfcParse)
961962
962963if (BUILD_IFCGEOM)
@@ -989,52 +990,6 @@ if(BUILD_CONVERT OR BUILD_IFCPYTHON)
989990 endif ()
990991endif ()
991992
992- # IfcParse
993- file (GLOB IFCPARSE_H_FILES_ALL ../src/ifcparse/*.h )
994- file (GLOB IFCPARSE_CPP_FILES_ALL ../src/ifcparse/*.cpp )
995-
996- foreach (file ${IFCPARSE_H_FILES_ALL} )
997- get_filename_component (filename "${file} " NAME )
998-
999- if (NOT "${filename} " MATCHES "[0-9]" )
1000- list (APPEND IFCPARSE_H_FILES "${file} " )
1001- endif ()
1002- endforeach ()
1003-
1004- foreach (file ${IFCPARSE_CPP_FILES_ALL} )
1005- get_filename_component (filename "${file} " NAME )
1006-
1007- if (NOT "${filename} " MATCHES "[0-9]" )
1008- list (APPEND IFCPARSE_CPP_FILES "${file} " )
1009- endif ()
1010- endforeach ()
1011-
1012- foreach (schema ${SCHEMA_VERSIONS} )
1013- list (APPEND IFCPARSE_H_FILES
1014- ../src/ifcparse/Ifc${schema} .h
1015- ../src/ifcparse/Ifc${schema} -definitions.h
1016- )
1017- list (APPEND IFCPARSE_CPP_FILES
1018- ../src/ifcparse/Ifc${schema} .cpp
1019- ../src/ifcparse/Ifc${schema} -schema.cpp
1020- )
1021- endforeach ()
1022-
1023- set (IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_FILES} )
1024-
1025- add_library (IfcParse ${IFCPARSE_FILES} )
1026- target_link_libraries (IfcParse ${STDCPPFS} )
1027- set_target_properties (IfcParse PROPERTIES COMPILE_FLAGS -DIFC_PARSE_EXPORTS VERSION "${PROJECT_VERSION} " SOVERSION "${PROJECT_VERSION_MAJOR} .${PROJECT_VERSION_MINOR} " )
1028-
1029- if (LibXml2_DIR)
1030- target_compile_definitions (IfcParse PRIVATE ${LIBXML2_DEFINITIONS} )
1031- endif ()
1032- if (WASM_BUILD)
1033- target_link_libraries (IfcParse ${BCRYPT_LIBRARIES} ${LIBXML2_LIBRARIES} )
1034- else ()
1035- target_link_libraries (IfcParse ${Boost_LIBRARIES} ${BCRYPT_LIBRARIES} ${LIBXML2_LIBRARIES} )
1036- endif ()
1037-
1038993if (BUILD_IFCGEOM)
1039994 # CGAL::CGAL target already has dependencies resolved.
1040995 if (WITH_CGAL AND CGAL_DIR)
@@ -1325,17 +1280,6 @@ if(BUILD_QTVIEWER)
13251280 add_subdirectory (../src/qtviewer qtviewer )
13261281endif ()
13271282
1328- # CMake installation targets
1329- install (FILES ${IFCPARSE_H_FILES}
1330- DESTINATION ${INCLUDEDIR} /ifcparse
1331- )
1332-
1333- install (TARGETS IfcParse
1334- ARCHIVE DESTINATION ${LIBDIR}
1335- LIBRARY DESTINATION ${LIBDIR}
1336- RUNTIME DESTINATION ${BINDIR}
1337- )
1338-
13391283if (BUILD_IFCGEOM)
13401284 # install(FILES ${IFCGEOM_H_FILES}
13411285 # DESTINATION ${INCLUDEDIR}/ifcgeom
0 commit comments