Skip to content

Commit

Permalink
Make ISO9660 archiver optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 17, 2010
1 parent 39e4da1 commit cd3587b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -272,6 +272,11 @@ IF(PHYSFS_ARCHIVE_QPAK)
ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_QPAK=1)
ENDIF(PHYSFS_ARCHIVE_QPAK)

OPTION(PHYSFS_ARCHIVE_ISO9660 "Enable ISO9660 support" TRUE)
IF(PHYSFS_ARCHIVE_ISO9660)
ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_ISO9660=1)
ENDIF(PHYSFS_ARCHIVE_ISO9660)


# See if some archiver required zlib, and see about using system version.

Expand Down
4 changes: 3 additions & 1 deletion src/archiver_iso9660.c
Expand Up @@ -22,7 +22,7 @@
* - Ambiguities in the standard
*/

#include "physfs.h"
#if (defined PHYSFS_SUPPORTS_GRP)

#define __PHYSICSFS_INTERNAL__
#include "physfs_internal.h"
Expand Down Expand Up @@ -1025,5 +1025,7 @@ const PHYSFS_Archiver __PHYSFS_Archiver_ISO9660 =
ISO9660_stat /* stat() method */
};

#endif /* defined PHYSFS_SUPPORTS_ISO9660 */

/* end of archiver_iso9660.c ... */

4 changes: 4 additions & 0 deletions src/physfs.c
Expand Up @@ -93,7 +93,9 @@ static const PHYSFS_ArchiveInfo *supported_types[] =
#if (defined PHYSFS_SUPPORTS_WAD)
&__PHYSFS_ArchiveInfo_WAD,
#endif
#if (defined PHYSFS_SUPPORTS_ISO9660)
&__PHYSFS_ArchiveInfo_ISO9660,
#endif
NULL
};

Expand Down Expand Up @@ -121,7 +123,9 @@ static const PHYSFS_Archiver *archivers[] =
#if (defined PHYSFS_SUPPORTS_WAD)
&__PHYSFS_Archiver_WAD,
#endif
#if (defined PHYSFS_SUPPORTS_ISO9660)
&__PHYSFS_Archiver_ISO9660,
#endif
NULL
};

Expand Down

0 comments on commit cd3587b

Please sign in to comment.