From a70b7e319ba7860a329179f98aa81fe36f81c530 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 10 Jun 2024 15:42:11 +0500 Subject: [PATCH] cmake - build alignment examples only if 4x3 schema is available As they doesn't support other schemas. --- src/examples/CMakeLists.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/examples/CMakeLists.txt b/src/examples/CMakeLists.txt index f9eb9fab3f..2bb11b370c 100644 --- a/src/examples/CMakeLists.txt +++ b/src/examples/CMakeLists.txt @@ -34,11 +34,12 @@ set_target_properties(IfcAdvancedHouse PROPERTIES FOLDER Examples) endif() -ADD_EXECUTABLE(IfcAlignment IfcAlignment.cpp) -TARGET_LINK_LIBRARIES(IfcAlignment ${IFCOPENSHELL_LIBRARIES}) -set_target_properties(IfcAlignment PROPERTIES FOLDER Examples) +if(SCHEMA_VERSIONS MATCHES "4x3") + 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_EXECUTABLE(IfcSimplifiedAlignment IfcSimplifiedAlignment.cpp) + TARGET_LINK_LIBRARIES(IfcSimplifiedAlignment ${IFCOPENSHELL_LIBRARIES}) + set_target_properties(IfcSimplifiedAlignment PROPERTIES FOLDER Examples) +endif()