Skip to content
Permalink
Browse files

introduce MAPSERVER_SKIP_ECW setting to disable ECW support in mapserver

  • Loading branch information
jef-n committed Aug 12, 2013
1 parent 46355fe commit 453946984fbaffed4923a258dc0afc1bdf88f882
@@ -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)")
@@ -35,5 +35,7 @@

#cmakedefine HAVE_PYTHON

#cmakedefine MAPSERVER_SKIP_ECW

#endif

@@ -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

@@ -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% ^
@@ -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% ^
@@ -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 ^
@@ -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() );

0 comments on commit 4539469

Please sign in to comment.
You can’t perform that action at this time.