!win32:VERSION   = 0.4
win32: CONFIG   += dll
# cannot use .moc/.obj with gcov ("cannot open graph file")
!contains(CONFIG, coverage) {
    MOC_DIR          = .moc
    OBJECTS_DIR      = .obj
}
DESTDIR          = ../../deploy/libs/
#TEMPLATE         = lib

incs.path      = $${include.path}/$${CLEAN_TARGET}/

contains(CONVENIENCE, $${CLEAN_TARGET}){
    for(header,HEADERS){
        incs.files += $$header
    }
    incs.files += ../../deploy/include/$${CLEAN_TARGET}/*
}

LIBS += -L../../deploy/libs/

INSTALLS = target incs
include(../../deploy/qt/qxt.prf)

defineReplace(qxtNativeSeparators) {
   local_path_variable = $$1
   win32 {
      RET = $$replace(local_path_variable,/,\)
   }
   isEmpty(RET):RET = $$local_path_variable
   return($$RET)
}

defineReplace(qxtLibraryTarget) {
   unset(LIBRARY_NAME)
   LIBRARY_NAME = $$1
   mac:!static:contains(QT_CONFIG, qt_framework) {
      QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
      export(QMAKE_FRAMEWORK_BUNDLE_NAME)
   }
   contains(TEMPLATE, .*lib):CONFIG(debug, debug|release) {
      !debug_and_release|build_pass {
          mac:RET = $$member(LIBRARY_NAME, 0)
          else:win32:RET = $$member(LIBRARY_NAME, 0)d
      }
   }
   isEmpty(RET):RET = $$LIBRARY_NAME
   return($$RET)
}

TARGET           = $$qxtLibraryTarget($$CLEAN_TARGET)

astyle.params += --pad=oper
astyle.params += --unpad=paren
astyle.params += --convert-tabs
astyle.params += --brackets=break
astyle.params += --indent-namespaces
astyle.commands = astyle $$astyle.params $$HEADERS $$SOURCES
QMAKE_EXTRA_TARGETS += astyle
