Changes between Version 1 and Version 2 of BuildingOnMINGW64CMake


Ignore:
Timestamp:
Jun 8, 2013, 11:55:32 AM (11 years ago)
Author:
robe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildingOnMINGW64CMake

    v1 v2  
    11= Building on Windows with CMake and mingw64 chain =
    2 *** this is still a work in progress **
     2## I was using the mingw64 pre-compiled build - http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.8-release/
     3( x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z ) but should work with any mingw64 build.
    34
    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 )
     5Just for reference my preferred structure -- the way I have setup so I can build both 32-bit and 64-bit is like so
     6
     7{{{
     8C:\ming64
     9     \projects
     10     \mingw64  (this is where I extract the binaries for mingw I download from mingw64 site)
     11     \msys  (this is where I put the msys posix environment details [here http://sourceforge.net/apps/trac/mingw-w64/wiki/MSYS] )
     12
     13C:\ming32
     14   \projects
     15   \msys  (exact copy of the above but I like to keep separate since some apps try to install local which gets stuck here)
     16   \mingw32 (this is where I put the mingw64-w32 binaries I get from mingw-w64 (32-bit personal builds) )
     17}}}
     18
     19
     20You can use the regular CMake 32-bit binaries to build 64-bit and just extract somewhere e.g. to root of
     21http://cmake.org/cmake/resources/software.html (
     22 latest now is http://www.cmake.org/files/v2.8/cmake-2.8.11-win32-x86.zip which should work fine   C:\ming64\cmake-2.8.10.2-win32-x86 )
    723
    824
    925== Configure ==
    1026
    11 Building from SVN development branch requires to generate the `geos_svn_revision.h` file with POSIX shell script:
     27Building from SVN development branch requires to generate the `geos_svn_revision.h` file with POSIX shell script.
     28I do this under msys but any posix should work fine.
    1229
    1330{{{
     
    1936## NOTE: for this I had to use some suggestions
    2037## 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 )
    2338
    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"
     39
     40I submitted the preliminary patch on ticket http://trac.osgeo.org/geos/ticket/630 (http://trac.osgeo.org/geos/attachment/ticket/630/geos3.4.0_cmake_mingw64.diff)
     41
     42export PATH=".:/bin:/include:/mingw/bin:/mingw/include:/c/Windows/system32:/c/Windows:/usr/local/bin:/c/ming64/cmake-2.8.11-win32-x86/bin"
    2543export PROJECTS=/c/ming64/projects
    26 cd geos/geos-3.4
     44cd geos/trunk
    2745export GEOS_VER=3.4.0dev
    2846tools/svn_repo_revision.sh
     
    3048mkdir -p build/mingw
    3149cd 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  ../../
     50
     51## if you are building with MSYS and 64-bit use this
     52## if building for windows 64-bit you need to force the -DHAVE_LONG_LONG_INT_64
     53##  because geos for some reason is can't figure this out
     54##  (for 32-bit you should leave it out)
     55## Also not that the -DGEOS_ENABLE_INLINE=ON should in theory work but doesn't seem to
     56## fully so it doesn't matter if you put it in since i have it hardcoded in my patch for mingw64
     57
     58cmake -G "MSYS Makefiles" ../trunk -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
    3359make
    3460make test