File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -464,12 +464,13 @@ endif()
464464
465465message (STATUS "IFC SCHEMA_VERSIONS that will be used for the build: ${SCHEMA_VERSIONS} ." )
466466
467+ set (SCHEMA_DEFINITIONS "" )
467468foreach (schema ${SCHEMA_VERSIONS} )
468- add_definitions ( -DHAS_SCHEMA_${schema} )
469+ list ( APPEND SCHEMA_DEFINITIONS " -DHAS_SCHEMA_${schema} " )
469470endforeach ()
470471
471472string (REPLACE ";" ")(" schema_version_seq "(${SCHEMA_VERSIONS} )" )
472- add_definitions ( -DSCHEMA_SEQ=${schema_version_seq} )
473+ list ( APPEND SCHEMA_DEFINITIONS " -DSCHEMA_SEQ=${schema_version_seq} " )
473474
474475if (COMPILE_SCHEMA)
475476 # @todo, this appears to be untested at the moment
Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ if(STANDALONE_PROJECT OR SCHEMA_VERSIONS MATCHES "2x3")
4747 target_link_libraries (IfcParseExamples ${Boost_LIBRARIES} )
4848 target_link_libraries (IfcParseExamples IfcOpenShell::IfcParse )
4949 target_compile_features (IfcParseExamples PRIVATE cxx_std_17 )
50- target_compile_definitions (IfcParseExamples PRIVATE "SCHEMA_SEQ=(2x3)" HAS_SCHEMA_2x3 )
5150 else ()
5251 target_include_directories (IfcParseExamples PRIVATE "${CMAKE_SOURCE_DIR} /../src" )
5352 target_link_libraries (IfcParseExamples IfcParse )
@@ -73,7 +72,6 @@ if(STANDALONE_PROJECT OR SCHEMA_VERSIONS MATCHES "2x3")
7372 INTERFACE ${OpenCASCADE_LIBRARIES} RocksDB::rocksdb
7473 IfcOpenShell::IfcParse IfcOpenShell::geometry_serializer
7574 )
76- target_compile_definitions (IfcHouseInterface INTERFACE "SCHEMA_SEQ=(2x3)" HAS_SCHEMA_2x3 )
7775 else ()
7876 target_include_directories (IfcHouseInterface INTERFACE "${CMAKE_SOURCE_DIR} /../src" )
7977 target_link_libraries (IfcHouseInterface INTERFACE ${IFCOPENSHELL_LIBRARIES} ${OpenCASCADE_LIBRARIES} )
@@ -93,7 +91,6 @@ if(STANDALONE_PROJECT OR SCHEMA_VERSIONS MATCHES "4x3_add2")
9391
9492 if (STANDALONE_PROJECT)
9593 target_include_directories (IfcAlignmentInterface INTERFACE ${Boost_INCLUDE_DIRS} )
96- target_compile_definitions (IfcAlignmentInterface INTERFACE HAS_SCHEMA_4x3_add2 )
9794 target_link_libraries (IfcAlignment PRIVATE IfcOpenShell::IfcParse )
9895 target_link_libraries (IfcSimplifiedAlignment PRIVATE IfcOpenShell::IfcParse )
9996 else ()
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ endforeach()
3131set (IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_FILES} )
3232
3333add_library (IfcParse ${IFCPARSE_FILES} )
34+ target_compile_definitions (IfcParse PUBLIC ${SCHEMA_DEFINITIONS} )
3435target_include_directories (IfcParse PUBLIC $<INSTALL_INTERFACE :${CMAKE_INSTALL_INCLUDEDIR} >)
3536set_target_properties (IfcParse
3637 PROPERTIES
You can’t perform that action at this time.
0 commit comments