Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vittorioromeo opened this issue Mar 2, 2023 · 3 comments

Comments

@vittorioromeo
Copy link

vittorioromeo commented Mar 2, 2023

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 mosra added this to the 2023.0a milestone Mar 2, 2023
@mosra
Copy link
Owner

mosra commented Mar 2, 2023

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
Copy link
Owner

mosra commented Mar 2, 2023

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

@mosra mosra closed this as completed Mar 2, 2023
@vittorioromeo
Copy link
Author

Thank you for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants