Howto:Build 3rdParty library for Windows
Jump to navigation
Jump to search
FlightGear require some 3rd party libraries, sometimes these library require to be updated, here are 2 scripts (one for x86 + one for x64) who build most of these library. You just need to update the source of the library in order to update the package (and apply any required change if needed, e.g: xcopy *.h file, compilation options...)
build_3rdparty.x64.bat:
set "WORKSPACE=%CD%"
set "CGAL_PATH=C:\Program Files\CGAL-4.3"
md %WORKSPACE%\3rdParty.x64\bin
md %WORKSPACE%\3rdParty.x64\lib
md %WORKSPACE%\3rdParty.x64\include
call "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
GOTO SkipMe
REM ############################# Download & compile ZLIB
curl http://zlib.net/zlib128.zip -o %WORKSPACE%/zlib.zip
unzip %WORKSPACE%/zlib.zip
mv -f %WORKSPACE%/zlib-1.2.8 %WORKSPACE%/zlib-source
cd %WORKSPACE%
md zlib-build
cd zlib-build
cmake ..\zlib-source -G "Visual Studio 10 Win64" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\zlib-build\build"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\zlib-build\build\include\* %WORKSPACE%\3rdParty.x64\include /y /s /q
xcopy %WORKSPACE%\zlib-build\build\lib\zlib.lib %WORKSPACE%\3rdParty.x64\lib /y /q
xcopy %WORKSPACE%\zlib-build\build\bin\zlib.dll %WORKSPACE%\3rdParty.x64\bin /y /q
cd %WORKSPACE%
REM ############################# Download & compile LIBTIFF
curl http://download.osgeo.org/libtiff/tiff-4.0.3.zip -o %WORKSPACE%/libtiff.zip
unzip %WORKSPACE%/libtiff.zip
mv -f %WORKSPACE%/tiff-4.0.3 %WORKSPACE%/libtiff-source
cd %WORKSPACE%/libtiff-source
nmake -f makefile.vc
cd %WORKSPACE%
xcopy %WORKSPACE%\libtiff-source\libtiff\libtiff.lib %WORKSPACE%\3rdParty.x64\lib\ /y /f
xcopy %WORKSPACE%\libtiff-source\libtiff\libtiff_i.lib %WORKSPACE%\3rdParty.x64\lib\ /y /f
xcopy %WORKSPACE%\libtiff-source\libtiff\libtiff.dll %WORKSPACE%\3rdParty.x64\bin\ /y /f
xcopy %WORKSPACE%\libtiff-source\libtiff\tiff.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libtiff-source\libtiff\tiffconf.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libtiff-source\libtiff\tiffio.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libtiff-source\libtiff\tiffvers.h %WORKSPACE%\3rdParty.x64\include\ /y /f
cd %WORKSPACE%
REM ############################# Download & compile LIBPNG
curl -L http://download.sourceforge.net/libpng/lpng1610.zip -o %WORKSPACE%/libpng.zip
unzip %WORKSPACE%/libpng.zip
mv -f %WORKSPACE%/lpng1610 %WORKSPACE%/libpng-source
cd %WORKSPACE%
md libpng-build
cd libpng-build
cmake ..\libpng-source -G "Visual Studio 10 Win64" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\libpng-build\build" -DCMAKE_PREFIX_PATH:PATH="%WORKSPACE%\3rdParty.x64"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\libpng-build\build\include\*.h %WORKSPACE%\3rdParty.x64\include /y
xcopy %WORKSPACE%\libpng-build\build\lib\libpng16.lib %WORKSPACE%\3rdParty.x64\lib /y
xcopy %WORKSPACE%\libpng-build\build\bin\libpng16.dll %WORKSPACE%\3rdParty.x64\bin /y
cd %WORKSPACE%
REM ############################# Download & compile LIBJPEG
curl http://www.ijg.org/files/jpegsr9a.zip -o %WORKSPACE%/libjpeg.zip
unzip %WORKSPACE%/libjpeg.zip
mv -f %WORKSPACE%/jpeg-9a %WORKSPACE%/libjpeg-source
cd %WORKSPACE%/libjpeg-source
nmake -f makefile.vc setup-v10
sed -i "s/Win32/x64/g" jpeg.sln
sed -i "s/Win32/x64/g" jpeg.vcxproj
msbuild jpeg.sln /t:Build /p:Configuration=Release;Platform=x64
xcopy %WORKSPACE%\libjpeg-source\x64\Release\jpeg.lib %WORKSPACE%\3rdParty.x64\lib /y /s /q
xcopy %WORKSPACE%\libjpeg-source\jconfig.h %WORKSPACE%\3rdParty.x64\include /y /s /q
xcopy %WORKSPACE%\libjpeg-source\jerror.h %WORKSPACE%\3rdParty.x64\include /y /s /q
xcopy %WORKSPACE%\libjpeg-source\jmorecfg.h %WORKSPACE%\3rdParty.x64\include /y /s /q
xcopy %WORKSPACE%\libjpeg-source\jpeglib.h %WORKSPACE%\3rdParty.x64\include /y /s /q
cd %WORKSPACE%
REM ############################# Download & compile LIBCURL
curl http://curl.haxx.se/download/curl-7.35.0.zip -o %WORKSPACE%/libcurl.zip
unzip %WORKSPACE%/libcurl.zip
mv -f %WORKSPACE%/curl-7.35.0 %WORKSPACE%/libcurl-source
cd %WORKSPACE%
md libcurl-build
cd libcurl-build
cmake ..\libcurl-source -G "Visual Studio 10 Win64" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\libcurl-build\build" -DCMAKE_PREFIX_PATH:PATH="%WORKSPACE%\3rdParty.x64"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\libcurl-build\build\include\* %WORKSPACE%\3rdParty.x64\include /y /s /q
xcopy %WORKSPACE%\libcurl-build\build\lib\libcurl_imp.lib %WORKSPACE%\3rdParty.x64\lib /y /q
xcopy %WORKSPACE%\libcurl-build\build\lib\libcurl.dll %WORKSPACE%\3rdParty.x64\bin /y /q
cd %WORKSPACE%
REM ############################# Download & compile GDAL
svn co https://svn.osgeo.org/gdal/trunk/gdal %WORKSPACE%/libgdal-source
cd %WORKSPACE%/libgdal-source
nmake -f makefile.vc MSVC_VER=1600 GDAL_HOME=%WORKSPACE%/libgdal-source BINDIR=%WORKSPACE%\3rdParty.x64\bin LIBDIR=%WORKSPACE%\3rdParty.x64\lib INCDIR=%WORKSPACE%\3rdParty.x64\include WIN64=YES
cd %WORKSPACE%
xcopy %WORKSPACE%\libgdal-source\gcore\gdal.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\gcore\gdal_frmts.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\gcore\gdal_proxy.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\gcore\gdal_priv.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\gcore\gdal_version.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\alg\gdal_alg.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\alg\gdalwarper.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\frmts\vrt\gdal_vrt.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\ogr\ogr*.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\port\cpl*.h %WORKSPACE%\3rdParty.x64\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\gdal_i.lib %WORKSPACE%\3rdParty.x64\lib\ /y /f
xcopy %WORKSPACE%\libgdal-source\gdal.lib %WORKSPACE%\3rdParty.x64\lib\ /y /f
xcopy %WORKSPACE%\libgdal-source\gdal*.dll %WORKSPACE%\3rdParty.x64\bin\ /y /f
cd %WORKSPACE%
REM ############################# Download & compile LIBFLTK
curl http://fltk.org/pub/fltk/1.3.2/fltk-1.3.2-source.tar.gz -o %WORKSPACE%/libfltk.tar.gz
tar xzvf libfltk.tar.gz
mv -f %WORKSPACE%/fltk-1.3.2 %WORKSPACE%/libfltk-source
cd %WORKSPACE%
md libfltk-build
cd libfltk-build
cmake ..\libfltk-source -G "Visual Studio 10 Win64" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\libfltk-build\build" -DCMAKE_PREFIX_PATH:PATH="%WORKSPACE%\3rdParty.x64"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\libfltk-build\build\include\* %WORKSPACE%\3rdParty.x64\include /y /s /q
xcopy %WORKSPACE%\libfltk-build\build\bin\* %WORKSPACE%\3rdParty.x64\bin /y /s /q
xcopy %WORKSPACE%\libfltk-build\build\lib\fltk*.lib %WORKSPACE%\3rdParty.x64\lib /y /s /q
cd %WORKSPACE%
REM ############################# Download & compile LIBBOOST
curl http://flightgear.simpits.org:8080/job/Boost-Win64/lastSuccessfulBuild/artifact/*zip*/archive.zip -o %WORKSPACE%/libboost.zip
unzip libboost.zip
mv %WORKSPACE%\archive\Boost %WORKSPACE%\Boost
rmdir %WORKSPACE%\archive
cd %WORKSPACE%
REM ############################# Download & compile CGAL
curl https://gforge.inria.fr/frs/download.php/32996/CGAL-4.3.zip -o %WORKSPACE%/libcgal.zip
unzip %WORKSPACE%/libcgal.zip
mv -f %WORKSPACE%/CGAL-4.3 %WORKSPACE%/libcgal-source
:SkipMe
cd %WORKSPACE%\Boost\
mv lib64 lib
md include\boost-1_55
mv boost include\boost-1_55\boost
xcopy "%CGAL_PATH%"\auxiliary\gmp\include\* %WORKSPACE%\libcgal-source\auxiliary\gmp\include /s /y /i
xcopy "%CGAL_PATH%"\auxiliary\gmp\lib64\* %WORKSPACE%\libcgal-source\auxiliary\gmp\lib /s /y /i
cd %WORKSPACE%
md libcgal-build
cd libcgal-build
cmake ..\libcgal-source -G "Visual Studio 10 Win64" -DCMAKE_PREFIX_PATH="%WORKSPACE%\cgal-source\auxiliary\gmp;%WORKSPACE%\Boost" -DCGAL_Boost_USE_STATIC_LIBS:BOOL=ON -DZLIB_LIBRARY="%WORKSPACE%\3rdParty.x64\lib\zlib.lib" -DZLIB_INCLUDE_DIR="%WORKSPACE%\3rdParty.x64\include" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\libcgal-build\build"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\libcgal-build\build\include\* %WORKSPACE%\3rdParty.x64\include /y /s /q
xcopy %WORKSPACE%\libcgal-build\build\bin\*.dll %WORKSPACE%\3rdParty.x64\bin /y /s /q
xcopy %WORKSPACE%\libcgal-build\build\lib\*.lib %WORKSPACE%\3rdParty.x64\lib /y /s /q
xcopy %WORKSPACE%\libcgal-source\auxiliary\gmp\lib\*.dll %WORKSPACE%\3rdParty.x64\bin /s /y /q
xcopy %WORKSPACE%\libcgal-source\auxiliary\gmp\lib\*.lib %WORKSPACE%\3rdParty.x64\lib /s /y /q
cd %WORKSPACE%
REM ############################# Download & compile FREETYPE
curl -L http://sourceforge.net/projects/freetype/files/freetype2/2.5.3/ft253.zip/download -o %WORKSPACE%/freetype.zip
unzip freetype.zip
mv -f %WORKSPACE%/freetype-2.5.3 %WORKSPACE%/freetype-source
cd %WORKSPACE%
md freetype-build
cd freetype-build
cmake ..\freetype-source -G "Visual Studio 10 Win64" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%/freetype-build/build" -DCMAKE_PREFIX_PATH:PATH="%WORKSPACE%/3rdParty.x64"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\freetype-build\build\* %WORKSPACE%\3rdParty.x64 /y /s /q
cd %WORKSPACE%
REM ############################# Download & compile LIBPROJ
curl http://download.osgeo.org/proj/proj-4.8.0.zip -o libproj.zip
unzip libproj.zip
mv -f proj-4.8.0 libproj-source
cd %WORKSPACE%/libproj-source
nmake -f makefile.vc
xcopy %WORKSPACE%\libproj-source\src\*.lib %WORKSPACE%\3rdParty.x64\lib /s /y /q
xcopy %WORKSPACE%\libproj-source\src\*.dll %WORKSPACE%\3rdParty.x64\bin /s /y /q
xcopy %WORKSPACE%\libproj-source\src\proj_api.h %WORKSPACE%\3rdParty.x64\include /s /y /q
cd %WORKSPACE%
REM ############################# Download & compile LIBGEOS
curl http://download.osgeo.org/geos/geos-3.4.2.tar.bz2 -o %WORKSPACE%/libgeos.tar.bz2
tar xvjf libgeos.tar.bz2
mv -f geos-3.4.2 libgeos-source
cd %WORKSPACE%
md libgeos-build
cd libgeos-build
cmake ..\libgeos-source -G "Visual Studio 10 Win64" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\libgeos-build\build"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\libgeos-build\build\bin\geos_c.dll %WORKSPACE%\3rdParty.x64\bin /s /y /q
xcopy %WORKSPACE%\libgeos-build\build\lib\geos_c.lib %WORKSPACE%\3rdParty.x64\lib /s /y /q
xcopy %WORKSPACE%\libgeos-build\build\include\geos_c.h %WORKSPACE%\3rdParty.x64\include /s /y /q
cd %WORKSPACE%
REM ############################# Download & compile LIBEXPAT
curl -L http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz/download -o %WORKSPACE%/libexpat.tar.gz
tar xzvf libexpat.tar.gz
mv -f expat-2.1.0 libexpat-source
cd %WORKSPACE%
md libexpat-build
cd libexpat-build
cmake ..\libexpat-source -G "Visual Studio 10 Win64" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\libexpat-build\build"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\libexpat-build\build\bin\expat.dll %WORKSPACE%\3rdParty.x64\bin /s /y /q
xcopy %WORKSPACE%\libexpat-build\build\lib\expat.lib %WORKSPACE%\3rdParty.x64\lib /s /y /q
xcopy %WORKSPACE%\libexpat-build\build\include\* %WORKSPACE%\3rdParty.x64\include /s /y /q
:SkipMe
build_3rdparty.bat:
set "WORKSPACE=%CD%"
set "CGAL_PATH=C:\Program Files\CGAL-4.3"
md %WORKSPACE%\3rdParty\bin
md %WORKSPACE%\3rdParty\lib
md %WORKSPACE%\3rdParty\include
call "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
REM GOTO SkipMe
REM ############################# Download & compile ZLIB
curl http://zlib.net/zlib128.zip -o %WORKSPACE%/zlib.zip
unzip %WORKSPACE%/zlib.zip
mv -f %WORKSPACE%/zlib-1.2.8 %WORKSPACE%/zlib-source
cd %WORKSPACE%
md zlib-build
cd zlib-build
cmake ..\zlib-source -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\zlib-build\build"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\zlib-build\build\include\* %WORKSPACE%\3rdParty\include /y /s /q
xcopy %WORKSPACE%\zlib-build\build\lib\zlib.lib %WORKSPACE%\3rdParty\lib /y /q
xcopy %WORKSPACE%\zlib-build\build\bin\zlib.dll %WORKSPACE%\3rdParty\bin /y /q
cd %WORKSPACE%
REM ############################# Download & compile LIBTIFF
curl http://download.osgeo.org/libtiff/tiff-4.0.3.zip -o %WORKSPACE%/libtiff.zip
unzip %WORKSPACE%/libtiff.zip
mv -f %WORKSPACE%/tiff-4.0.3 %WORKSPACE%/libtiff-source
cd %WORKSPACE%/libtiff-source
nmake -f makefile.vc
cd %WORKSPACE%
xcopy %WORKSPACE%\libtiff-source\libtiff\libtiff.lib %WORKSPACE%\3rdParty\lib\ /y /f
xcopy %WORKSPACE%\libtiff-source\libtiff\libtiff_i.lib %WORKSPACE%\3rdParty\lib\ /y /f
xcopy %WORKSPACE%\libtiff-source\libtiff\libtiff.dll %WORKSPACE%\3rdParty\bin\ /y /f
xcopy %WORKSPACE%\libtiff-source\libtiff\tiff.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libtiff-source\libtiff\tiffconf.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libtiff-source\libtiff\tiffio.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libtiff-source\libtiff\tiffvers.h %WORKSPACE%\3rdParty\include\ /y /f
cd %WORKSPACE%
REM ############################# Download & compile LIBPNG
curl -L http://download.sourceforge.net/libpng/lpng1610.zip -o %WORKSPACE%/libpng.zip
unzip %WORKSPACE%/libpng.zip
mv -f %WORKSPACE%/lpng1610 %WORKSPACE%/libpng-source
cd %WORKSPACE%
md libpng-build
cd libpng-build
cmake ..\libpng-source -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\libpng-build\build" -DCMAKE_PREFIX_PATH:PATH="%WORKSPACE%\3rdParty"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\libpng-build\build\include\*.h %WORKSPACE%\3rdParty\include /y
xcopy %WORKSPACE%\libpng-build\build\lib\libpng16.lib %WORKSPACE%\3rdParty\lib /y
xcopy %WORKSPACE%\libpng-build\build\bin\libpng16.dll %WORKSPACE%\3rdParty\bin /y
cd %WORKSPACE%
REM ############################# Download & compile LIBJPEG
REM curl http://www.ijg.org/files/jpegsr9a.zip -o %WORKSPACE%/libjpeg.zip
unzip %WORKSPACE%/libjpeg.zip
mv -f %WORKSPACE%/jpeg-9a %WORKSPACE%/libjpeg-source
cd %WORKSPACE%/libjpeg-source
nmake -f makefile.vc setup-v10
msbuild jpeg.sln /t:Build /p:Configuration=Release;Platform=Win32
xcopy %WORKSPACE%\libjpeg-source\Release\jpeg.lib %WORKSPACE%\3rdParty\lib /y /s /q
xcopy %WORKSPACE%\libjpeg-source\jconfig.h %WORKSPACE%\3rdParty\include /y /s /q
xcopy %WORKSPACE%\libjpeg-source\jerror.h %WORKSPACE%\3rdParty\include /y /s /q
xcopy %WORKSPACE%\libjpeg-source\jmorecfg.h %WORKSPACE%\3rdParty\include /y /s /q
xcopy %WORKSPACE%\libjpeg-source\jpeglib.h %WORKSPACE%\3rdParty\include /y /s /q
cd %WORKSPACE%
REM ############################# Download & compile LIBCURL
curl http://curl.haxx.se/download/curl-7.35.0.zip -o %WORKSPACE%/libcurl.zip
unzip %WORKSPACE%/libcurl.zip
mv -f %WORKSPACE%/curl-7.35.0 %WORKSPACE%/libcurl-source
cd %WORKSPACE%
md libcurl-build
cd libcurl-build
cmake ..\libcurl-source -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\libcurl-build\build" -DCMAKE_PREFIX_PATH:PATH="%WORKSPACE%\3rdParty"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\libcurl-build\build\include\* %WORKSPACE%\3rdParty\include /y /s /q
xcopy %WORKSPACE%\libcurl-build\build\lib\libcurl_imp.lib %WORKSPACE%\3rdParty\lib /y /q
xcopy %WORKSPACE%\libcurl-build\build\lib\libcurl.dll %WORKSPACE%\3rdParty\bin /y /q
cd %WORKSPACE%
REM ############################# Download & compile GDAL
svn co https://svn.osgeo.org/gdal/trunk/gdal %WORKSPACE%/libgdal-source
cd %WORKSPACE%/libgdal-source
nmake -f makefile.vc MSVC_VER=1600 GDAL_HOME=%WORKSPACE%/libgdal-source BINDIR=%WORKSPACE%\3rdParty\bin LIBDIR=%WORKSPACE%\3rdParty\lib INCDIR=%WORKSPACE%\3rdParty\include
cd %WORKSPACE%
xcopy %WORKSPACE%\libgdal-source\gcore\gdal.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\gcore\gdal_frmts.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\gcore\gdal_proxy.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\gcore\gdal_priv.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\gcore\gdal_version.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\alg\gdal_alg.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\alg\gdalwarper.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\frmts\vrt\gdal_vrt.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\ogr\ogr*.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\port\cpl*.h %WORKSPACE%\3rdParty\include\ /y /f
xcopy %WORKSPACE%\libgdal-source\gdal_i.lib %WORKSPACE%\3rdParty\lib\ /y /f
xcopy %WORKSPACE%\libgdal-source\gdal.lib %WORKSPACE%\3rdParty\lib\ /y /f
xcopy %WORKSPACE%\libgdal-source\gdal*.dll %WORKSPACE%\3rdParty\bin\ /y /f
cd %WORKSPACE%
REM ############################# Download & compile LIBFLTK
curl http://fltk.org/pub/fltk/1.3.2/fltk-1.3.2-source.tar.gz -o %WORKSPACE%/libfltk.tar.gz
tar xzvf libfltk.tar.gz
mv -f %WORKSPACE%/fltk-1.3.2 %WORKSPACE%/libfltk-source
cd %WORKSPACE%
md libfltk-build
cd libfltk-build
cmake ..\libfltk-source -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\libfltk-build\build" -DCMAKE_PREFIX_PATH:PATH="%WORKSPACE%\3rdParty"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\libfltk-build\build\include\* %WORKSPACE%\3rdParty\include /y /s /q
xcopy %WORKSPACE%\libfltk-build\build\bin\* %WORKSPACE%\3rdParty\bin /y /s /q
xcopy %WORKSPACE%\libfltk-build\build\lib\fltk*.lib %WORKSPACE%\3rdParty\lib /y /s /q
cd %WORKSPACE%
REM ############################# Download & compile LIBBOOST
curl http://flightgear.simpits.org:8080/job/Boost-Win/lastSuccessfulBuild/artifact/*zip*/archive.zip -o %WORKSPACE%/libboost.zip
unzip libboost.zip
mv %WORKSPACE%\archive\Boost %WORKSPACE%\Boost
rmdir %WORKSPACE%\archive
cd %WORKSPACE%
REM ############################# Download & compile CGAL
curl https://gforge.inria.fr/frs/download.php/32996/CGAL-4.3.zip -o %WORKSPACE%/libcgal.zip
unzip %WORKSPACE%/libcgal.zip
mv -f %WORKSPACE%/CGAL-4.3 %WORKSPACE%/libcgal-source
cd %WORKSPACE%\Boost\
md include\boost-1_55
mv boost include\boost-1_55\boost
xcopy "%CGAL_PATH%"\auxiliary\gmp\include\* %WORKSPACE%\libcgal-source\auxiliary\gmp\include /s /y /i
xcopy "%CGAL_PATH%"\auxiliary\gmp\lib32\* %WORKSPACE%\libcgal-source\auxiliary\gmp\lib /s /y /i
cd %WORKSPACE%
md libcgal-build
cd libcgal-build
cmake ..\libcgal-source -G "Visual Studio 10" -DCMAKE_PREFIX_PATH="%WORKSPACE%\cgal-source\auxiliary\gmp;%WORKSPACE%\Boost" -DCGAL_Boost_USE_STATIC_LIBS:BOOL=ON -DZLIB_LIBRARY="%WORKSPACE%\3rdParty\lib\zlib.lib" -DZLIB_INCLUDE_DIR="%WORKSPACE%\3rdParty\include" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\libcgal-build\build"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\libcgal-build\build\include\* %WORKSPACE%\3rdParty\include /y /s /q
xcopy %WORKSPACE%\libcgal-build\build\bin\*.dll %WORKSPACE%\3rdParty\bin /y /s /q
xcopy %WORKSPACE%\libcgal-build\build\lib\*.lib %WORKSPACE%\3rdParty\lib /y /s /q
xcopy %WORKSPACE%\libcgal-source\auxiliary\gmp\lib\*.dll %WORKSPACE%\3rdParty\bin /s /y /q
xcopy %WORKSPACE%\libcgal-source\auxiliary\gmp\lib\*.lib %WORKSPACE%\3rdParty\lib /s /y /q
cd %WORKSPACE%
REM ############################# Download & compile FREETYPE
curl -L http://sourceforge.net/projects/freetype/files/freetype2/2.5.3/ft253.zip/download -o %WORKSPACE%/freetype.zip
unzip freetype.zip
mv -f %WORKSPACE%/freetype-2.5.3 %WORKSPACE%/freetype-source
cd %WORKSPACE%
md freetype-build
cd freetype-build
cmake ..\freetype-source -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%/freetype-build/build" -DCMAKE_PREFIX_PATH:PATH="%WORKSPACE%/3rdParty"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\freetype-build\build\* %WORKSPACE%\3rdParty /y /s /q
cd %WORKSPACE%
REM ############################# Download & compile LIBPROJ
curl http://download.osgeo.org/proj/proj-4.8.0.zip -o libproj.zip
unzip libproj.zip
mv -f proj-4.8.0 libproj-source
cd %WORKSPACE%/libproj-source
nmake -f makefile.vc
xcopy %WORKSPACE%\libproj-source\src\*.lib %WORKSPACE%\3rdParty\lib /s /y /q
xcopy %WORKSPACE%\libproj-source\src\*.dll %WORKSPACE%\3rdParty\bin /s /y /q
xcopy %WORKSPACE%\libproj-source\src\proj_api.h %WORKSPACE%\3rdParty\include /s /y /q
cd %WORKSPACE%
REM ############################# Download & compile LIBGEOS
curl http://download.osgeo.org/geos/geos-3.4.2.tar.bz2 -o %WORKSPACE%/libgeos.tar.bz2
tar xvjf libgeos.tar.bz2
mv -f geos-3.4.2 libgeos-source
cd %WORKSPACE%
md libgeos-build
cd libgeos-build
cmake ..\libgeos-source -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\libgeos-build\build"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\libgeos-build\build\bin\geos_c.dll %WORKSPACE%\3rdParty\bin /s /y /q
xcopy %WORKSPACE%\libgeos-build\build\lib\geos_c.lib %WORKSPACE%\3rdParty\lib /s /y /q
xcopy %WORKSPACE%\libgeos-build\build\include\geos_c.h %WORKSPACE%\3rdParty\include /s /y /q
cd %WORKSPACE%
REM ############################# Download & compile LIBEXPAT
curl -L http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz/download -o %WORKSPACE%/libexpat.tar.gz
tar xzvf libexpat.tar.gz
mv -f expat-2.1.0 libexpat-source
cd %WORKSPACE%
md libexpat-build
cd libexpat-build
cmake ..\libexpat-source -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\libexpat-build\build"
cmake --build . --config Release --target INSTALL
xcopy %WORKSPACE%\libexpat-build\build\bin\expat.dll %WORKSPACE%\3rdParty\bin /s /y /q
xcopy %WORKSPACE%\libexpat-build\build\lib\expat.lib %WORKSPACE%\3rdParty\lib /s /y /q
xcopy %WORKSPACE%\libexpat-build\build\include\* %WORKSPACE%\3rdParty\include /s /y /q
:SkipMe
This page is mostly here for the futur guy who will replace me when I will be tired to maintain Windows stuff ;)