From 6c0115a23d008675658ea6dd9873dc41f3abeafa Mon Sep 17 00:00:00 2001
From: Phillip Stephens <antidote.crk@gmail.com>
Date: Sun, 20 Apr 2014 04:43:27 -0700
Subject: [PATCH] * Fix compiling for Qt

---
 Athena.pri | 173 ++++++++++++++++++++++++++---------------------------
 Athena.pro |   6 +-
 2 files changed, 89 insertions(+), 90 deletions(-)

diff --git a/Athena.pri b/Athena.pri
index 9b606a7..e9847d6 100644
--- a/Athena.pri
+++ b/Athena.pri
@@ -3,7 +3,6 @@ INCLUDEPATH += $$PWD/include
 unix:LIBS += -lz
 win32:LIBS += -lzlib
 QMAKE_CXXFLAGS += -std=c++11
-CONFIG -= qt
 
 SOURCES += \
     $$PWD/src/Athena/Utility.cpp \
@@ -14,94 +13,94 @@ SOURCES += \
     $$PWD/src/Athena/Global.cpp \
     $$PWD/src/Athena/ALTTPFile.cpp \
     $$PWD/src/Athena/ALTTPFileReader.cpp \
-    $$PWD/Athena/ALTTPFileWriter.cpp \
-    $$PWD/Athena/ALTTPQuest.cpp \
-    $$PWD/Athena/Checksums.cpp \
-    $$PWD/Athena/Compression.cpp \
-    $$PWD/Athena/MCFile.cpp \
-    $$PWD/Athena/MCFileReader.cpp \
-    $$PWD/Athena/MCFileWriter.cpp \
-    $$PWD/Athena/SkywardSwordFile.cpp \
-    $$PWD/Athena/SkywardSwordFileReader.cpp \
-    $$PWD/Athena/SkywardSwordFileWriter.cpp \
-    $$PWD/Athena/SkywardSwordQuest.cpp \
-    $$PWD/Athena/Sprite.cpp \
-    $$PWD/Athena/SpriteFile.cpp \
-    $$PWD/Athena/SpriteFileReader.cpp \
-    $$PWD/Athena/SpriteFileWriter.cpp \
-    $$PWD/Athena/SpriteFrame.cpp \
-    $$PWD/Athena/SpritePart.cpp \
-    $$PWD/Athena/WiiBanner.cpp \
-    $$PWD/Athena/WiiFile.cpp \
-    $$PWD/Athena/WiiImage.cpp \
-    $$PWD/Athena/WiiSave.cpp \
-    $$PWD/Athena/WiiSaveReader.cpp \
-    $$PWD/Athena/WiiSaveWriter.cpp \
-    $$PWD/Athena/ZQuestFile.cpp \
-    $$PWD/Athena/ZQuestFileReader.cpp \
-    $$PWD/Athena/ZQuestFileWriter.cpp \
-    $$PWD/bn.cpp \
-    $$PWD/ec.cpp \
-    $$PWD/md5.cpp \
-    $$PWD/sha1.cpp \
-    $$PWD/aes.c \
-    $$PWD/lzo.c
+    $$PWD/src/Athena/ALTTPFileWriter.cpp \
+    $$PWD/src/Athena/ALTTPQuest.cpp \
+    $$PWD/src/Athena/Checksums.cpp \
+    $$PWD/src/Athena/Compression.cpp \
+    $$PWD/src/Athena/MCFile.cpp \
+    $$PWD/src/Athena/MCFileReader.cpp \
+    $$PWD/src/Athena/MCFileWriter.cpp \
+    $$PWD/src/Athena/SkywardSwordFile.cpp \
+    $$PWD/src/Athena/SkywardSwordFileReader.cpp \
+    $$PWD/src/Athena/SkywardSwordFileWriter.cpp \
+    $$PWD/src/Athena/SkywardSwordQuest.cpp \
+    $$PWD/src/Athena/Sprite.cpp \
+    $$PWD/src/Athena/SpriteFile.cpp \
+    $$PWD/src/Athena/SpriteFileReader.cpp \
+    $$PWD/src/Athena/SpriteFileWriter.cpp \
+    $$PWD/src/Athena/SpriteFrame.cpp \
+    $$PWD/src/Athena/SpritePart.cpp \
+    $$PWD/src/Athena/WiiBanner.cpp \
+    $$PWD/src/Athena/WiiFile.cpp \
+    $$PWD/src/Athena/WiiImage.cpp \
+    $$PWD/src/Athena/WiiSave.cpp \
+    $$PWD/src/Athena/WiiSaveReader.cpp \
+    $$PWD/src/Athena/WiiSaveWriter.cpp \
+    $$PWD/src/Athena/ZQuestFile.cpp \
+    $$PWD/src/Athena/ZQuestFileReader.cpp \
+    $$PWD/src/Athena/ZQuestFileWriter.cpp \
+    $$PWD/src/bn.cpp \
+    $$PWD/src/ec.cpp \
+    $$PWD/src/md5.cpp \
+    $$PWD/src/sha1.cpp \
+    $$PWD/src/aes.c \
+    $$PWD/src/lzo.c
 
 HEADERS += \
