Improve code structure.
Merge branch 'cmake4gdal' of https://github.com/nextgis/gdal-svn into cmake4gdal