前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >​Status Notice ¶​

​Status Notice ¶​

作者头像
用户3519280
发布2023-07-08 10:38:05
1250
发布2023-07-08 10:38:05
举报
文章被收录于专栏:c++ 学习分享

Status Notice ¶

The CMake build configuration is a community-maintained non-officially supported build setup for GEOS. All GEOS users who aim to rely on CMake, please respect Sandro's request stated in comment on ticket #576 :

*** The official build system is the GNU Automake one (for versions prior to GEOS 3.5). Starting at GEOS 3.5, we officially also support CMake. We will happily accept tickets for GEOS 3.5 against CMake. We would appreciate a patch if you have one, but not required.. ***

Building on Windows with CMake

This article describes how to use CMake build system to build and install GEOS from sources on Microsoft Windows systems using Visual C++ compiler.


Download and install ​CMake 2.8+. Executables can be downloaded from ​http://www.cmake.org/cmake/resources/software.html

If you install from zip package, unpack it (eg: into "C:\cmake\") and add the bin directory to the PATH:

代码语言:javascript
复制
SET PATH=c:\cmake\cmake-2.8.2-win32-x86\bin;%PATH%

After this, start command prompt (cmd.exe).

Building from SVN development branch requires to generate the geos_svn_revision.h file with POSIX shell script:

代码语言:javascript
复制
tools\svn_repo_revision.sh

Notice, tools\svn_repo_revision.sh is a Bash script, so you need Bash some means to run Bash scripts on Windows.

Alternatively, you can create geos_svn_revision.h file manually in the top directory of the source tree:

  • In the root directory of your copy of SVN trunk: svn info
  • Locate line starting with Revision: Revision: 3704
  • Use the revision number (in the output above it is 3704) to create geos_svn_revision.h: echo #define GEOS_SVN_REVISION 3704 > geos_svn_revision.h

Alternatively, install from the fully-featured Windows installer and select option adding CMake runtime location to PATH environment variable.

In order to create the project with cmake do this: suppose for example the GEOS trunk was downloaded in "C:\geos\trunk" you may create a new folder like "C:\geos\build" enter in "C:\geos\build" and run the command for the compiler you like use:

代码语言:javascript
复制
C:\> cd geos\build
C:\geos\build> cmake -G "Visual Studio 9 2008" C:\geos\trunk

or

代码语言:javascript
复制
C:\geos\build> cmake -G "Visual Studio 9 2008 Win64" ..\trunk

or

代码语言:javascript
复制
C:\geos\build> cmake -G "NMake Makefiles" C:\geos\trunk

with these commands cmake creates a NMAKE makefiles or Visual Studio solution and projects in the folder "C:\geos\build".

Now you are able to build GEOS by loading GEOS.sln in Visual Studio IDE or from command line (use Visual Studio Command Prompt), depending on target CMake generator used in previous steps:

代码语言:javascript
复制
C:\geos\build> nmake /f makefile

or

代码语言:javascript
复制
C:\geos\build> msbuild GEOS.sln

Open Tickets

#935

incorrect cmake instruction

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021-10-19,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Status Notice ¶
  • Building on Windows with CMake
  • Open Tickets
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档