mirror of https://github.com/libAthena/athena.git
Added CMakeLists.txt
This commit is contained in:
parent
6ac88b37f4
commit
ce917d4aca
|
@ -0,0 +1,144 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project(Athena)
|
||||
|
||||
add_subdirectory(extern)
|
||||
file(GLOB ATHENA_HEADERS include/Athena/*.hpp)
|
||||
|
||||
include_directories(include)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND CORE_EXTRA src/win32_largefilewrapper.c)
|
||||
elseif(APPLE)
|
||||
list(APPEND CORE_EXTRA src/osx_largefilewrapper.c)
|
||||
endif()
|
||||
|
||||
add_library(AthenaCore
|
||||
src/Athena/Utility.cpp
|
||||
src/Athena/FileReader.cpp
|
||||
src/Athena/FileWriter.cpp
|
||||
src/Athena/MemoryReader.cpp
|
||||
src/Athena/MemoryWriter.cpp
|
||||
src/Athena/Global.cpp
|
||||
src/Athena/Checksums.cpp
|
||||
src/Athena/Compression.cpp
|
||||
src/LZ77/LZLookupTable.cpp
|
||||
src/LZ77/LZType10.cpp
|
||||
src/LZ77/LZType11.cpp
|
||||
src/LZ77/LZBase.cpp
|
||||
src/Athena/FileInfo.cpp
|
||||
src/Athena/Dir.cpp
|
||||
src/gekko_support.c
|
||||
${CORE_EXTRA}
|
||||
|
||||
include/Athena/IStream.hpp
|
||||
include/Athena/IStreamReader.hpp
|
||||
include/Athena/IStreamWriter.hpp
|
||||
include/Athena/Types.hpp
|
||||
include/Athena/Utility.hpp
|
||||
include/Athena/Global.hpp
|
||||
include/Athena/Exception.hpp
|
||||
include/Athena/FileNotFoundException.hpp
|
||||
include/Athena/IOException.hpp
|
||||
include/Athena/InvalidDataException.hpp
|
||||
include/Athena/InvalidOperationException.hpp
|
||||
include/Athena/FileReader.hpp
|
||||
include/Athena/FileWriter.hpp
|
||||
include/Athena/MemoryReader.hpp
|
||||
include/Athena/MemoryWriter.hpp
|
||||
include/Athena/NotImplementedException.hpp
|
||||
include/Athena/Checksums.hpp
|
||||
include/Athena/Compression.hpp
|
||||
include/LZ77/LZBase.hpp
|
||||
include/LZ77/LZLookupTable.hpp
|
||||
include/LZ77/LZType10.hpp
|
||||
include/LZ77/LZType11.hpp
|
||||
include/utf8.h
|
||||
include/utf8/checked.h
|
||||
include/utf8/core.h
|
||||
include/utf8/unchecked.h
|
||||
include/Athena/FileInfo.hpp
|
||||
include/Athena/Dir.hpp
|
||||
include/gekko_support.h
|
||||
include/Athena/DNA.hpp
|
||||
)
|
||||
|
||||
add_library(AthenaSakura
|
||||
src/Athena/Sprite.cpp
|
||||
src/Athena/SpriteFile.cpp
|
||||
src/Athena/SpriteFileReader.cpp
|
||||
src/Athena/SpriteFileWriter.cpp
|
||||
src/Athena/SpriteFrame.cpp
|
||||
src/Athena/SpritePart.cpp
|
||||
|
||||
include/Athena/Sprite.hpp
|
||||
include/Athena/SpriteFile.hpp
|
||||
include/Athena/SpriteFileReader.hpp
|
||||
include/Athena/SpriteFileWriter.hpp
|
||||
include/Athena/SpriteFrame.hpp
|
||||
include/Athena/SpritePart.hpp
|
||||
)
|
||||
|
||||
add_library(AthenaWiiSave
|
||||
src/Athena/WiiBanner.cpp
|
||||
src/Athena/WiiFile.cpp
|
||||
src/Athena/WiiImage.cpp
|
||||
src/Athena/WiiSave.cpp
|
||||
src/Athena/WiiSaveReader.cpp
|
||||
src/Athena/WiiSaveWriter.cpp
|
||||
src/bn.cpp
|
||||
src/ec.cpp
|
||||
src/md5.cpp
|
||||
src/sha1.cpp
|
||||
src/aes.c
|
||||
|
||||
include/Athena/WiiBanner.hpp
|
||||
include/Athena/WiiFile.hpp
|
||||
include/Athena/WiiImage.hpp
|
||||
include/Athena/WiiSave.hpp
|
||||
include/Athena/WiiSaveReader.hpp
|
||||
include/Athena/WiiSaveWriter.hpp
|
||||
include/aes.h
|
||||
include/bn.h
|
||||
include/ec.h
|
||||
include/md5.h
|
||||
include/sha1.h
|
||||
)
|
||||
|
||||
add_library(AthenaZelda
|
||||
src/Athena/ALTTPFile.cpp
|
||||
src/Athena/ALTTPFileReader.cpp
|
||||
src/Athena/ALTTPFileWriter.cpp
|
||||
src/Athena/ALTTPQuest.cpp
|
||||
src/Athena/MCFile.cpp
|
||||
src/Athena/MCFileReader.cpp
|
||||
src/Athena/MCFileWriter.cpp
|
||||
src/Athena/MCSlot.cpp
|
||||
src/Athena/SkywardSwordFile.cpp
|
||||
src/Athena/SkywardSwordFileReader.cpp
|
||||
src/Athena/SkywardSwordFileWriter.cpp
|
||||
src/Athena/SkywardSwordQuest.cpp
|
||||
src/Athena/ZQuestFile.cpp
|
||||
src/Athena/ZQuestFileReader.cpp
|
||||
src/Athena/ZQuestFileWriter.cpp
|
||||
|
||||
include/Athena/ALTTPEnums.hpp
|
||||
include/Athena/ALTTPFile.hpp
|
||||
include/Athena/ALTTPFileReader.hpp
|
||||
include/Athena/ALTTPFileWriter.hpp
|
||||
include/Athena/ALTTPQuest.hpp
|
||||
include/Athena/ALTTPStructs.hpp
|
||||
include/Athena/MCFile.hpp
|
||||
include/Athena/MCFileReader.hpp
|
||||
include/Athena/MCFileWriter.hpp
|
||||
include/Athena/SkywardSwordFile.hpp
|
||||
include/Athena/SkywardSwordFileReader.hpp
|
||||
include/Athena/SkywardSwordFileWriter.hpp
|
||||
include/Athena/SkywardSwordQuest.hpp
|
||||
)
|
||||
|
||||
|
||||
install(DIRECTORY include DESTINATION include/Athena)
|
||||
install(TARGETS AthenaCore AthenaSakura AthenaWiiSave AthenaZelda
|
||||
DESTINATION lib/Athena)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
add_subdirectory(lzo)
|
||||
add_subdirectory(zlib)
|
|
@ -0,0 +1,73 @@
|
|||
add_library(lzo
|
||||
src/lzo1.c
|
||||
src/lzo1_99.c
|
||||
src/lzo1a.c
|
||||
src/lzo1a_99.c
|
||||
src/lzo1b_1.c
|
||||
src/lzo1b_2.c
|
||||
src/lzo1b_3.c
|
||||
src/lzo1b_4.c
|
||||
src/lzo1b_5.c
|
||||
src/lzo1b_6.c
|
||||
src/lzo1b_7.c
|
||||
src/lzo1b_8.c
|
||||
src/lzo1b_9.c
|
||||
src/lzo1b_99.c
|
||||
src/lzo1b_9x.c
|
||||
src/lzo1b_cc.c
|
||||
src/lzo1b_d1.c
|
||||
src/lzo1b_d2.c
|
||||
src/lzo1b_rr.c
|
||||
src/lzo1b_xx.c
|
||||
src/lzo1c_1.c
|
||||
src/lzo1c_2.c
|
||||
src/lzo1c_3.c
|
||||
src/lzo1c_4.c
|
||||
src/lzo1c_5.c
|
||||
src/lzo1c_6.c
|
||||
src/lzo1c_7.c
|
||||
src/lzo1c_8.c
|
||||
src/lzo1c_9.c
|
||||
src/lzo1c_99.c
|
||||
src/lzo1c_9x.c
|
||||
src/lzo1c_cc.c
|
||||
src/lzo1c_d1.c
|
||||
src/lzo1c_d2.c
|
||||
src/lzo1c_rr.c
|
||||
src/lzo1c_xx.c
|
||||
src/lzo1f_1.c
|
||||
src/lzo1f_9x.c
|
||||
src/lzo1f_d1.c
|
||||
src/lzo1f_d2.c
|
||||
src/lzo1x_1.c
|
||||
src/lzo1x_1k.c
|
||||
src/lzo1x_1l.c
|
||||
src/lzo1x_1o.c
|
||||
src/lzo1x_9x.c
|
||||
src/lzo1x_d1.c
|
||||
src/lzo1x_d2.c
|
||||
src/lzo1x_d3.c
|
||||
src/lzo1x_o.c
|
||||
src/lzo1y_1.c
|
||||
src/lzo1y_9x.c
|
||||
src/lzo1y_d1.c
|
||||
src/lzo1y_d2.c
|
||||
src/lzo1y_d3.c
|
||||
src/lzo1y_o.c
|
||||
src/lzo1z_9x.c
|
||||
src/lzo1z_d1.c
|
||||
src/lzo1z_d2.c
|
||||
src/lzo1z_d3.c
|
||||
src/lzo2a_9x.c
|
||||
src/lzo2a_d1.c
|
||||
src/lzo2a_d2.c
|
||||
src/lzo_crc.c
|
||||
src/lzo_init.c
|
||||
src/lzo_ptr.c
|
||||
src/lzo_str.c
|
||||
src/lzo_util.c
|
||||
include/lzo/lzo1.h
|
||||
include/lzo/lzo1x.h
|
||||
include/lzo/lzoconf.h
|
||||
include/lzo/lzodefs.h
|
||||
include/lzo/lzoutil.h)
|
|
@ -0,0 +1,23 @@
|
|||
add_library(zlib
|
||||
adler32.c
|
||||
compress.c
|
||||
crc32.c
|
||||
deflate.c
|
||||
infback.c
|
||||
inffast.c
|
||||
inflate.c
|
||||
inftrees.c
|
||||
trees.c
|
||||
uncompr.c
|
||||
zutil.c
|
||||
crc32.h
|
||||
deflate.h
|
||||
gzguts.h
|
||||
inffast.h
|
||||
inffixed.h
|
||||
inflate.h
|
||||
inftrees.h
|
||||
trees.h
|
||||
zconf.h
|
||||
zlib.h
|
||||
zutil.h)
|
|
@ -29,6 +29,9 @@ namespace io
|
|||
template <Endian DNAE>
|
||||
struct DNA
|
||||
{
|
||||
virtual void read(IStreamReader&)=0;
|
||||
virtual void write(IStreamWriter&) const=0;
|
||||
|
||||
template <typename T, Endian VE = DNAE>
|
||||
using Value = T;
|
||||
|
||||
|
@ -106,8 +109,6 @@ struct DNA
|
|||
template <size_t align>
|
||||
struct Align {};
|
||||
|
||||
virtual void read(IStreamReader&)=0;
|
||||
virtual void write(IStreamWriter&) const=0;
|
||||
};
|
||||
|
||||
/** Macro to automatically declare read/write methods in subclasses */
|
||||
|
|
Loading…
Reference in New Issue