######################################################################
#
#  !!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#
#  Edit only tray-monitor.pro.in  -- tray-monitor.pro is built by the ./configure program
#
#  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#    
# Copyright (C) 2000-2017 Kern Sibbald
# License: BSD 2-Clause; see file LICENSE-FOSS
#
# CONFIG options for Windows are pulled from win32/qmake.conf
CONFIG += qt
#CONFIG += qt debug

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

cross-win32 {
  LIBS       +=  -mwindows -L../../win32/release32 -lbacula
  INCLUDEPATH += ../../win32/compat
}
!cross-win32 {
  LIBS        += -L../../lib -lbaccfg -lbac -L../../findlib -lbacfind @OPENSSL_LIBS@
}


bins.path = /$(DESTDIR)@sbindir@
bins.files = bacula-tray-monitor
confs.path = /$(DESTDIR)@sysconfdir@
confs.commands = ./install_conf_file

TEMPLATE     = app
TARGET       = bacula-tray-monitor
QMAKE_EXTRA_TARGETS += depend
DEPENDPATH  += .
INCLUDEPATH += ../.. . 
LIBTOOL_LINK = @QMAKE_LIBTOOL@ --silent --tag=CXX --mode=link
LIBTOOL_INSTALL = @QMAKE_LIBTOOL@ --silent --mode=install
QMAKE_LINK   = $${LIBTOOL_LINK} $(CXX)
QMAKE_INSTALL_PROGRAM = $${LIBTOOL_INSTALL} install -m @SBINPERM@ -p
QMAKE_CLEAN += obj/* .libs/* bacula-tray-monitor release/bacula-tray-monitor
QMAKE_CXXFLAGS += -DTRAY_MONITOR
QMAKE_CFLAGS += -DTRAY_MONITOR

INSTALLS = bins confs

RESOURCES    = ../main.qrc
MOC_DIR      = moc
OBJECTS_DIR  = obj
UI_DIR       = ui

# Main directory
HEADERS += tray-monitor.h tray_conf.h tray-ui.h fdstatus.h task.h ../util/fmtwidgetitem.h dirstatus.h conf.h sdstatus.h runjob.h status.h restorewizard.h filesmodel.h clientselectwizardpage.h jobselectwizardpage.h fileselectwizardpage.h restoreoptionswizardpage.h
SOURCES +=  tray-monitor.cpp tray_conf.cpp fdstatus.cpp task.cpp authenticate.cpp ../util/fmtwidgetitem.cpp dirstatus.cpp sdstatus.cpp conf.cpp runjob.cpp status.cpp restorewizard.cpp clientselectwizardpage.cpp jobselectwizardpage.cpp fileselectwizardpage.cpp restoreoptionswizardpage.cpp
FORMS += fd-monitor.ui dir-monitor.ui sd-monitor.ui main-conf.ui res-conf.ui run.ui restorewizard.ui clientselectwizardpage.ui jobselectwizardpage.ui fileselectwizardpage.ui restoreoptionswizardpage.ui

TRANSLATIONS += ts/tm_fr.ts ts/tm_de.ts ts/tm_ja.ts
