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
@@ -39,6 +39,13 @@ if(NOT OCC_INCLUDE_DIR AND NOT OCC_LIBRARY_DIR)
mark_as_advanced(OpenCASCADE_DIR)
message(STATUS "Found OpenCASCADE config: ${OpenCASCADE_DIR}")
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()
if(OpenCASCADE_VERSION VERSION_LESS "7.9.0")
# Bug in OCCT cmake configs < 7.9.0 - missing linked library.
list(APPEND OpenCASCADE_LIBRARIES WSOCK32.lib)