mosra/magnum

How to point to a local installation of `corrade` without using the bootstrap project?

vittorioromeo opened this issue · 3 comments

I would like to build magnum with a local installation of corrade (i.e. a local build installed in an arbitrary folder on my system).

I can specify -DCORRADE_INCLUDE_DIR="/c/whatever/corrade/build/install/include, but CMake fails to find corrade-rc, Utility and other things. I tried specifying those manually, but FindCorrade doesn't expose all the required variables.

I propose adding a CORRADE_ROOT variable that can be pointed to "/c/whatever/corrade/build/install" in my case, and CORRADE_INCLUDE_DIR defaulted to ${CORRADE_ROOT}/include if CORRADE_ROOT is specified.

mosra commented

CMake has a <PackageName>_ROOT builtin since 3.12, but I'd have to enable policy CMP0074 to make that work. (I thought I already enabled it but apparently not, heh -- will do.) Then you could use Corrade_ROOT (not uppercase) and it'd "just work" without any other changes needed from my side.

Until then, putting the installation path to CMAKE_PREFIX_PATH should work, separate with semicolons if you have more of them. So for example -DCMAKE_PREFIX_PATH="/c/whatever/corrade/build/install;/c/whatever/magnum/build/install", or install everything into a single location.

mosra commented

Fixed in 888ba08, corresponding changes in other repos will follow.

Thank you for the quick turnaround!