mosra / magnum

Lightweight and modular C++11 graphics middleware for games and data visualization
https://magnum.graphics/
Other
4.75k stars 439 forks source link

How to manually compile on Windows? #561

Open eladmaimoni opened 2 years ago

eladmaimoni commented 2 years ago

I am trying to compile the examples on my Windows PC. I tried following the documentation but it seems lacking the most basic details. Such as a simple step-by-step do this after that.

This is what I did:

How do I compile the examples on Windows? How do resolve the missing CORRADE_INCLUDE_DIR ? what exactly is CORRADE_INCLUDE_DIR ?

thanks.

image

mosra commented 2 years ago

Hello! :)

Which documentation did you follow, actually? There's a Getting Started Guide that's covering the initial setup in a detailed-enough step-by-step approach. If you get through this guide, building examples should be just a variant of the same workflow.

The project isn't self-contained, it has Corrade as an external dependency, and the detailed building documentation assumes you have a pre-existing CMake knowledge, especially about how to point it to dependencies. It provides some info and mentions CMAKE_PREFIX_PATH, but it could be better at that -- I'll update it.

For your particular case, adding a CMAKE_PREFIX_PATH path variable in the GUI and pointing it to the location where Corrade got installed, should make things work.

eladmaimoni commented 2 years ago

@mosra thanks, I've since moved on to using vcpkg. which was also quite a pain relative to using other packages / libraries.

I must say I find the documentation very confusing. As a new user trying to read it, it feels like a TL;DR on steroids. Too many details, too many links. And it doesn't contain the most essential info such as how to make sure you have all the dependencies in the right place. For example, the windows build instruction simply tell you to invoke cmake. nothing about first downloading and installing the dependencies in the right place.

As for CMAKE_PREFIX_PATH, I did try to set it via the GUI. it did not work. as if it was somehow overridden. only after I manually changed the install path to something that is used internally to C:/Sys or something, it worked. But it was A PAIN. and required a lot of time.