Twinklebear / ChameleonRT

An example path tracer that runs on multiple ray tracing backends (Embree/DXR/OptiX/Vulkan/Metal/OSPRay)
MIT License
600 stars 40 forks source link

Error when running the command #14

Closed Ghostkwebb closed 1 year ago

Ghostkwebb commented 1 year ago

So I ran this command: cmake .. -DENABLE_METAL=ON

Then I get the error below What to do?

CMake Error: The source directory "/Users/ghostkwebb/Desktop" does not appear to contain CMakeLists.txt.

Twinklebear commented 1 year ago

It looks like you're running cmake in the root directory, which is why it fails to find the CMakeLists.txt file. I recommend making a build subdirectory and running cmake there:

mkdir build
cd build
cmake .. -DENABLE_METAL=ON
make
Ghostkwebb commented 1 year ago

I didn't understand what u said 😅😅 but I ran the command u gave and got this CMake Error: The source directory "/Users/ghostkwebb" does not appear to contain CMakeLists.txt.

also I used homebrew to install cmake

Twinklebear commented 1 year ago

I see, it looks like you're not running it in the right subdirectory so the path is wrong when you copy-paste it in. From cloning the repo to building you'd run:

git clone git@github.com:Twinklebear/ChameleonRT.git
cd ChameleonRT
mkdir build
cd build
cmake .. -DENABLE_METAL=ON
make

So the directory structure is like:

ChameleonRT/
    CMakeLists.txt
    - build/
           you run cmake in here and pass path to parent directory so it finds CMakeListst.txt