Windows build with cmake:
Author: David Burken
Last modified: 21 February 2013
This page is not complete yet...
Feedback welcome. Please send to the ossim mailing list at "ossim-developer AT lists.sourceforge.net" and reference this page.
Note: Windows command shell commands start with ":\>", unix commands start with $, anything else will be notes, comments. If you see a $ <some_command> The part after slash slash is a comment.
I put my build environment in a separate file that I source. I do this because I have more than one workspace, i.e. osgeo, geoeye, geoeye-dev. Usually I'll put this in D:\dev directory. Contents of ossim-vs10.bat file:
:: File: ossim-vs10.bat :: Forward slashes for use with cmake and nmake. set OSSIM_DEV_HOME_FS=D:/dev/vs10_x86 :: Backward Slash windows things. We'll use MS for MicroSoft. set OSSIM_DEV_HOME=D:\dev\vs10_x86 set OSSIM_DEPENDENCIES=%OSSIM_DEV_HOME%\local set OSSIM_HOME=%OSSIM_DEV_HOME%\ossim set OSSIM_PREFS_FILE=%OSSIM_DEV_HOME%\ossim-prefs set QTDIR=D:\Qt\4.8.4 set PATH=D:\cmake\cmake-18.104.22.168-win32-x86\bin;%OSSIM_DEV_HOME%\build\bin;%OSSIM_DEV_HOME%\local\bin;C:\Program Files (x86)\XEmacs\XEmacs-21.4.22\i586-pc-win32;%QTDIR%\bin;%PATH%
Make a workspace:
Top level, this is OSSIM_DEV_HOME:
D:\> mkdir dev\vs10_x64
ossim build dir:
D:\> cd dev\vs10_x64
D:\dev\vs10_x64> mkdir build
Sandbox for 3rd party dependencies:
D:\dev\vs10_x64> mkdir deps
Source the bat file for environment variables.
First time through check out code. Note I don't like to check out the whole trunk so I do pieces.
I always build geos, libtiff, geotiff, gdal from the latest. You don't have to, it's up to you. Most of these you can get from yum but I find the code is usually way behind.
NOTE: Things I build with cmake I use an "out of source" build so I put in a sub directory of the package.
Needed by ossim.
D:\> mkdir %OSSIM_DEV_HOME%\geos
D:\> cd %OSSIM_DEV_HOME%\geos
Get code from svn or optionally download a release.
D:\dev\vs10_x64\geos> svn co http://svn.osgeo.org/geos/trunk geos-svn
Make a cmake config script
D:\dev\vs10_x64\geos> xemacs geos-cmake-config.bat Use whatever editor you want, notepad, whatever...
Contents of script:
::--- :: File: geos-cmake-config.bat ::--- :: Development root dir: set dev=%OSSIM_DEV_HOME_FS% cmake -G "NMake Makefiles" ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_INSTALL_PREFIX=%dev%/deps ^ ../geos-svn
D:\dev\vs10_x64\geos> mkdir build "out of source" build dir
D:\dev\vs10_x64\geos> cd build
Run the cmake command to set up the build system:
Install to sandbox:
D:\dev\vs10_x64\geos\build> nmake install
End of GEOS