
QT += core gui widgets

CONFIG -= flat

TARGET = MakePDF

DEFINES += \
	GUI_APP=1

RESOURCES += \
	../Resources/resources.qrc

FORMS += \
	../Resources/forms/About.ui \
	../Resources/forms/NewProjectWizard.ui \
	../Resources/forms/ExtensibleObjectModelUI.ui \
	../Resources/forms/SendBugReport.ui \
    ../Resources/forms/Help.ui \
    ../Resources/forms/CheckUpdates.ui \
    ../Resources/forms/LicenseUpgrade.ui \
    ../Resources/forms/Settings.ui \
    ../Resources/forms/PaletteEditor.ui

INCLUDEPATH += \
	../Framework \
	../3rdParty/hoedown \
	../3rdParty/libharu/include \
	../3rdParty/TinyXML++

HEADERS += \
	../Framework/EventLog.h \
	../Framework/Expected.h \
	../Framework/Final.h \
	../Framework/Finally.h \
	../Framework/GenericTable.h \
	../Framework/GenericTableUI.h \
	../Framework/NonCopyable.h \
	../Framework/Utilities.h \
    ../ui.h \
    ../MdiWindow.h \
    ../ColorPicker.h \
    ../Version.h

HEADERS += \
	../DocOutput.h \
	../DocProject.h \
	../DocStyle.h \
	../DocTemplate.h \
	../DocVisitor.h \
	../DocSVG.h

SOURCES += \
	../Framework/Tests.cpp \
	../Framework/Utilities.cpp \
	../Framework/EventLog.cpp \
    ../MdiWindow.cpp \
    ../ColorPicker.cpp \
    ../Version.cpp

SOURCES += \
	../DocOutput.cpp \
	../DocProject.cpp \
	../DocStyle.cpp \
	../DocTemplate.cpp \
	../DocVisitor.cpp \
	../DocSVG.cpp \
	../main.cpp

SOURCES += \
	../3rdParty/hoedown/autolink.c \
	../3rdParty/hoedown/buffer.c \
	../3rdParty/hoedown/document.c \
	../3rdParty/hoedown/escape.c \
	../3rdParty/hoedown/html.c \
	../3rdParty/hoedown/html_blocks.c \
	../3rdParty/hoedown/stack.c

SOURCES += \
	../3rdParty/libharu/src/hpdf_3dmeasure.c \
	../3rdParty/libharu/src/hpdf_annotation.c \
	../3rdParty/libharu/src/hpdf_array.c \
	../3rdParty/libharu/src/hpdf_binary.c \
	../3rdParty/libharu/src/hpdf_boolean.c \
	../3rdParty/libharu/src/hpdf_catalog.c \
	../3rdParty/libharu/src/hpdf_destination.c \
	../3rdParty/libharu/src/hpdf_dict.c \
	../3rdParty/libharu/src/hpdf_doc.c \
	../3rdParty/libharu/src/hpdf_doc_png.c \
	../3rdParty/libharu/src/hpdf_encoder.c \
	../3rdParty/libharu/src/hpdf_encoder_utf.c \
	../3rdParty/libharu/src/hpdf_encrypt.c \
	../3rdParty/libharu/src/hpdf_encryptdict.c \
	../3rdParty/libharu/src/hpdf_error.c \
	../3rdParty/libharu/src/hpdf_exdata.c \
	../3rdParty/libharu/src/hpdf_ext_gstate.c \
	../3rdParty/libharu/src/hpdf_font.c \
	../3rdParty/libharu/src/hpdf_fontdef.c \
	../3rdParty/libharu/src/hpdf_fontdef_base14.c \
	../3rdParty/libharu/src/hpdf_fontdef_cid.c \
	../3rdParty/libharu/src/hpdf_fontdef_cns.c \
	../3rdParty/libharu/src/hpdf_fontdef_cnt.c \
	../3rdParty/libharu/src/hpdf_fontdef_jp.c \
	../3rdParty/libharu/src/hpdf_fontdef_kr.c \
	../3rdParty/libharu/src/hpdf_fontdef_tt.c \
	../3rdParty/libharu/src/hpdf_fontdef_type1.c \
	../3rdParty/libharu/src/hpdf_font_cid.c \
	../3rdParty/libharu/src/hpdf_font_tt.c \
	../3rdParty/libharu/src/hpdf_font_type1.c \
	../3rdParty/libharu/src/hpdf_gstate.c \
	../3rdParty/libharu/src/hpdf_image.c \
	../3rdParty/libharu/src/hpdf_image_png.c \
	../3rdParty/libharu/src/hpdf_info.c \
	../3rdParty/libharu/src/hpdf_list.c \
	../3rdParty/libharu/src/hpdf_mmgr.c \
	../3rdParty/libharu/src/hpdf_name.c \
	../3rdParty/libharu/src/hpdf_namedict.c \
	../3rdParty/libharu/src/hpdf_null.c \
	../3rdParty/libharu/src/hpdf_number.c \
	../3rdParty/libharu/src/hpdf_objects.c \
	../3rdParty/libharu/src/hpdf_outline.c \
	../3rdParty/libharu/src/hpdf_pages.c \
	../3rdParty/libharu/src/hpdf_page_label.c \
	../3rdParty/libharu/src/hpdf_page_operator.c \
	../3rdParty/libharu/src/hpdf_pdfa.c \
	../3rdParty/libharu/src/hpdf_real.c \
	../3rdParty/libharu/src/hpdf_streams.c \
	../3rdParty/libharu/src/hpdf_string.c \
	../3rdParty/libharu/src/hpdf_u3d.c \
	../3rdParty/libharu/src/hpdf_utils.c \
	../3rdParty/libharu/src/hpdf_xref.c

