Version 4 (modified by mloskot, 8 years ago) (diff)

Started documenting building on Unix with CMake

Building on Unix with CMake

The following instructions are dedicated to users of Unix-like systems (Linux, Mac OS X, Solaris, *BSD, etc.)

This article describes how to use CMake build system to build and install GEOS from sources.

GEOS has got equipped with build configuration for CMake shortly after GEOS 3.2.0 release (ticket #317), thus it is considered as work in progress, experimental. Hopefully, it will get into next release of GEOS 3.3.0 version.


  • CMake 2.6 or later
  • Decent C++ compiler and C++ Standard Library, GNU GCC 4.x recommended
  • GEOS source code. Currently, only source code in SVN trunk is configured for CMake


Important, it is highly recommended to configure build out of source code tree.

 $ svn checkout trunk
 $ mkdir build
 $ ls
 build trunk
 $ cd build
 $ cmake ../trunk

There is collection of CMake variables available to set by user to control various aspects of compilation and installation. For instance CMAKE_INSTALL_PREFIX variable which by default is set to /usr/local directory.


$ make