static FindFileTLS* CPLFinderInit() { FindFileTLS* pTLSData = CPLGetFindFileTLS(); if( pTLSData != NULL && !pTLSData->bFinderInitialized ) { pTLSData->bFinderInitialized = TRUE; CPLPushFileFinder( CPLDefaultFindFile ); CPLPushFinderLocation( "." ); if( CPLGetConfigOption( "GDAL_DATA", NULL ) != NULL ) { CPLPushFinderLocation( CPLGetConfigOption( "GDAL_DATA", NULL ) ); } else { #ifdef GDAL_PREFIX #ifdef MACOSX_FRAMEWORK CPLPushFinderLocation( GDAL_PREFIX "/Resources/gdal" ); #else CPLPushFinderLocation( GDAL_PREFIX "/share/gdal" ); #endif #else CPLPushFinderLocation( "/usr/local/share/gdal" ); #endif } } return pTLSData; }
static void CPLFinderInit() { if( !bFinderInitialized ) { bFinderInitialized = TRUE; CPLPushFileFinder( CPLDefaultFindFile ); CPLPushFinderLocation( "." ); if( CPLGetConfigOption( "GDAL_DATA", NULL ) != NULL ) { CPLPushFinderLocation( CPLGetConfigOption( "GDAL_DATA", NULL ) ); } else { #ifdef GDAL_PREFIX #ifdef MACOSX_FRAMEWORK CPLPushFinderLocation( GDAL_PREFIX "/Resources/gdal" ); #else CPLPushFinderLocation( GDAL_PREFIX "/share/gdal" ); #endif #else CPLPushFinderLocation( "/usr/local/share/gdal" ); #endif } } }
static FindFileTLS* CPLFinderInit() { FindFileTLS* pTLSData = CPLGetFindFileTLS(); if( pTLSData != nullptr && !pTLSData->bFinderInitialized ) { pTLSData->bFinderInitialized = true; CPLPushFileFinder( CPLDefaultFindFile ); CPLPushFinderLocation( "." ); if( CPLGetConfigOption( "GDAL_DATA", nullptr ) != nullptr ) { CPLPushFinderLocation( CPLGetConfigOption( "GDAL_DATA", nullptr ) ); } else { #ifdef INST_DATA CPLPushFinderLocation( INST_DATA ); #endif #ifdef GDAL_PREFIX #ifdef MACOSX_FRAMEWORK CPLPushFinderLocation( GDAL_PREFIX "/Resources/gdal" ); #else CPLPushFinderLocation( GDAL_PREFIX "/share/gdal" ); #endif #endif } } return pTLSData; }
static void CPLFinderInit() { if( !bFinderInitialized ) { bFinderInitialized = TRUE; CPLPushFileFinder( CPLDefaultFindFile ); CPLPushFinderLocation( "/usr/local/share/gdal" ); CPLPushFinderLocation( "." ); } }