首页 > 代码库 > QGIS2.18.0的精简编译

QGIS2.18.0的精简编译

1、下代码,下依赖库

- expat

- fcgi

- gdal

- gsl-devel

- iconv

- openssl-devel

- openssl-libs

- pyqt4

- qca-devel

- qca-libs

- qjson-devel

- qjson-libs

- qt4-devel

- qwt5-devel-qt4

- sip

- spatialite

- libspatialindex-devel

- python-qscintilla

2、创建一个bat批处理文件,下述内容根据实际情况修改,

@echo off

set VS100COMNTOOLS="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\"

call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86

 

set INCLUDE=%INCLUDE%;"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include"

set LIB=%LIB%;"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib"

 

set OSGEO4W_ROOT=E:\OpenSource\QGIS\SDK_Lite

call "%OSGEO4W_ROOT%\bin\o4w_env.bat"

path %PATH%;E:\BaseTools\cmake-3.5.2-win32-x86\bin;

 

@set GRASS_PREFIX=E:\OpenSource\QGIS\SDK_x86\apps\grass\grass-7.0.5

@set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include

@set LIB=%LIB%;%OSGEO4W_ROOT%\lib;%OSGEO4W_ROOT%\lib

 

@cmd

 

3、启动VS2010的命令行工具,运行cmake-gui,点configure,根据提示修改依赖库的路径。

4、去掉enable-tests,with-bindings,with-staged-plugins,with-grass,with-grass7,with-qwtpolar,勾上with-internal-qwtpolar。

5、多次configure后,generate得到工程文件。

 

QGIS2.18.0的精简编译