| 1 | = Building on Windows with CMake and mingw64 chain = |
| 2 | *** this is still a work in progress ** |
| 3 | |
| 4 | You can use the regular CMake 32-bit binaries to build 64-bit and just extract somewhere: |
| 5 | http://cmake.org/cmake/resources/software.html (I used the zip file http://www.cmake.org/files/v2.8/cmake-2.8.10-win32-x86.zip and extracted to folder |
| 6 | latest now is http://www.cmake.org/files/v2.8/cmake-2.8.11-win32-x86.zip which should work fine and probably better and just extracted into folder C:\ming64\cmake-2.8.10.2-win32-x86 ) |
| 7 | |
| 8 | |
| 9 | == Configure == |
| 10 | |
| 11 | Building from SVN development branch requires to generate the `geos_svn_revision.h` file with POSIX shell script: |
| 12 | |
| 13 | {{{ |
| 14 | tools\svn_repo_revision.sh |
| 15 | }}} |
| 16 | |
| 17 | |
| 18 | {{{ |
| 19 | ## NOTE: for this I had to use some suggestions |
| 20 | ## from http://osgeo-org.1560.x6.nabble.com/Compiling-geos-with-mingw64-td5034567.html which are not committed yet |
| 21 | ## I was also using the mingw64 pre-compiled build - http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.8-release/ |
| 22 | ( x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z ) |
| 23 | |
| 24 | export PATH=".:/bin:/include:/mingw/bin:/mingw/include:/c/Windows/system32:/c/Windows:/usr/local/bin:/c/ming64/cmake-2.8.10.2-win32-x86/bin" |
| 25 | export PROJECTS=/c/ming64/projects |
| 26 | cd geos/geos-3.4 |
| 27 | export GEOS_VER=3.4.0dev |
| 28 | tools/svn_repo_revision.sh |
| 29 | rm -rf build/mingw |
| 30 | mkdir -p build/mingw |
| 31 | cd build/mingw |
| 32 | cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD} -DHAVE_STD_ISNAN=1 -DHAVE_LONG_LONG_INT_64=1 -DGEOS_ENABLE_INLINE=ON -DGEOS_ENABLE_TESTS=ON ../../ |
| 33 | make |
| 34 | make test |
| 35 | make check |
| 36 | make install |
| 37 | |
| 38 | strip ${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}/bin/*.dll |
| 39 | }}} |
| 40 | |
| 41 | |
| 42 | Output of tests should look something like |
| 43 | |
| 44 | {{{ |
| 45 | Running tests... |
| 46 | Test project C:/ming64/projects/geos/branches/geos-3.4/build/mingw |
| 47 | Start 1: geos_unit |
| 48 | 1/4 Test #1: geos_unit ........................ Passed 0.19 sec |
| 49 | Start 2: xmltester |
| 50 | 2/4 Test #2: xmltester ........................ Passed 6.72 sec |
| 51 | Start 3: bug234 |
| 52 | 3/4 Test #3: bug234 ........................... Passed 0.01 sec |
| 53 | Start 4: TestSweepLineSpeed |
| 54 | 4/4 Test #4: TestSweepLineSpeed ............... Passed 1.79 sec |
| 55 | |
| 56 | 100% tests passed, 0 tests failed out of 4 |
| 57 | |
| 58 | Total Test time (real) = 8.73 sec |
| 59 | Scanning dependencies of target check |
| 60 | Test project C:/ming64/projects/geos/branches/geos-3.4/build/mingw |
| 61 | Start 1: geos_unit |
| 62 | 1/4 Test #1: geos_unit ........................ Passed 0.14 sec |
| 63 | Start 2: xmltester |
| 64 | 2/4 Test #2: xmltester ........................ Passed 6.69 sec |
| 65 | Start 3: bug234 |
| 66 | 3/4 Test #3: bug234 ........................... Passed 0.01 sec |
| 67 | Start 4: TestSweepLineSpeed |
| 68 | 4/4 Test #4: TestSweepLineSpeed ............... Passed 1.78 sec |
| 69 | |
| 70 | 100% tests passed, 0 tests failed out of 4 |
| 71 | |
| 72 | Total Test time (real) = 8.63 sec |
| 73 | Built target check |
| 74 | }}} |
| 75 | |
| 76 | |
| 77 | = Open Tickets = |
| 78 | |
| 79 | [[TicketQuery(status=new|assigned|reopened&component~=cmake&order=priority)]] |