Changes between Version 7 and Version 8 of BuildingOnWindowsWithCMake
- Timestamp:
- Jan 7, 2012, 1:21:19 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildingOnWindowsWithCMake
v7 v8 10 10 This article describes how to use CMake build system to build and install GEOS from sources on Microsoft Windows systems using Visual C++ compiler. 11 11 ---- 12 Get ''cmake-2.8.2-win32-x86.zip'' from [http://www.cmake.org/cmake/resources/software.html CMake download] page 13 explode it on a path (eg: c:\cmake\") and add to the path the ../bin directory 14 eg: 12 13 Download and install [http://www.cmake.org/ CMake] 2.8+. 14 15 If you install from zip package, unpack it (eg: into "C:\cmake\") and add the bin directory to the PATH: 16 {{{ 15 17 SET PATH=c:\cmake\cmake-2.8.2-win32-x86\bin;%PATH% 16 after this start a shell dos. 18 }}} 17 19 18 A lternatively, download fully-featured Windows installer package (e.g. ''cmake-2.8.2-win32-x86.exe'') and select option adding CMake runtime location to PATH environment variable.20 After this, start command prompt (cmd.exe). 19 21 20 In order to create the project with cmake do this: 22 Alternatively, install from the fully-featured Windows installer and select option adding CMake runtime location to PATH environment variable. 21 23 22 suppose for example the geos-trunk was downloaded in "c:\svn" 23 you may create a new folder like "c:\test_geos" 24 enter in "c:\test_geos" and run the command for the compiler you like use: 25 (please notice the / instead of \) 24 In order to create the project with cmake do this: suppose for example the GEOS trunk was downloaded in "C:\svn\geos-trunk" you may create a new folder like "C:\test_geos" enter in "C:\test_geos" and run the command for the compiler you like use: 26 25 27 c:\test_geo> cmake -G "Visual Studio 9 2008" ../svn 26 {{{ 27 C:\> cd test_geo 28 C:\test_geo> cmake -G "Visual Studio 9 2008" C:\svn\geos-trunk 29 }}} 28 30 29 31 or 30 32 31 c:\test_geo>cmake -G "Visual Studio 9 2008 Win64" ../svn 33 {{{ 34 C:\test_geo> cmake -G "Visual Studio 9 2008 Win64" c:\svn\geos-trunk 35 }}} 32 36 33 37 or 34 38 35 c:\test_geo>cmake -G "NMake Makefiles" ../svn 39 {{{ 40 c:\test_geo> cmake -G "NMake Makefiles" ../svn 41 }}} 36 42 37 with these commands cmake creates a VS nmake or solution file in the folder "c:\test_geos" able to compile GEOS43 with these commands cmake creates a NMAKE makefiles or Visual Studio solution and projects in the folder "c:\test_geos". 38 44 45 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: 46 47 {{{ 48 c:\test_geo> nmake /f makefile 49 }}} 50 51 or 52 53 {{{ 54 c:\test_geo> msbuild GEOS.sln 55 }}} 39 56 40 57 = Open Tickets =