|
|
|
|
@ -3,6 +3,7 @@
|
|
|
|
|
|
|
|
|
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 |
|
|
|
|
Vladimír Vondruš <mosra@centrum.cz> |
|
|
|
|
Copyright © 2018 Jonathan Hale <squareys@googlemail.com> |
|
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a |
|
|
|
|
copy of this software and associated documentation files (the "Software"), |
|
|
|
|
@ -58,42 +59,46 @@ Various examples are provided by the @ref building-examples "Example repository"
|
|
|
|
|
@subsection building-packages-vcpkg Vcpkg packages on Windows |
|
|
|
|
|
|
|
|
|
Magnum is available as a [Vcpkg](https://github.com/Microsoft/vcpkg) package. |
|
|
|
|
After setting up Vcpkg like described in the README, you can install latest |
|
|
|
|
stable version of Magnum with all its dependencies like this: |
|
|
|
|
After setting up Vcpkg as described in their README, it is recommended to set |
|
|
|
|
the "default triplet". You can do this by setting the `VCPKG_DEFAULT_TRIPLET` |
|
|
|
|
variable, e.g. to `x64-windows` --- refer to the |
|
|
|
|
[documentation on triplets](https://vcpkg.readthedocs.io/en/latest/users/triplets/#additional-remarks) |
|
|
|
|
for other options. |
|
|
|
|
|
|
|
|
|
You can then install latest stable version of Magnum with all its dependencies |
|
|
|
|
like this: |
|
|
|
|
|
|
|
|
|
@code{.bat} |
|
|
|
|
vcpkg install magnum |
|
|
|
|
@endcode |
|
|
|
|
|
|
|
|
|
But often you may want to install the latest Git revision of all Magnum |
|
|
|
|
projects instead: |
|
|
|
|
Often you may want to install the latest Git revision of all Magnum projects |
|
|
|
|
instead: |
|
|
|
|
|
|
|
|
|
@code{.bat} |
|
|
|
|
vcpkg install corrade --head |
|
|
|
|
vcpkg install magnum --head |
|
|
|
|
vcpkg install --head corrade magnum |
|
|
|
|
@endcode |
|
|
|
|
|
|
|
|
|
This by default installs a 32-bit dynamic version of the package, you can use |
|
|
|
|
@cb{.bat} vcpkg install magnum:x64-windows @ce or |
|
|
|
|
@cb{.bat} vcpkg install magnum:x64-windows-static @ce to install a 64-bit |
|
|
|
|
(static) version instead. You can also use the `VCPKG_DEFAULT_TRIPLET` variable |
|
|
|
|
to change the default --- see the |
|
|
|
|
<a href="https://github.com/Microsoft/vcpkg/blob/master/docs/users/triplets.md">Vcpkg triplet documentation</a> |
|
|
|
|
for more information. |
|
|
|
|
|
|
|
|
|
Not all features are installed by default, only those that are implicitly |
|
|
|
|
Not all features are installed by default; only those that are implicitly |
|
|
|
|
enabled in @ref building-features together with @ref Platform::Sdl2Application "Sdl2Application". |
|
|
|
|
To opt-in or opt-out of additional features, you can use the following syntax; |
|
|
|
|
feature names are simply names of CMake `WITH_*` options but lowercase. See the |
|
|
|
|
<a href="https://github.com/Microsoft/vcpkg/blob/master/docs/specifications/feature-packages.md">feature documentation</a> |
|
|
|
|
for more information. |
|
|
|
|
feature names are simply names of CMake `WITH_*` options but lowercase, e.g.: |
|
|
|
|
|
|
|
|
|
@code{.bat} |
|
|
|
|
vcpkg install magnum[glfwapplication,tgaimporter] |
|
|
|
|
@endcode |
|
|
|
|
|
|
|
|
|
Packages installed using Vcpkg can be used straight away in Visual Studio --- |
|
|
|
|
all you need to do is to @cpp #include @ce the headers you want, the |
|
|
|
|
To install all features of a package, use `*`, e.g.: |
|
|
|
|
|
|
|
|
|
@code{.bat} |
|
|
|
|
vcpkg install magnum[*] |
|
|
|
|
@endcode |
|
|
|
|
|
|
|
|
|
For more information, see the |
|
|
|
|
[documentation on feature packages](https://vcpkg.readthedocs.io/en/latest/specifications/feature-packages/). |
|
|
|
|
|
|
|
|
|
Packages installed using Vcpkg can be used in Visual Studio straight away --- |
|
|
|
|
all you need to do is to @cpp #include @ce the headers you want and the |
|
|
|
|
buildsystem will do all needed library linking and setup behind the scenes |
|
|
|
|
automatically. <em>(Cool, isn't it?)</em> |
|
|
|
|
|
|
|
|
|
@ -109,8 +114,9 @@ mkdir build && cd build
|
|
|
|
|
cmake .. -DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake |
|
|
|
|
@endcode |
|
|
|
|
|
|
|
|
|
If you want to pass additional flags to CMake, run @cb{.bat} vcpkg edit magnum @ce |
|
|
|
|
and edit `OPTIONS` in @cmake vcpkg_configure_cmake() @ce. |
|
|
|
|
If you want Vcpkg to pass additional flags to CMake during installation of a |
|
|
|
|
package, use the `edit` command, e.g. @cb{.bat} vcpkg edit magnum @ce, and edit |
|
|
|
|
`OPTIONS` in @cmake vcpkg_configure_cmake() @ce. |
|
|
|
|
|
|
|
|
|
There is also a Vcpkg package for @ref building-plugins-packages-vcpkg "Magnum Plugins", |
|
|
|
|
@ref building-integration-packages-vcpkg "Magnum Integration" and |
|
|
|
|
|