add_library(discio
  Blob.cpp
  Blob.h
  CISOBlob.cpp
  CISOBlob.h
  CompressedBlob.cpp
  CompressedBlob.h
  DirectoryBlob.cpp
  DirectoryBlob.h
  DiscExtractor.cpp
  DiscExtractor.h
  DiscScrubber.cpp
  DiscScrubber.h
  DiscUtils.cpp
  DiscUtils.h
  DriveBlob.cpp
  DriveBlob.h
  Enums.cpp
  Enums.h
  FileBlob.cpp
  FileBlob.h
  FileSystemGCWii.cpp
  FileSystemGCWii.h
  Filesystem.cpp
  Filesystem.h
  GameModDescriptor.cpp
  GameModDescriptor.h
  LaggedFibonacciGenerator.cpp
  LaggedFibonacciGenerator.h
  MultithreadedCompressor.h
  NANDImporter.cpp
  NANDImporter.h
  NFSBlob.cpp
  NFSBlob.h
  RiivolutionParser.cpp
  RiivolutionParser.h
  RiivolutionPatcher.cpp
  RiivolutionPatcher.h
  ScrubbedBlob.cpp
  ScrubbedBlob.h
  TGCBlob.cpp
  TGCBlob.h
  Volume.cpp
  Volume.h
  VolumeDisc.cpp
  VolumeDisc.h
  VolumeFileBlobReader.cpp
  VolumeFileBlobReader.h
  VolumeGC.cpp
  VolumeGC.h
  VolumeVerifier.cpp
  VolumeVerifier.h
  VolumeWad.cpp
  VolumeWad.h
  VolumeWii.cpp
  VolumeWii.h
  WbfsBlob.cpp
  WbfsBlob.h
  WIABlob.cpp
  WIABlob.h
  WIACompression.cpp
  WIACompression.h
  WiiEncryptionCache.cpp
  WiiEncryptionCache.h
  WiiSaveBanner.cpp
  WiiSaveBanner.h
)

target_link_libraries(discio
PUBLIC
  core
  BZip2::BZip2
  lzma
  zstd

PRIVATE
  fmt::fmt
  minizip-ng
  pugixml
  ZLIB::ZLIB
)

if(MSVC)
  # Add precompiled header
  target_link_libraries(discio PRIVATE use_pch)
endif()
