HEADERS += src/config.h \
           src/domain/domainfacade.h \
           src/foundation/logger.h \
           src/presentation/observer.h \
           src/domain/animation/animation.h \
           src/domain/animation/animationmodel.h \
           src/domain/animation/frame.h \
           src/presentation/frontends/nonguifrontend/nonguifrontend.h \
           src/presentation/frontends/qtfrontend/mainwindowgui.h \
           src/presentation/frontends/qtfrontend/qtfrontend.h \
           src/application/runanimationhandler.h \
           src/domain/undo/undo.h \
           src/domain/undo/undoadd.h \
           src/domain/undo/undomove.h \
           src/domain/undo/undoremove.h \
           src/application/camerahandler.h \
           src/presentation/frontends/qtfrontend/frameview.h \
           src/domain/undo/undohistory.h \
           src/presentation/frontends/qtfrontend/flexiblespinbox.h \
           src/presentation/frontends/qtfrontend/menuframe.h \
           src/presentation/frontends/qtfrontend/flexiblelineedit.h \
           src/presentation/frontends/frontend.h \
		   graphics/stopmotion.xpm \
		   graphics/stopmotion_logo.xpm \ 
           graphics/icons/addframeicon.xpm \
           graphics/icons/cameraoff.xpm \
           graphics/icons/cameraon.xpm \
           graphics/icons/capture.xpm \
           graphics/icons/clapper.xpm \
           graphics/icons/closescene.xpm \
           graphics/icons/close.xpm \
           graphics/icons/configureicon.xpm \
           graphics/icons/copyicon.xpm \
           graphics/icons/cuticon.xpm \
           graphics/icons/fastforward.xpm \
           graphics/icons/filenewicon.xpm \
           graphics/icons/fileopenicon.xpm \
           graphics/icons/filesaveasicon.xpm \
           graphics/icons/filesaveicon.xpm \
           graphics/icons/home.xpm \
           graphics/icons/languages.xpm \
           graphics/icons/loop.xpm \
           graphics/icons/newscene.xpm \
           graphics/icons/nextframe.xpm \
           graphics/icons/note.xpm \
           graphics/icons/openscene.xpm \
           graphics/icons/pasteicon.xpm \
           graphics/icons/pause.xpm \
           graphics/icons/play.xpm \
           graphics/icons/previousframe.xpm \
           graphics/icons/quiticon.xpm \
           graphics/icons/redoicon.xpm \
           graphics/icons/removeframeicon.xpm \
           graphics/icons/removescene.xpm \
           graphics/icons/rewind.xpm \
           graphics/icons/steptobeginning.xpm \
           graphics/icons/steptoend.xpm \
           graphics/icons/stop.xpm \
           graphics/icons/undoicon.xpm \
           graphics/icons/videoexport.xpm \
           graphics/icons/whatsthisicon.xpm \
           graphics/icons/windowicon.xpm \
           src/application/soundhandler.h \
           src/presentation/frontends/qtfrontend/framepreferencesmenu.h \
           src/application/editmenuhandler.h \
           src/domain/animation/scene.h \
           src/technical/projectserializer.h \
           src/technical/packer.h \
           src/presentation/frontends/qtfrontend/licence.h \
           src/technical/audio/audiodriver.h \
           src/technical/audio/audioformat.h \
           src/technical/audio/ossdriver.h \
           src/technical/audio/oggvorbis.h \
           src/technical/grabber/imagegrabber.h \
           src/technical/grabber/commandlinegrabber.h \
           src/presentation/frontends/qtfrontend/imagegrabthread.h \
           src/presentation/frontends/qtfrontend/preferencesmenu.h \
           src/foundation/preferencestool.h \
           src/application/modelhandler.h \
           src/domain/undo/undonewscene.h \
           src/domain/undo/undoremovescene.h \
           src/domain/undo/undomovescene.h \
           src/presentation/frontends/qtfrontend/toolsmenu.h \
           src/application/languagehandler.h \
           src/technical/video/videofactory.h \
           src/technical/video/videoencoder.h \
           src/presentation/frontends/qtfrontend/importtab.h \
           src/presentation/frontends/qtfrontend/framebar/framebar.h \
           src/presentation/frontends/qtfrontend/framebar/framethumbview.h \
           src/presentation/frontends/qtfrontend/framebar/scenearrowbutton.h \
           src/presentation/frontends/qtfrontend/framebar/scenethumbview.h \
           src/presentation/frontends/qtfrontend/framebar/thumbview.h \
           src/presentation/frontends/qtfrontend/exporttab.h \
           src/application/externalchangemonitor.h \
           src/presentation/frontends/qtfrontend/helpwindow.h \
		   src/technical/util.h \
		   src/application/externalcommand.h \
		   src/presentation/frontends/qtfrontend/aboutdialog.h \
		   src/technical/libng/devices.h \
		   src/technical/libng/grab-ng.h \
		   src/technical/libng/list.h \
		   src/technical/libng/struct-dump.h \
		   src/technical/libng/struct-v4l2.h \
		   src/technical/libng/struct-v4l.h \
		   src/technical/libng/videodev2.h \
		   src/technical/libng/videodev.h \
		   src/presentation/frontends/qtfrontend/devicetab.h
		   

