bschwind / opencascade-rs

Rust bindings to the OpenCascade CAD Kernel
GNU Lesser General Public License v2.1
118 stars 22 forks source link

Cmake Error on windows ! #180

Open Shrav108 opened 3 months ago

Shrav108 commented 3 months ago

Hey I am trying to use this crate for building a cad model. I am running it on windows. I am getting the following error:

error: failed to run custom build command for `occt-sys v0.2.0`

--- stdout
  CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
  CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-pc-windows-msvc = None
  CMAKE_GENERATOR_x86_64_pc_windows_msvc = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None
  CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-pc-windows-msvc = None
  CMAKE_x86_64_pc_windows_msvc = None
  HOST_CMAKE = None
  CMAKE = None

--- stderr
  thread 'main' panicked at C:\Users\XYZ\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.51\src/lib.rs:1100:5:

  failed to execute command: program not found
  is `cmake` not installed?

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

What should I do ?

bschwind commented 3 months ago

Hi,

This library is not yet well supported on windows. However, it simply looks like you don't have cmake installed. That might not be the only issue you'll run into though, so you could also try installing opencascade 7.7 and building your project by passing default-features = false in your Cargo.toml for this crate. Or if you're working in this repo directly, pass --no-default-features to cargo when building.