From ab3ecd129df730c244b26407579d82ca88a31ffc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 9 Oct 2008 17:02:16 +0000 Subject: [PATCH] Initial cut of zlib based compress/uncompress plugin --- CMakeLists.txt | 1 + src/osgPlugins/CMakeLists.txt | 4 ++++ src/osgPlugins/osg/ReaderWriterOSG.cpp | 6 +++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc552338a..ae410d8fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -295,6 +295,7 @@ FIND_PACKAGE(Performer) FIND_PACKAGE(ZLIB) FIND_PACKAGE(GDAL) FIND_PACKAGE(CURL) +FIND_PACKAGE(ZLIB) FIND_PACKAGE(ITK) FIND_PACKAGE(OurDCMTK) diff --git a/src/osgPlugins/CMakeLists.txt b/src/osgPlugins/CMakeLists.txt index 22402d438..2562ffaf6 100644 --- a/src/osgPlugins/CMakeLists.txt +++ b/src/osgPlugins/CMakeLists.txt @@ -100,6 +100,10 @@ IF(CURL_FOUND) ADD_SUBDIRECTORY(curl) ENDIF(CURL_FOUND) +IF(ZLIB_FOUND) + ADD_SUBDIRECTORY(gz) +ENDIF(ZLIB_FOUND) + ############################################################ # # 3D Image plugins diff --git a/src/osgPlugins/osg/ReaderWriterOSG.cpp b/src/osgPlugins/osg/ReaderWriterOSG.cpp index 509d50eb6..29451a265 100644 --- a/src/osgPlugins/osg/ReaderWriterOSG.cpp +++ b/src/osgPlugins/osg/ReaderWriterOSG.cpp @@ -181,7 +181,7 @@ class OSGReaderWriter : public ReaderWriter } } - virtual WriteResult writeObject(const Object& obj,const std::string& fileName, const osgDB::ReaderWriter::Options* options) const + virtual WriteResult writeObject(const Object& obj, const std::string& fileName, const osgDB::ReaderWriter::Options* options) const { std::string ext = osgDB::getLowerCaseFileExtension(fileName); if (!acceptsExtension(ext)) return WriteResult::FILE_NOT_HANDLED; @@ -224,7 +224,7 @@ class OSGReaderWriter : public ReaderWriter } - virtual WriteResult writeNode(const Node& node,const std::string& fileName, const osgDB::ReaderWriter::Options* options) const + virtual WriteResult writeNode(const Node& node, const std::string& fileName, const osgDB::ReaderWriter::Options* options) const { std::string ext = getFileExtension(fileName); if (!acceptsExtension(ext)) return WriteResult::FILE_NOT_HANDLED; @@ -246,7 +246,7 @@ class OSGReaderWriter : public ReaderWriter return WriteResult("Unable to open file for output"); } - virtual WriteResult writeNode(const Node& node,std::ostream& fout, const osgDB::ReaderWriter::Options* options) const + virtual WriteResult writeNode(const Node& node, std::ostream& fout, const osgDB::ReaderWriter::Options* options) const {