TEMPLATE        = app
LANGUAGE        = C++

@QMAKE_ENABLE_WEBKIT@QT += webkit
@QMAKE_DISABLE_WEBKIT@QMAKE_CXXFLAGS += -DRESLIST_TEXTBROWSER -DSNIPPETS_TEXTBROWSER

@QMAKE_ENABLE_ZEITGEIST@QT += dbus
@QMAKE_ENABLE_ZEITGEIST@QMAKE_CXXFLAGS += -DUSE_ZEITGEIST

QT += xml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets webkitwidgets printsupport

CONFIG  += qt warn_on thread release 

HEADERS += \
        advsearch_w.h \
        advshist.h \
        confgui/confgui.h \
        confgui/confguiindex.h \
        crontool.h \
        firstidx.h \
        fragbuts.h \
        idxsched.h \
        preview_w.h \
        ptrans_w.h \
        rclhelp.h \
        rclmain_w.h \
        reslist.h \
        restable.h \
        rtitool.h \
        searchclause_w.h \
        snippets_w.h \
        specialindex.h \
        spell_w.h \
        ssearch_w.h \
        systray.h \
        uiprefs_w.h \
        viewaction_w.h \
        widgets/editdialog.h \
        widgets/listdialog.h \
        widgets/qxtconfirmationmessage.h

SOURCES += \
        advsearch_w.cpp \
        advshist.cpp \
        confgui/confgui.cpp \
        confgui/confguiindex.cpp \
        crontool.cpp \
        fragbuts.cpp \
        guiutils.cpp \
        main.cpp \
        multisave.cpp \
        preview_w.cpp \
        ptrans_w.cpp \
        rclhelp.cpp \
        rclm_idx.cpp \
        rclm_preview.cpp \
        rclm_saveload.cpp \
        rclm_view.cpp \
        rclm_wins.cpp \
        rclmain_w.cpp \
        rclzg.cpp \
        reslist.cpp \
        respopup.cpp \
        restable.cpp \
        rtitool.cpp \
        searchclause_w.cpp \
        snippets_w.cpp \
        spell_w.cpp \
        ssearch_w.cpp \
        systray.cpp \
        uiprefs_w.cpp \
        viewaction_w.cpp \
        widgets/qxtconfirmationmessage.cpp \
        xmltosd.cpp

FORMS   = \
        advsearch.ui \
        crontool.ui \
        widgets/editdialog.ui \
        firstidx.ui \
        idxsched.ui \
        widgets/listdialog.ui \
        ptrans.ui \
        rclmain.ui \
        restable.ui \
        rtitool.ui \
        specialindex.ui \
        spell.ui \
        snippets.ui \
        ssearchb.ui \
        uiprefs.ui \
        viewaction.ui \

RESOURCES = recoll.qrc

unix {
  UI_DIR = .ui
  MOC_DIR = .moc
  OBJECTS_DIR = .obj
  # Note: libdir may be substituted with sthing like $(exec_prefix)/lib
  # at this point and will go as such in the Makefile. Expansion will be
  # completed at make time.
  LIBS += $(BSTATIC) -L../lib -lrecoll

  !macx {
    LIBS += -Wl,-rpath=@libdir@/recoll
  }

  LIBS +=  @LIBXAPIAN@ $(LIBXAPIANSTATICEXTRA) \
       @LIBICONV@ $(BDYNAMIC) @LIBQZEITGEIST@ -lz

  INCLUDEPATH += ../common ../index ../internfile ../query ../unac \
              ../utils ../aspell ../rcldb ../qtgui \
              confgui widgets
  DEPENDPATH += $$INCLUDEPATH
  POST_TARGETDEPS = ../lib/librecoll.a
}

UNAME = $$system(uname -s)
contains( UNAME, [lL]inux ) {
	  LIBS += -ldl -lX11
}

contains( UNAME, SunOS ) {
          LIBS += -ldl
}

macx {
    ICON = images/recoll.icns
}

TRANSLATIONS = \
	     i18n/recoll_cs.ts \
	     i18n/recoll_da.ts \
	     i18n/recoll_de.ts \
	     i18n/recoll_el.ts \
	     i18n/recoll_es.ts \
             i18n/recoll_fr.ts \
             i18n/recoll_it.ts \
             i18n/recoll_lt.ts \
             i18n/recoll_ru.ts \
             i18n/recoll_tr.ts \
             i18n/recoll_uk.ts \
             i18n/recoll_xx.ts \
             i18n/recoll_zh_CN.ts \
             i18n/recoll_zh.ts \