FORMS 	+= src/presentation/frontends/qtfrontend/helpbrowser.ui \
		   src/presentation/frontends/qtfrontend/toolsmenu.ui

SOURCES += src/config.cpp \
           src/main.cpp \
           src/domain/domainfacade.cpp \
           src/foundation/logger.cpp \
           src/domain/animation/animation.cpp \
           src/domain/animation/animationmodel.cpp \
           src/domain/animation/frame.cpp \
           src/presentation/frontends/nonguifrontend/nonguifrontend.cpp \
           src/presentation/frontends/qtfrontend/mainwindowgui.cpp \
           src/presentation/frontends/qtfrontend/qtfrontend.cpp \
           src/application/runanimationhandler.cpp \
           src/domain/undo/undoadd.cpp \
           src/domain/undo/undomove.cpp \
           src/domain/undo/undoremove.cpp \
           src/application/camerahandler.cpp \
           src/presentation/frontends/qtfrontend/frameview.cpp \
           src/domain/undo/undohistory.cpp \
           src/presentation/frontends/qtfrontend/flexiblespinbox.cpp \
           src/presentation/frontends/qtfrontend/menuframe.cpp \
           src/presentation/frontends/qtfrontend/flexiblelineedit.cpp \
           src/application/soundhandler.cpp \
           src/presentation/frontends/qtfrontend/framepreferencesmenu.cpp \
           src/application/editmenuhandler.cpp \
           src/domain/animation/scene.cpp \
           src/technical/projectserializer.cpp \
           src/technical/packer.c \
           src/technical/audio/ossdriver.cpp \
           src/technical/audio/oggvorbis.cpp \
           src/technical/grabber/imagegrabber.cpp \
           src/technical/grabber/commandlinegrabber.cpp \
           src/presentation/frontends/qtfrontend/imagegrabthread.cpp \
           src/presentation/frontends/qtfrontend/preferencesmenu.cpp \
           src/foundation/preferencestool.cpp \
           src/application/modelhandler.cpp \
           src/domain/undo/undonewscene.cpp \
           src/domain/undo/undoremovescene.cpp \
           src/domain/undo/undomovescene.cpp \
           src/presentation/frontends/qtfrontend/toolsmenu.cpp \
           src/application/languagehandler.cpp \
           src/technical/video/videofactory.cpp \
           src/technical/video/videoencoder.cpp \
           src/presentation/frontends/qtfrontend/importtab.cpp \
           src/presentation/frontends/qtfrontend/framebar/framebar.cpp \
           src/presentation/frontends/qtfrontend/framebar/framethumbview.cpp \
           src/presentation/frontends/qtfrontend/framebar/scenearrowbutton.cpp \
           src/presentation/frontends/qtfrontend/framebar/scenethumbview.cpp \
           src/presentation/frontends/qtfrontend/framebar/thumbview.cpp \
           src/presentation/frontends/qtfrontend/exporttab.cpp \
           src/application/externalchangemonitor.cpp \
           src/presentation/frontends/qtfrontend/helpwindow.cpp \
		   src/technical/util.cpp \
		   src/application/externalcommand.cpp \
		   src/presentation/frontends/qtfrontend/aboutdialog.cpp \
		   src/technical/libng/devices.c \
		   src/technical/libng/grab-ng.c \
		   src/technical/libng/struct-dump.c \
		   src/technical/libng/struct-v4l2.c \
		   src/technical/libng/struct-v4l.c \
		   src/technical/libng/plugins/drv0-v4l2.c \
		   src/technical/libng/plugins/drv1-v4l.c \
		   src/presentation/frontends/qtfrontend/devicetab.cpp

