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 May 22, 2013
1 parent 14f1d2c commit 4d3d678
Show file tree
Hide file tree
Showing 6 changed files with 14 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 @@ -48,5 +48,7 @@

#cmakedefine HAVE_OSGEARTHQT

#cmakedefine MAPSERVER_SKIP_ECW

#endif

1 change: 1 addition & 0 deletions debian/rules
Expand Up @@ -48,6 +48,7 @@ CMAKE_OPTS := \
-D PEDANTIC=TRUE \
-D WITH_QSPATIALITE=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 @@ -109,6 +109,7 @@ cmake -G "Visual Studio 9 2008" ^
-D PEDANTIC=TRUE ^
-D WITH_QSPATIALITE=TRUE ^
-D WITH_MAPSERVER=TRUE ^
-D MAPSERVER_SKIP_ECW=TRUE ^
-D WITH_ASTYLE=TRUE ^
-D WITH_GLOBE=TRUE ^
-D WITH_TOUCH=TRUE ^
Expand Down
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/package.cmd
Expand Up @@ -106,6 +106,7 @@ cmake -G "Visual Studio 9 2008" ^
-D PEDANTIC=TRUE ^
-D WITH_QSPATIALITE=TRUE ^
-D WITH_MAPSERVER=TRUE ^
-D MAPSERVER_SKIP_ECW=TRUE ^
-D WITH_GLOBE=TRUE ^
-D WITH_TOUCH=TRUE ^
-D WITH_ORACLE=TRUE ^
Expand Down
6 changes: 6 additions & 0 deletions src/mapserver/qgis_map_serv.cpp
Expand Up @@ -179,6 +179,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

QDomImplementation::setInvalidDataPolicy( QDomImplementation::DropInvalidChars );

// Instantiate the plugin directory so that providers are loaded
Expand Down

0 comments on commit 4d3d678

Please sign in to comment.