SOURCES += \
	../3rdParty/TinyXML++/ticpp.cpp \
	../3rdParty/TinyXML++/tinystr.cpp \
	../3rdParty/TinyXML++/tinyxml.cpp \
	../3rdParty/TinyXML++/tinyxmlerror.cpp \
	../3rdParty/TinyXML++/tinyxmlparser.cpp


# As a note to what was removed
REMOVED_SOURCES = \
	../3rdParty/hoedown/html_smartypants.c \
	../3rdParty/hoedown/version.c \
	../3rdParty/libharu/src/hpdf_image_ccitt.c


# Linux specific settings
unix {

	QMAKE_CXXFLAGS += --std=gnu++11
	# QMAKE_CXXFLAGS -= -Wall
	QMAKE_CXXFLAGS_WARN_ON=-w
	QMAKE_CFLAGS_WARN_ON=-w
	LIBS += -lpng -lz

}


# Windows specific. Note we compile in libpng and zlib statically on Windows
win32 {

	# Supress annoying warnings
	QMAKE_CXXFLAGS += /wd"4996;4100"
	QMAKE_CXXFLAGS_WARN_ON -= -w34100


	# Release mode debugging
	QMAKE_CXXFLAGS += /Zi
	QMAKE_LFLAGS += /DEBUG /OPT:REF /OPT:ICF


	# This makes the .vcxproj depend on the .pro file, so editing the .pro file will update everything
	Project.target = $${TARGET}.vcxproj
	Project.output = $${TARGET}.vcxproj
	Project.commands = c:\qt\qt5.4.1\5.4\msvc2013_64_opengl\bin\qmake -tp vc '"$${_PRO_FILE_}"' -spec win32-msvc2013
	Project.depends = '"$${_PRO_FILE_}"'
	Project.input = _PRO_FILE_
	QMAKE_EXTRA_COMPILERS += Project


	# This makes the documentation
	MARKDOWN_FILES = \
		test.md \
		test2.md

	Documentation.target = test.pdf
	Documentation.output = test.pdf
	Documentation.commands = echo ' ' > test.pdf
	Documentation.depends = '"$${MARKDOWN_FILES}"'
	Documentation.input = MARKDOWN_FILES
	QMAKE_EXTRA_COMPILERS += Documentation


	INCLUDEPATH += \
		../3rdParty/libpng \
		../3rdParty/zlib


	SOURCES += \
		../3rdParty/libpng/png.c \
		../3rdParty/libpng/pngerror.c \
		../3rdParty/libpng/pngget.c \
		../3rdParty/libpng/pngmem.c \
		../3rdParty/libpng/pngpread.c \
		../3rdParty/libpng/pngread.c \
		../3rdParty/libpng/pngrio.c \
		../3rdParty/libpng/pngrtran.c \
		../3rdParty/libpng/pngrutil.c \
		../3rdParty/libpng/pngset.c \
		../3rdParty/libpng/pngtrans.c \
		../3rdParty/libpng/pngwio.c \
		../3rdParty/libpng/pngwrite.c \
		../3rdParty/libpng/pngwtran.c \
		../3rdParty/libpng/pngwutil.c

	SOURCES += \
		../3rdParty/zlib/inftrees.c \
		../3rdParty/zlib/trees.c \
		../3rdParty/zlib/uncompr.c \
		../3rdParty/zlib/zutil.c \
		../3rdParty/zlib/adler32.c \
		../3rdParty/zlib/compress.c \
		../3rdParty/zlib/crc32.c \
		../3rdParty/zlib/deflate.c \
		../3rdParty/zlib/gzclose.c \
		../3rdParty/zlib/gzlib.c \
		../3rdParty/zlib/gzread.c \
		../3rdParty/zlib/gzwrite.c \
		../3rdParty/zlib/infback.c \
		../3rdParty/zlib/inffast.c \
		../3rdParty/zlib/inflate.c

}


