Navigation Menu

Skip to content

Commit

Permalink
introduce MAPSERVER_SKIP_ECW setting to disable ECW support in mapserver
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Aug 12, 2013
1 parent 46355fe commit 4539469
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Expand Up @@ -43,6 +43,9 @@ SET (WITH_DESKTOP TRUE CACHE BOOL "Determines whether QGIS desktop should be bui

# mapserver by us disabled default because it needs FastCGI (which is optional dependency)
SET (WITH_MAPSERVER FALSE CACHE BOOL "Determines whether QGIS mapserver should be built")
IF(WITH_MAPSERVER)
SET (MAPSERVER_SKIP_ECW FALSE CACHE BOOL "Determines whether QGIS mapserver should disable ECW (ECW in server apps requires a special license)")
ENDIF(WITH_MAPSERVER)

# build our version of astyle
SET (WITH_ASTYLE FALSE CACHE BOOL "If you plan to contribute you should reindent with scripts/prepare-commit.sh (using 'our' astyle)")
Expand Down
2 changes: 2 additions & 0 deletions cmake_templates/qgsconfig.h.in
Expand Up @@ -35,5 +35,7 @@

#cmakedefine HAVE_PYTHON

#cmakedefine MAPSERVER_SKIP_ECW

#endif

1 change: 1 addition & 0 deletions debian/rules
Expand Up @@ -40,6 +40,7 @@ CMAKE_OPTS := \
-D PEDANTIC=TRUE \
-D WITH_SPATIALITE=TRUE \
-D WITH_MAPSERVER=TRUE \
-D MAPSERVER_SKIP_ECW=TRUE \
-D QGIS_CGIBIN_SUBDIR=/usr/lib/cgi-bin \
-D WITH_APIDOC=TRUE

Expand Down
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/package-nightly.cmd
Expand Up @@ -92,6 +92,7 @@ cmake -G "Visual Studio 9 2008" ^
-D PEDANTIC=TRUE ^
-D WITH_SPATIALITE=TRUE ^
-D WITH_MAPSERVER=TRUE ^
-D MAPSERVER_SKIP_ECW=TRUE ^
-D WITH_ASTYLE=TRUE ^
-D WITH_GLOBE=TRUE ^
-D CMAKE_BUILD_TYPE=%BUILDCONF% ^
Expand Down
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/package.cmd
Expand Up @@ -92,6 +92,7 @@ cmake -G "Visual Studio 9 2008" ^
-D PEDANTIC=TRUE ^
-D WITH_SPATIALITE=TRUE ^
-D WITH_MAPSERVER=TRUE ^
-D MAPSERVER_SKIP_ECW=TRUE ^
-D WITH_GLOBE=TRUE ^
-D CMAKE_BUILD_TYPE=%BUILDCONF% ^
-D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^
Expand Down
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/package64.cmd
Expand Up @@ -102,6 +102,7 @@ set GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-%GRASS_VERSION%
cmake -G "Visual Studio 10 Win64" ^
-D PEDANTIC=TRUE ^
-D WITH_MAPSERVER=TRUE ^
-D MAPSERVER_SKIP_ECW=TRUE ^
-D WITH_GLOBE=FALSE ^
-D WITH_TOUCH=TRUE ^
-D WITH_GRASS=TRUE ^
Expand Down
6 changes: 6 additions & 0 deletions src/mapserver/qgis_map_serv.cpp
Expand Up @@ -165,6 +165,12 @@ int main( int argc, char * argv[] )
}
#endif

#if defined(MAPSERVER_SKIP_ECW)
QgsDebugMsg( "Skipping GDAL ECW drivers in server." );
QgsApplication::skipGdalDriver( "ECW" );
QgsApplication::skipGdalDriver( "JP2ECW" );
#endif

// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
QgsDebugMsg( "Prefix PATH: " + QgsApplication::prefixPath() );
Expand Down

0 comments on commit 4539469

Please sign in to comment.