Changes between Version 23 and Version 24 of BuildingOnUnixWithCMake


Ignore:
Timestamp:
Oct 4, 2018, 6:50:05 PM (6 years ago)
Author:
dbaston
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildingOnUnixWithCMake

    v23 v24  
    1313This article describes how to use [http://www.cmake.org CMake] build system to build and install GEOS from sources on Unix-like systems (Linux, Mac OS X, Solaris, *BSD, etc.) using GCC or any other supported compiler.
    1414
    15 GEOS has got equipped with build configuration for CMake shortly after [milestone:3.2.0 GEOS 3.2.0] release (ticket #317), thus it is considered as work in progress, experimental. Hopefully, it will get into next release of [milestone:3.3.0 GEOS 3.3.0] version.
     15The CMake configuration for GEOS was introduced shortly after the [milestone:3.2.0 GEOS 3.2.0] release (ticket #317).
    1616
    1717Having CMake installed on Unix-like system, there are two ways of [http://www.cmake.org/cmake/help/runningcmake.html running CMake] to configure and build a software with CMake:
     
    2121== Requirements ==
    2222
    23  * [http://www.cmake.org CMake] 2.6 or later
     23 * [http://www.cmake.org CMake] 4.1 or later
    2424 * Decent C++ compiler and C++ Standard Library, [http://gcc.gnu.org/ GNU GCC] 4.x or later recommended
    25  * GEOS source code. Currently, only source code in SVN [source:trunk trunk] is configured for CMake
     25 * GEOS source code.
    2626
    2727== Configure ==
    2828
    29 Building from SVN development branch requires to generate the `geos_svn_revision.h` file with POSIX shell script:
     29It is highly recommended to build GEOS outside of the source code tree. For this purpose, prepare a build directory (from now on referred to as ''BUILDDIR''):
    3030
    3131{{{
    32 tools\svn_repo_revision.sh
    33 }}}
    34 
    35 Alternatively, you can create `geos_svn_revision.h` file manually in the top directory of the source tree:
    36 
    37  * In the root directory of your copy of SVN trunk:
    38 {{{
    39 svn info
    40 }}}
    41  * Locate line starting with ''Revision'':
    42 {{{
    43 Revision: 3704
    44 }}}
    45  * Use the revision number (in the output above it is `3704`) to create `geos_svn_revision.h`:
    46 {{{
    47 echo '#define GEOS_SVN_REVISION 3704' > geos_svn_revision.h
    48 }}}
    49 
    50 Important, it is highly recommended to configure build out of source code tree. For this purpose, prepare build directory (from now on referred to as ''BUILDDIR''):
    51 
    52 {{{
    53 $ svn checkout http://svn.osgeo.org/geos/trunk trunk
     32$ git clone https://ghttps://git.osgeo.org/gitea/geos/geos.git
    5433$ mkdir build
    5534$ ls
    56 build trunk
     35build geos
    5736$ cd build
    58 $ cmake ../trunk
     37$ cmake ../geos
    5938$ make help
    6039}}}