TRANSLATIONS += translations/stopmotion_no_nb.ts \
                translations/stopmotion_no_nn.ts \
                translations/stopmotion_no_se.ts \
                translations/stopmotion_de.ts \
                translations/stopmotion_se.ts \
                translations/stopmotion_fr.ts \
                translations/stopmotion_br.ts \
                translations/stopmotion_dk.ts \
                translations/stopmotion_fi.ts \
                translations/stopmotion_gr.ts \
                translations/stopmotion_ru.ts \
                translations/stopmotion_es.ts \
                translations/stopmotion_kl.ts \
				translations/stopmotion_cz.ts \
				translations/stopmotion_sl.ts

DEPENDPATH += src \
              src/domain \
              src/foundation \
              src/presentation \
              src/domain/animation \
              src/presentation/frontends/nonguifrontend \
              src/presentation/frontends/qtfrontend

INCLUDEPATH += . \
               src \
               src/presentation/frontends/qtfrontend \
               src/presentation/frontends/nonguifrontend \
               src/foundation \
               src/domain \
               src/domain/animation \
               src/presentation \
               $$system(sdl-config --cflags | sed -e 's/-I//g') \
               $$system(xml2-config --cflags | sed -e 's/-I//g')

LIBS += $$system(sdl-config --libs) \
        $$system(xml2-config --libs) \
        -lSDL_image -ltar -lvorbisfile -lfam

DISTFILES += src/config.cpp.in \
             graphics/stopmotion.png \
             stopmotion.pro.in \
             stopmotion.desktop \
             stopmotion.mime \
			 stopmotion.1.gz \
			 configure \
             AUTHORS \
			 README \
			 COPYING \
			 $$system(ls -x manual/*.html) \
             $$system(ls -x manual/graphic/*.png) \
			 $$system(ls -x manual/icons/*.png) \
			 $$system(ls -x manual/screenshots/*.png) \
			 $$system(ls -x translations/*.qm) 

DISTFILES -= stopmotion.pro \
             src/config.cpp
			 
CONFIG += @MODE@
DEFINES += @DEFINES@
TEMPLATE = app

target.path = @prefix@/bin

translations.path = @TRANSLATIONS_DIR@
translations.files = translations/*.qm

htmldoc.path = @HTML_DIR@
htmldoc.files = manual/*.html
htmldoc.extra = $(INSTALL_DIR) manual/graphic $(INSTALL_ROOT)@HTML_DIR@;
htmldoc.extra += $(INSTALL_DIR) manual/icons $(INSTALL_ROOT)@HTML_DIR@;
htmldoc.extra += $(INSTALL_DIR) manual/screenshots $(INSTALL_ROOT)@HTML_DIR@;

# Dummy target to fix permissions. 
dummy.path = @prefix@/bin
dummy.extra += chmod 644 $(INSTALL_ROOT)@TRANSLATIONS_DIR@/*.qm $(INSTALL_ROOT)@HTML_DIR@/*.html \
	$(INSTALL_ROOT)@HTML_DIR@/graphic/* $(INSTALL_ROOT)@HTML_DIR@/icons/* $(INSTALL_ROOT)@HTML_DIR@/screenshots/*;
dummy.extra += chmod 755 $(INSTALL_ROOT)@TRANSLATIONS_DIR@ $(INSTALL_ROOT)@prefix@/bin/$(QMAKE_TARGET) \ 
	$(INSTALL_ROOT)@HTML_DIR@ $(INSTALL_ROOT)@HTML_DIR@/graphic $(INSTALL_ROOT)@HTML_DIR@/icons \ 
	$(INSTALL_ROOT)@HTML_DIR@/screenshots;

INSTALLS += target translations htmldoc dummy

