cmake - fix issue with using cmake occt packages <7.7.0

This commit is contained in:
Andrej730
2025-12-15 18:27:17 +05:00
parent deb6243ce5
commit bf2c27528c
2 changed files with 14 additions and 0 deletions
+7
View File
@@ -65,6 +65,13 @@ if(SCHEMA_VERSIONS MATCHES "2x3")
find_package(CGAL CONFIG REQUIRED)
find_package(OpenCASCADE CONFIG REQUIRED)
if(OpenCASCADE_VERSION VERSION_LESS "7.7.0")
# cmake configs < 7.7.0 were not adding include directories to targets automatically.
set_target_properties(TKernel PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${OpenCASCADE_INCLUDE_DIR}"
)
endif()
target_link_libraries(IfcHouseInterface INTERFACE IfcOpenShell::IfcParse IfcOpenShell::geometry_serializer)
else()
target_link_libraries(IfcHouseInterface INTERFACE IfcParse geometry_serializer)