Browse Source

doc: improve "Vcpkg packages on Windows" section of building.dox

Signed-off-by: Squareys <squareys@googlemail.com>
pull/272/merge
Jonathan Hale 8 years ago committed by Vladimír Vondruš
parent
commit
c8e3ee68db
  1. 50
      doc/building.dox

50
doc/building.dox

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

Loading…
Cancel
Save