diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index a6ad1a5130..f62a9813ff 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -205,7 +205,7 @@ if(WITH_CGAL) list(APPEND GEOMETRY_KERNELS cgal) endif() -if(WITH_OPENCASCADE) +if(BUILD_IFCGEOM AND WITH_OPENCASCADE) find_package(OpenCASCADE REQUIRED) # Map OpenCASCADE_LIBRARIES variable from OpenCASCADEConfig.cmake to OpenCASCADE_LIBRARIES used by kernel generic cmake file set(OpenCASCADE_LIBRARIES ${OpenCASCADE_LIBRARIES})