From 8bdfede0a418ebaf43d18bd0750f18fdd012301c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 3 May 2016 02:28:16 -0400 Subject: cmake: document the common build/install steps #179 --- docs/README.CMAKE | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/README.CMAKE b/docs/README.CMAKE index 9c76d99..213a181 100644 --- a/docs/README.CMAKE +++ b/docs/README.CMAKE @@ -1,12 +1,13 @@ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -$Id$ -Tobuild GD using CMake, all you need is (add the cmake options if you need any + +To build GD using CMake, all you need is (add the cmake options if you need any or if the default libs and include paths are not the default) : -In a sub directory: +In a sub directory of the top level: $ mkdir bld $ cd bld -$ cmake -DBUILD_TEST=1 +$ cmake -DBUILD_TEST=1 .. +$ make The available options are: ENABLE_PNG=1 @@ -17,19 +18,25 @@ ENABLE_FONTCONFIG=1 ENABLE_XPM=1 ENABLE_WEBP=1 -You can optionnally run our tests suite using: +You can optionally run our tests suite using: $ ctest . Or if you like to build in the source tree: $ cmake -DBUILD_TEST=1 . +$ make $ ctest . Add "-DCMAKE_BUILD_TYPE=DEBUG" if you like to have a debug version. +To install, just run: +$ make install +Or to to install to a different path: +$ make install DESTDIR=/some/other/place Typical usage with only PNG enabled: -This command generates VS7 project files and add some custom libraries and includes directories (libpng in this case): +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 -- cgit v1.2.1