-    $$PWD/Athena/Stream.hpp \
-    $$PWD/Athena/Types.hpp \
-    $$PWD/Athena/Utility.hpp \
-    $$PWD/Athena/Global.hpp \
-    $$PWD/Athena/Exception.hpp \
-    $$PWD/Athena/FileNotFoundException.hpp \
-    $$PWD/Athena/IOException.hpp \
-    $$PWD/Athena/InvalidDataException.hpp \
-    $$PWD/Athena/InvalidOperationException.hpp \
-    $$PWD/Athena/FileReader.hpp \
-    $$PWD/Athena/FileWriter.hpp \
-    $$PWD/utf8.h \
-    $$PWD/utf8/checked.h \
-    $$PWD/utf8/core.h \
-    $$PWD/utf8/unchecked.h \
-    $$PWD/Athena/BinaryReader.hpp \
-    $$PWD/Athena/BinaryWriter.hpp \
-    $$PWD/Athena/NotImplementedException.hpp \
-    $$PWD/aes.h \
-    $$PWD/bn.h \
-    $$PWD/ec.h \
-    $$PWD/lzo.h \
-    $$PWD/md5.h \
-    $$PWD/sha1.h \
-    $$PWD/Athena/ALTTPEnums.hpp \
-    $$PWD/Athena/ALTTPFile.hpp \
-    $$PWD/Athena/ALTTPFileReader.hpp \
-    $$PWD/Athena/ALTTPFileWriter.hpp \
-    $$PWD/Athena/ALTTPQuest.hpp \
-    $$PWD/Athena/ALTTPStructs.hpp \
-    $$PWD/Athena/Checksums.hpp \
-    $$PWD/Athena/Compression.hpp \
-    $$PWD/Athena/MCFile.hpp \
-    $$PWD/Athena/MCFileReader.hpp \
-    $$PWD/Athena/MCFileWriter.hpp \
-    $$PWD/Athena/SkywardSwordFile.hpp \
-    $$PWD/Athena/SkywardSwordFileReader.hpp \
-    $$PWD/Athena/SkywardSwordFileWriter.hpp \
-    $$PWD/Athena/SkywardSwordQuest.hpp \
-    $$PWD/Athena/Sprite.hpp \
-    $$PWD/Athena/SpriteFile.hpp \
-    $$PWD/Athena/SpriteFileReader.hpp \
-    $$PWD/Athena/SpriteFileWriter.hpp \
-    $$PWD/Athena/SpriteFrame.hpp \
-    $$PWD/Athena/SpritePart.hpp \
-    $$PWD/Athena/WiiBanner.hpp \
-    $$PWD/Athena/WiiFile.hpp \
-    $$PWD/Athena/WiiImage.hpp \
-    $$PWD/Athena/WiiSave.hpp \
-    $$PWD/Athena/WiiSaveReader.hpp \
-    $$PWD/Athena/WiiSaveWriter.hpp \
-    $$PWD/Athena/ZQuestFile.hpp \
-    $$PWD/Athena/ZQuestFileReader.hpp \
-    $$PWD/Athena/ZQuestFileWriter.hpp
+    $$PWD/include/Athena/Stream.hpp \
+    $$PWD/include/Athena/Types.hpp \
+    $$PWD/include/Athena/Utility.hpp \
+    $$PWD/include/Athena/Global.hpp \
+    $$PWD/include/Athena/Exception.hpp \
+    $$PWD/include/Athena/FileNotFoundException.hpp \
+    $$PWD/include/Athena/IOException.hpp \
+    $$PWD/include/Athena/InvalidDataException.hpp \
+    $$PWD/include/Athena/InvalidOperationException.hpp \
+    $$PWD/include/Athena/FileReader.hpp \
+    $$PWD/include/Athena/FileWriter.hpp \
+    $$PWD/include/utf8.h \
+    $$PWD/include/utf8/checked.h \
+    $$PWD/include/utf8/core.h \
+    $$PWD/include/utf8/unchecked.h \
+    $$PWD/include/Athena/BinaryReader.hpp \
+    $$PWD/include/Athena/BinaryWriter.hpp \
+    $$PWD/include/Athena/NotImplementedException.hpp \
+    $$PWD/include/aes.h \
+    $$PWD/include/bn.h \
+    $$PWD/include/ec.h \
+    $$PWD/include/lzo.h \
+    $$PWD/include/md5.h \
+    $$PWD/include/sha1.h \
+    $$PWD/include/Athena/ALTTPEnums.hpp \
+    $$PWD/include/Athena/ALTTPFile.hpp \
+    $$PWD/include/Athena/ALTTPFileReader.hpp \
+    $$PWD/include/Athena/ALTTPFileWriter.hpp \
+    $$PWD/include/Athena/ALTTPQuest.hpp \
+    $$PWD/include/Athena/ALTTPStructs.hpp \
+    $$PWD/include/Athena/Checksums.hpp \
+    $$PWD/include/Athena/Compression.hpp \
+    $$PWD/include/Athena/MCFile.hpp \
+    $$PWD/include/Athena/MCFileReader.hpp \
+    $$PWD/include/Athena/MCFileWriter.hpp \
+    $$PWD/include/Athena/SkywardSwordFile.hpp \
+    $$PWD/include/Athena/SkywardSwordFileReader.hpp \
+    $$PWD/include/Athena/SkywardSwordFileWriter.hpp \
+    $$PWD/include/Athena/SkywardSwordQuest.hpp \
+    $$PWD/include/Athena/Sprite.hpp \
+    $$PWD/include/Athena/SpriteFile.hpp \
+    $$PWD/include/Athena/SpriteFileReader.hpp \
+    $$PWD/include/Athena/SpriteFileWriter.hpp \
+    $$PWD/include/Athena/SpriteFrame.hpp \
+    $$PWD/include/Athena/SpritePart.hpp \
+    $$PWD/include/Athena/WiiBanner.hpp \
+    $$PWD/include/Athena/WiiFile.hpp \
+    $$PWD/include/Athena/WiiImage.hpp \
+    $$PWD/include/Athena/WiiSave.hpp \
+    $$PWD/include/Athena/WiiSaveReader.hpp \
+    $$PWD/include/Athena/WiiSaveWriter.hpp \
+    $$PWD/include/Athena/ZQuestFile.hpp \
+    $$PWD/include/Athena/ZQuestFileReader.hpp \
+    $$PWD/include/Athena/ZQuestFileWriter.hpp
 
 OTHER_FILES += \
     .travis.yml
diff --git a/Athena.pro b/Athena.pro
index 0491fe9..f642f6e 100644
--- a/Athena.pro
+++ b/Athena.pro
@@ -6,7 +6,9 @@ DESTDIR = ./lib
 #DEFINES += ATHENA_USE_QT
 
 contains(DEFINES, ATHENA_USE_QT){
-    QT += core
+    QT += qt core
+} else {
+    QT -= qt core
 }
 
 CONFIG(debug, debug|release){
@@ -29,8 +31,6 @@ CONFIG(release, release|debug){
 
 QMAKE_CXXFLAGS += -std=c++11
 INCLUDEPATH += include
-CONFIG -= qt
-
 
 SOURCES += \
     src/Athena/Utility.cpp \