examples - build IfcAlignment using cmake package

This commit is contained in:
Andrej730
2025-12-12 16:08:43 +05:00
parent 43533706a4
commit 4d34e4296c
5 changed files with 32 additions and 11 deletions
+18 -6
View File
@@ -88,14 +88,26 @@ if(STANDALONE_PROJECT OR SCHEMA_VERSIONS MATCHES "2x3")
endif()
endif()
if(NOT STANDALONE_PROJECT AND SCHEMA_VERSIONS MATCHES "4x3_add2")
if(STANDALONE_PROJECT OR SCHEMA_VERSIONS MATCHES "4x3_add2")
add_executable(IfcAlignment IfcAlignment.cpp)
target_link_libraries(IfcAlignment ${IFCOPENSHELL_LIBRARIES})
set_target_properties(IfcAlignment PROPERTIES FOLDER Examples)
add_executable(IfcSimplifiedAlignment IfcSimplifiedAlignment.cpp)
target_link_libraries(IfcSimplifiedAlignment ${IFCOPENSHELL_LIBRARIES})
set_target_properties(IfcSimplifiedAlignment PROPERTIES FOLDER Examples)
add_library(IfcAlignmentInterface INTERFACE)
if(STANDALONE_PROJECT)
target_include_directories(IfcAlignmentInterface INTERFACE "${IfcOpenShell_DIR}/../../../include")
target_include_directories(IfcAlignmentInterface INTERFACE ${Boost_INCLUDE_DIRS})
target_compile_definitions(IfcAlignmentInterface INTERFACE HAS_SCHEMA_4x3_add2 IFOPSH_WITH_ROCKSDB)
target_link_libraries(IfcAlignment PRIVATE IfcOpenShell::IfcParse)
target_link_libraries(IfcSimplifiedAlignment PRIVATE IfcOpenShell::IfcParse)
else()
target_include_directories(IfcAlignmentInterface INTERFACE "${CMAKE_SOURCE_DIR}/../src")
target_link_libraries(IfcAlignmentInterface INTERFACE ${IFCOPENSHELL_LIBRARIES})
set_target_properties(IfcAlignment PROPERTIES FOLDER Examples)
set_target_properties(IfcSimplifiedAlignment PROPERTIES FOLDER Examples)
endif()
target_link_libraries(IfcAlignment PRIVATE IfcAlignmentInterface)
target_link_libraries(IfcSimplifiedAlignment PRIVATE IfcAlignmentInterface)
install(TARGETS IfcAlignment IfcSimplifiedAlignment)
endif()