diff options
author | Pierre Joye <pierre.php@gmail.com> | 2021-08-24 18:42:58 +0700 |
---|---|---|
committer | Pierre Joye <pierre.php@gmail.com> | 2021-08-24 18:42:58 +0700 |
commit | a70f4c385141af52b775fcd1e2056540144b1ea6 (patch) | |
tree | 6077bbc1497abef02805d4d0555d6b71ac8adbc1 /docs | |
parent | b61fc2dbad5d1a8c0b4f0cbfa0076d9938f723d3 (diff) | |
download | libgd-a70f4c385141af52b775fcd1e2056540144b1ea6.tar.gz |
add a section about using vcpkg to install the dependencies on windows (or other)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/README.CMAKE | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/docs/README.CMAKE b/docs/README.CMAKE index c9356b2..e964f4f 100644 --- a/docs/README.CMAKE +++ b/docs/README.CMAKE @@ -43,10 +43,30 @@ Typical usage with only PNG enabled: This command generates VS7 project files and add some custom libraries and includes directories (libpng in this case): -cmake -DCMAKE_GENERATOR="Visual Studio 7 .NET 2003" -DENABLE_PNG=1 -DCMAKE_LIBRARY_PATH=c:\gd_build\gd_deps\lib -DCMAKE_INCLUDE_PATH=c:\gd_build\gd_deps\include c:\libgd_src +cmake -DCMAKE_GENERATOR="Visual Studio 7 .NET 2003" + -DENABLE_PNG=1 -DCMAKE_LIBRARY_PATH=c:\gd_build\gd_deps\lib + -DCMAKE_INCLUDE_PATH=c:\gd_build\gd_deps\include c:\libgd_src A typical CMake call to build using the MinGW tools: cmake -G"MinGW Makefiles" -DCMAKE_LIBRARY_PATH=c:\mingw\lib -DCMAKE_INCLUDE_PATH=c:\MinGW\include -DENABLE_JPEG=On -DBUILD_TEST=On -DCMAKE_RELEASE_TYPE=DEBUG ..\libgd_head Given that your MinGW install is under c:\mingw and that you install all libraries using the /usr prefix + +vcpkg support add dependencies and library on Windows (or Linux/Mac/etc) +------------------------------------------------------------------------ + +Inside the development console, in the desired mode (see https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-160), to install +the required libraries, vcpkg can install them automatically. The steps are: + +1. Install vcpkg, see https://vcpkg.io/en/getting-started.html +2. Choose the vcpkg architecture + SET VCPKG_DEFAULT_TRIPLET="x64-windows" (or add pkgname:x64-windows) +3. install the dependencies needed for the build. F.e. + C:\vcpkg\vcpkg.exe install libpng libjpeg-turbo freetype tiff libheif libwebp +4. add -DCMAKE_TOOLCHAIN_FILE=[path to c:\path\to\vcpkg]\scripts\buildsystems\vcpkg.cmake + with the other desired cmake options + +It is then not needed to manually add CMAKE_INCLUDE_PATH or CMAKE_LIBRARY_PATH as options. + +See the https://vcpkg.io for more informations about vcpkg and how to customize an install.
\ No newline at end of file |