mosra / magnum

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

How to build from source on MSYS2 MINGW64? #621

Closed ghost closed 1 year ago

ghost commented 1 year ago

I cloned with git clone --recursive https://github.com/mosra/magnum

Then I run cmake configuration as normal and it failed with:

-- Building for: Ninja
-- The CXX compiler identification is GNU 13.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/msys64/ucrt64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at C:/msys64/ucrt64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Corrade (missing: CORRADE_INCLUDE_DIR
  _CORRADE_CONFIGURE_FILE)
Call Stack (most recent call first):
  C:/msys64/ucrt64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  modules/FindCorrade.cmake:311 (find_package_handle_standard_args)
  CMakeLists.txt:65 (find_package)

-- Configuring incomplete, errors occurred!
mosra commented 1 year ago

Hi!

You need to build & install Corrade first. The dependencies aren't bundled in any way as Magnum spans across several repositories and there's no "top level" project.

But -- since you're on MSYS -- the best is probably to just use the packages. That also ensures all 3rd party dependencies for import/export plugins etc. are installed. See the corresponding sections in the docs for details, you'll want to build the development PKGBUILD and not the latest stable release:

Plugins, integration, extras and bindings repos contain similar packages. Hope this helps! :)