Changes between Version 23 and Version 24 of BuildingOnUnixWithCMake
- Timestamp:
- Oct 4, 2018, 6:50:05 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildingOnUnixWithCMake
v23 v24 13 13 This 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. 14 14 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.15 The CMake configuration for GEOS was introduced shortly after the [milestone:3.2.0 GEOS 3.2.0] release (ticket #317). 16 16 17 17 Having 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: … … 21 21 == Requirements == 22 22 23 * [http://www.cmake.org CMake] 2.6or later23 * [http://www.cmake.org CMake] 4.1 or later 24 24 * 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 CMake25 * GEOS source code. 26 26 27 27 == Configure == 28 28 29 Building from SVN development branch requires to generate the `geos_svn_revision.h` file with POSIX shell script:29 It 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''): 30 30 31 31 {{{ 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 54 33 $ mkdir build 55 34 $ ls 56 build trunk35 build geos 57 36 $ cd build 58 $ cmake ../ trunk37 $ cmake ../geos 59 38 $ make help 60 39 }}}