mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 16:22:53 +00:00
examples - build IfcAlignment using cmake package
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user