clean liteidex.pri

clean liteidex.pri

!isEmpty(LITEIDE_PRI_INCLUDED):error("liteidex.pri already included")
LITEIDE_PRI_INCLUDED = 1

defineReplace(qtLibraryName) {
   unset(LIBRARY_NAME)
   LIBRARY_NAME = $$1
   CONFIG(debug, debug|release) {
      !debug_and_release|build_pass {
          mac:RET = $$member(LIBRARY_NAME, 0)_debug
              else:win32:RET = $$member(LIBRARY_NAME, 0)d
      }
   }
   isEmpty(RET):RET = $$LIBRARY_NAME
   return($$RET)
}

isEmpty(IDE_LIBRARY_BASENAME) {
    IDE_LIBRARY_BASENAME = lib
}

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

DEFINES += LITEAPP_LIBRARY

DEFINES += IDE_LIBRARY_BASENAME=\\\"$$IDE_LIBRARY_BASENAME\\\"

isEmpty(PREFIX) {
    PREFIX = /usr/local
}
BINPREFIX = $$PREFIX/bin
LIBPREFIX = $$PREFIX/lib/liteide
PLUGINPREFIX = $$PREFIX/lib/liteide/plugins

IDE_APP_TARGET   = liteide
IDE_SOURCE_TREE = $$PWD
IDE_BUILD_TREE = $$IDE_SOURCE_TREE/liteide

IDE_APP_PATH = $$IDE_BUILD_TREE/bin

macx {
    IDE_APP_TARGET   = "LiteIDE"
    IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns
    IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH
    IDE_DATA_PATH   = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_BIN_PATH     = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS
    contains(QT_CONFIG, ppc):CONFIG += ppc x86
    copydata = 1
} else {
    win32 {
        contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1
        IDE_APP_TARGET   = liteide
    } else {
        IDE_APP_TARGET   = liteide
    }
    IDE_BIN_PATH = $$IDE_BUILD_TREE/bin
    IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/liteide
    IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins
    IDE_DATA_PATH = $$IDE_BUILD_TREE/share/liteide
    !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
}

#LIBS += -L$$IDE_LIBRARY_PATH

#DEFINES += QT_NO_CAST_FROM_ASCII
DEFINES += QT_NO_CAST_TO_ASCII
!macx:DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION

unix {
    CONFIG(debug, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
    CONFIG(release, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared

    CONFIG(debug, debug|release):MOC_DIR = $${OUT_PWD}/.moc/debug-shared
    CONFIG(release, debug|release):MOC_DIR = $${OUT_PWD}/.moc/release-shared

    RCC_DIR = $${OUT_PWD}/.rcc
    UI_DIR = $${OUT_PWD}/.uic
}

linux-g++-* {
    # Bail out on non-selfcontained libraries. Just a security measure
    # to prevent checking in code that does not compile on other platforms.
    QMAKE_LFLAGS += -Wl,--allow-shlib-undefined -Wl,--no-undefined
}

win32-msvc* {
    #Don't warn about sprintf, fopen etc being 'unsafe'
    DEFINES += _CRT_SECURE_NO_WARNINGS
}

linux* {
    contains(CONFIG, liteide_qtwebkit) {
        DEFINES += LITEIDE_QTWEBKIT
    }
} else {
    greaterThan(QT_MAJOR_VERSION, 4) {
    } else {
        DEFINES += LITEIDE_QTWEBKIT
    }
}

HEADERS += \
    $$PWD/src/utils/vterm/vtermcolor.h


delete mne-cpp-global.pri file

delete mne-cpp-global.pri file

############################################## GLOBAL FUNCTIONS ###############################################

# Define minQtVersion Test
defineTest(minQtVersion) {
    maj = $$1
    min = $$2
    patch = $$3
    isEqual(QT_MAJOR_VERSION, $$maj) {
        isEqual(QT_MINOR_VERSION, $$min) {
            isEqual(QT_PATCH_VERSION, $$patch) {
                return(true)
            }
            greaterThan(QT_PATCH_VERSION, $$patch) {
                return(true)
            }
        }
        greaterThan(QT_MINOR_VERSION, $$min) {
            return(true)
        }
    }
    greaterThan(QT_MAJOR_VERSION, $$maj) {
        return(true)
    }
    return(false)
}

############################################### GLOBAL DEFINES ################################################

VERSION = 0.1.9

QMAKE_TARGET_PRODUCT = MNE-CPP
QMAKE_TARGET_DESCRIPTION = A Framework for Electrophysiology.
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2020 Authors of MNE-CPP. All rights reserved.

########################################### PROJECT CONFIGURATION #############################################

# To compile with code coverage support run: qmake MNECPP_CONFIG+=withCodeCov
# To disable tests run: qmake MNECPP_CONFIG+=noTests
# To disable examples run: qmake MNECPP_CONFIG+=noExamples
# To disable applications run: qmake MNECPP_CONFIG+=noApplications
# To disable MNE Scan plugins run: qmake MNECPP_CONFIG+=noMneScanPlugins
# To disable MNE Analyze plugins run: qmake MNECPP_CONFIG+=noMneAnalyzePlugins
# To disable MNE Rt Server plugins run: qmake MNECPP_CONFIG+=noMneRtServerPlugins
# To build applications as .app bundles on MacOS run: qmake MNECPP_CONFIG+=withAppBundles
# To build MNE-CPP libraries and executables statically run: qmake MNECPP_CONFIG+=static
# To build MNE-CPP with FFTW support in Eigen (make sure to specify FFTW_DIRs below) run: qmake MNECPP_CONFIG+=useFFTW
# To build MNE-CPP without QOpenGLWidget support run: qmake MNECPP_CONFIG+=noQOpenGLWidget
# To build MNE-CPP against WebAssembly (Wasm) run: qmake MNECPP_CONFIG+=wasm
# To build MNE-CPP with MNE_TRACER support run: qmake MNECPP_CONFIG+=trace
# To build MNE Scan with BrainFlow support run: qmake MNECPP_CONFIG+=withBrainFlow
# To build MNE Scan with LSL support run: qmake MNECPP_CONFIG+=withLsl
# To build MNE Scan with BrainAMP support run: qmake MNECPP_CONFIG+=withBrainAmp
# To build MNE Scan with EegoSports support run: qmake MNECPP_CONFIG+=withEego
# To build MNE Scan with GUSBAmp support run: qmake MNECPP_CONFIG+=withGUSBAmp
# To build MNE Scan with TMSI support run: qmake MNECPP_CONFIG+=withTmsi

# Default flags
MNECPP_CONFIG += includeTests includeExamples

# Define c++ version
CONFIG += c++14

# Suppress untested SDK version checks on MacOS
macx {
    CONFIG += sdk_no_version_check
}

# Check versions
!minQtVersion(5, 10, 0) {
    error("You are trying to build with Qt version $${QT_VERSION}. However, the minimal Qt version to build MNE-CPP is 5.10.0.")
}

# Build static version if wasm flag was defined
contains(MNECPP_CONFIG, wasm) {
    message("The wasm flag was detected. Building static version of MNE-CPP. Disabling QOpenGLWidget support.")
    MNECPP_CONFIG += static noQOpenGLWidget
}

contains(MNECPP_CONFIG, static) {
    message("The static flag was detected. Building static version of MNE-CPP.")
}

contains(MNECPP_CONFIG, trace) {
    DEFINES += TRACE
}

########################################### DIRECTORY DEFINITIONS #############################################

# Repository directory
ROOT_DIR = $${PWD}

# Include directories
EIGEN_INCLUDE_DIR = $$EIGEN_INCLUDE_DIR
isEmpty(EIGEN_INCLUDE_DIR) {
    EIGEN_INCLUDE_DIR = $$shell_path($${PWD}/include/3rdParty/eigen3)
}

MNE_INCLUDE_DIR = $$MNE_INCLUDE_DIR
isEmpty( MNE_INCLUDE_DIR ) {
    MNE_INCLUDE_DIR = $$shell_path($${PWD}/libraries)
}

MNE_SCAN_INCLUDE_DIR = $$MNE_SCAN_INCLUDE_DIR
isEmpty( MNE_SCAN_INCLUDE_DIR ) {
    MNE_SCAN_INCLUDE_DIR = $$shell_path($${PWD}/applications/mne_scan/libs)
}

MNE_ANALYZE_INCLUDE_DIR = $$MNE_ANALYZE_INCLUDE_DIR
isEmpty( MNE_ANALYZE_INCLUDE_DIR ) {
    MNE_ANALYZE_INCLUDE_DIR = $$shell_path($${PWD}/applications/mne_analyze/libs)
}

# Library directories
MNE_LIBRARY_DIR = $$MNE_LIBRARY_DIR
isEmpty( MNE_LIBRARY_DIR ) {
    MNE_LIBRARY_DIR = $$shell_path($${PWD}/lib)
}

win32 {
    FFTW_DIR_LIBS = $$shell_path($${PWD}/include/3rdParty/fftw)
    FFTW_DIR_INCLUDE = $$shell_path($${PWD}/include/3rdParty/fftw)
}
unix{
    FFTW_DIR_LIBS = $$shell_path($${PWD}/include/3rdParty/fftw/lib)
    FFTW_DIR_INCLUDE = $$shell_path($${PWD}/include/3rdParty/fftw/include)
}

# Binary directory
MNE_BINARY_DIR = $$MNE_BINARY_DIR
isEmpty( MNE_BINARY_DIR ) {
    MNE_BINARY_DIR = $$shell_path($${PWD}/bin)
}

# Install directory
MNE_INSTALL_INCLUDE_DIR = $$MNE_INSTALL_INCLUDE_DIR
isEmpty( MNE_INSTALL_INCLUDE_DIR ) {
    MNE_INSTALL_INCLUDE_DIR = $$shell_path($${PWD}/include)
}


x2t version up

x2t version up

#-------------------------------------------------
#
# Project created by QtCreator 2014-10-03T18:30:31
#
#-------------------------------------------------

QT       -= core
QT       -= gui

VERSION = 2.0.3.426
DEFINES += INTVER=$$VERSION

TARGET = x2t

CORE_ROOT_DIR = $$PWD/../../..
PWD_ROOT_DIR = $$PWD

CONFIG += core_static_link_libstd
CONFIG += core_x2t
include(../../../Common/base.pri)
include(../../../Common/3dParty/icu/icu.pri)

core_windows {
    QMAKE_LFLAGS += /INCREMENTAL:NO

    contains(QMAKE_TARGET.arch, x86_64):{
        QMAKE_LFLAGS_CONSOLE  = /SUBSYSTEM:CONSOLE,5.02
    } else {
        QMAKE_LFLAGS_CONSOLE  = /SUBSYSTEM:CONSOLE,5.01
    }

} else {
    QMAKE_CXXFLAGS += -Wall -Wno-ignored-qualifiers
}

#CONFIG += build_for_centos6
build_for_centos6 {
    QMAKE_LFLAGS += -Wl,--dynamic-linker=./ld-linux-x86-64.so.2
}

DEFINES += UNICODE \
    _UNICODE \
    _USE_LIBXML2_READER_ \
    _USE_XMLLITE_READER_ \
    USE_LITE_READER \
    PPTX_DEF\
    PPT_DEF\
    ENABLE_PPT_TO_PPTX_CONVERT\
    NODOCX \
    #DISABLE_FILE_DOWNLOADER \
    FILTER_FLATE_DECODE_ENABLED \
    CXIMAGE_DONT_DECLARE_TCHAR \
    BUILD_CONFIG_FULL_VERSION \
    DONT_WRITE_EMBEDDED_FONTS \
    AVS_USE_CONVERT_PPTX_TOCUSTOM_VML \
    LIBXML_READER_ENABLED

DEFINES += PDFREADER_USE_DYNAMIC_LIBRARY
DEFINES += PDFWRITER_USE_DYNAMIC_LIBRARY
DEFINES += XPS_USE_DYNAMIC_LIBRARY
DEFINES += DJVU_USE_DYNAMIC_LIBRARY
DEFINES += HTMLRENDERER_USE_DYNAMIC_LIBRARY
DEFINES += HTMLFILE_USE_DYNAMIC_LIBRARY
DEFINES += UNICODECONVERTER_USE_DYNAMIC_LIBRARY

core_windows {
    INCLUDEPATH += ../../../OfficeUtils/src/zlib-1.2.3
}
core_mac {
    INCLUDEPATH += ../../../OfficeUtils/src/zlib-1.2.3
}

INCLUDEPATH += ../../../DesktopEditor/xml/libxml2/include
INCLUDEPATH += ../../../DesktopEditor/freetype-2.5.2/include
INCLUDEPATH += ../../../DesktopEditor/agg-2.4/include

INCLUDEPATH += $$PWD/../../../Common/DocxFormat
DEPENDPATH += $$PWD/../../../Common/DocxFormat

INCLUDEPATH += $$PWD/../../../ASCOfficePPTXFile/
DEPENDPATH += $$PWD/../../../ASCOfficePPTXFile/

INCLUDEPATH += $$PWD/../../../ASCOfficePPTXFile/Editor/
DEPENDPATH += $$PWD/../../../ASCOfficePPTXFile/Editor/

INCLUDEPATH += $$PWD/../../../OfficeUtils/src
DEPENDPATH += $$PWD/../../../OfficeUtils/src

INCLUDEPATH += $$PWD/../../../ASCOfficeDocxFile2
DEPENDPATH += $$PWD/../../../ASCOfficeDocxFile2

##############################################################################################################

SOURCES += ../../src/cextracttools.cpp \
    ../../../Common/OfficeFileFormatChecker2.cpp \
	../../src/ASCConverters.cpp
HEADERS += ../../src/cextracttools.h \
    ../../../Common/OfficeFileFormatChecker.h \
	../../src/ASCConverters.h \
	../../../DesktopEditor/graphics/MetafileToGraphicsRenderer.h

#Xls file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lXlsFormatLib
# odf format writer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lOdfFileWriterLib
# odf format reader
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lOdfFileReaderLib
#doc file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lDocFormatLib
# ppt file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPptFormatLib
#rtf file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lRtfFormatLib
#txt(xml) file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lTxtXmlFormatLib
# pdf writer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPdfWriter
#docxfile2
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lASCOfficeDocxFile2Lib
#pptxformat
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPPTXFormatLib
#docxformat
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lDocxFormatLib
#office utils
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lOfficeUtils
#graphics
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lgraphics
#doctrenderer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -ldoctrenderer
#HtmlRenderer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lHtmlRenderer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPdfReader
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lDjVuFile
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lXpsFile
#HtmlFile
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lHtmlFile
#UnicodeConverter
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lUnicodeConverter
#Crypto++
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lCryptoPPLib

#####################################################
# внешнее подключение сторонних библиотек

#BOOST
CONFIG += core_boost_regex
include($$PWD/../../../Common/3dParty/boost/boost.pri)

core_windows {
    LIBS += -lurlmon
    LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -llibxml
}

core_linux {
    LIBS += -lz
    LIBS += -lxml2
    LIBS += -lcurl
}

mac {
    LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -llibxml
    LIBS += -framework AppKit
}
########################################################

#-------------------------------------------------
#
# Project created by QtCreator 2014-10-03T18:30:31
#
#-------------------------------------------------

QT       -= core
QT       -= gui

VERSION = 2.0.2.425
DEFINES += INTVER=$$VERSION

TARGET = x2t

CORE_ROOT_DIR = $$PWD/../../..
PWD_ROOT_DIR = $$PWD

CONFIG += core_static_link_libstd
CONFIG += core_x2t
include(../../../Common/base.pri)
include(../../../Common/3dParty/icu/icu.pri)

core_windows {
    QMAKE_LFLAGS += /INCREMENTAL:NO

    contains(QMAKE_TARGET.arch, x86_64):{
        QMAKE_LFLAGS_CONSOLE  = /SUBSYSTEM:CONSOLE,5.02
    } else {
        QMAKE_LFLAGS_CONSOLE  = /SUBSYSTEM:CONSOLE,5.01
    }

} else {
    QMAKE_CXXFLAGS += -Wall -Wno-ignored-qualifiers
}

#CONFIG += build_for_centos6
build_for_centos6 {
    QMAKE_LFLAGS += -Wl,--dynamic-linker=./ld-linux-x86-64.so.2
}

DEFINES += UNICODE \
    _UNICODE \
    _USE_LIBXML2_READER_ \
    _USE_XMLLITE_READER_ \
    USE_LITE_READER \
    PPTX_DEF\
    PPT_DEF\
    ENABLE_PPT_TO_PPTX_CONVERT\
    NODOCX \
    #DISABLE_FILE_DOWNLOADER \
    FILTER_FLATE_DECODE_ENABLED \
    CXIMAGE_DONT_DECLARE_TCHAR \
    BUILD_CONFIG_FULL_VERSION \
    DONT_WRITE_EMBEDDED_FONTS \
    AVS_USE_CONVERT_PPTX_TOCUSTOM_VML \
    LIBXML_READER_ENABLED

DEFINES += PDFREADER_USE_DYNAMIC_LIBRARY
DEFINES += PDFWRITER_USE_DYNAMIC_LIBRARY
DEFINES += XPS_USE_DYNAMIC_LIBRARY
DEFINES += DJVU_USE_DYNAMIC_LIBRARY
DEFINES += HTMLRENDERER_USE_DYNAMIC_LIBRARY
DEFINES += HTMLFILE_USE_DYNAMIC_LIBRARY
DEFINES += UNICODECONVERTER_USE_DYNAMIC_LIBRARY

core_windows {
    INCLUDEPATH += ../../../OfficeUtils/src/zlib-1.2.3
}
core_mac {
    INCLUDEPATH += ../../../OfficeUtils/src/zlib-1.2.3
}

INCLUDEPATH += ../../../DesktopEditor/xml/libxml2/include
INCLUDEPATH += ../../../DesktopEditor/freetype-2.5.2/include
INCLUDEPATH += ../../../DesktopEditor/agg-2.4/include

INCLUDEPATH += $$PWD/../../../Common/DocxFormat
DEPENDPATH += $$PWD/../../../Common/DocxFormat

INCLUDEPATH += $$PWD/../../../ASCOfficePPTXFile/
DEPENDPATH += $$PWD/../../../ASCOfficePPTXFile/

INCLUDEPATH += $$PWD/../../../ASCOfficePPTXFile/Editor/
DEPENDPATH += $$PWD/../../../ASCOfficePPTXFile/Editor/

INCLUDEPATH += $$PWD/../../../OfficeUtils/src
DEPENDPATH += $$PWD/../../../OfficeUtils/src

INCLUDEPATH += $$PWD/../../../ASCOfficeDocxFile2
DEPENDPATH += $$PWD/../../../ASCOfficeDocxFile2

##############################################################################################################

SOURCES += ../../src/cextracttools.cpp \
    ../../../Common/OfficeFileFormatChecker2.cpp \
	../../src/ASCConverters.cpp
HEADERS += ../../src/cextracttools.h \
    ../../../Common/OfficeFileFormatChecker.h \
	../../src/ASCConverters.h \
	../../../DesktopEditor/graphics/MetafileToGraphicsRenderer.h

#Xls file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lXlsFormatLib
# odf format writer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lOdfFileWriterLib
# odf format reader
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lOdfFileReaderLib
#doc file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lDocFormatLib
# ppt file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPptFormatLib
#rtf file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lRtfFormatLib
#txt(xml) file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lTxtXmlFormatLib
# pdf writer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPdfWriter
#docxfile2
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lASCOfficeDocxFile2Lib
#pptxformat
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPPTXFormatLib
#docxformat
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lDocxFormatLib
#office utils
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lOfficeUtils
#graphics
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lgraphics
#doctrenderer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -ldoctrenderer
#HtmlRenderer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lHtmlRenderer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPdfReader
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lDjVuFile
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lXpsFile
#HtmlFile
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lHtmlFile
#UnicodeConverter
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lUnicodeConverter
#Crypto++
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lCryptoPPLib

#####################################################
# внешнее подключение сторонних библиотек

#BOOST
CONFIG += core_boost_regex
include($$PWD/../../../Common/3dParty/boost/boost.pri)

core_windows {
    LIBS += -lurlmon
    LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -llibxml
}

core_linux {
    LIBS += -lz
    LIBS += -lxml2
    LIBS += -lcurl
}

mac {
    LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -llibxml
    LIBS += -framework AppKit
}
########################################################


Add module webengine

Add module webengine

#Include libs the windows way, for visual studio 64 bit compiler
#static for VS
#Compile Qt from source
#Refrences for MSVC
# http://amin-ahmadi.com/2016/09/22/how-to-build-qt-5-7-statically-using-msvc14-microsoft-visual-studio-2015/
# https://stackoverflow.com/questions/32735678/how-to-build-qt-5-5-qtwebengine-on-windows-msvc-2015
# configure -prefix "C:\D\QtSDK\5.10.1\msvc2017_64_static" -platform win64-msvc2017 -developer-build -opensource -confirm-license -nomake examples -nomake tests -opengl desktop -debug-and-release -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -sql-sqlite -sql-odbc -make libs
# nmake
# nmake install
CONFIG += static

QT += webengine

QMAKE_LFLAGS += -static
QMAKE_CXXFLAGS += /MT
QMAKE_CFLAGS += -O2 -MT
QMAKE_CXXFLAGS += -O2 -MT

DEFINES -= NDEBUG
DEFINES += _WINSOCKAPI_

CONFIG(release, debug|release) {
    message( "release" )
    LIBSPATH = $$PWD/../packages64bit/lib
}
CONFIG(debug, debug|release) {
    message( "debug" )
    LIBSPATH = $$PWD/../packages64bit/debug/lib
}

HEADERS += $$PWD/win/unistd.h
INCLUDEPATH += $$PWD/win

#Command to install dependencies (Static)
#vcpkg.exe install boost:x64-windows-static berkeleydb:x64-windows-static leveldb:x64-windows-static libevent:x64-windows-static lua:x64-windows-static openssl:x64-windows-static zlib:x64-windows-static
#Command to install dependencies (Dynamic)
#vcpkg.exe install boost:x64-windows berkeleydb:x64-windows leveldb:x64-windows libevent:x64-windows lua:x64-windows openssl:x64-windows zlib:x64-windows
DEFINES += BOOST_ASIO_ENABLE_OLD_SERVICES BOOST_SPIRIT_THREADSAFE BOOST_THREAD_USE_LIB
#DEFINES += BOOST_DISABLE_CURRENT_FUNCTION

INCLUDEPATH += $$PWD/../packages64bit/include
DEPENDPATH += $$PWD/../packages64bit/include

LIBS += -L$${LIBSPATH}/ -llua
PRE_TARGETDEPS += $${LIBSPATH}/lua.lib
LIBS += -L$${LIBSPATH} -lboost_chrono-vc140-mt
PRE_TARGETDEPS += $${LIBSPATH}/boost_chrono-vc140-mt.lib
LIBS += -L$${LIBSPATH}/ -lboost_filesystem-vc140-mt
PRE_TARGETDEPS += $${LIBSPATH}/boost_filesystem-vc140-mt.lib
LIBS += -L$${LIBSPATH}/ -lboost_program_options-vc140-mt
PRE_TARGETDEPS += $${LIBSPATH}/boost_program_options-vc140-mt.lib
LIBS += -L$${LIBSPATH}/ -lboost_system-vc140-mt
PRE_TARGETDEPS += $${LIBSPATH}/boost_system-vc140-mt.lib
LIBS += -L$${LIBSPATH}/ -lboost_thread-vc140-mt
PRE_TARGETDEPS += $${LIBSPATH}/boost_thread-vc140-mt.lib
LIBS += -L$${LIBSPATH}/ -lboost_unit_test_framework-vc140-mt
PRE_TARGETDEPS += $${LIBSPATH}/boost_unit_test_framework-vc140-mt.lib
LIBS += -L$${LIBSPATH}/ -lzlib
PRE_TARGETDEPS += $${LIBSPATH}/zlib.lib
LIBS += -L$${LIBSPATH}/ -llibcryptoMD
PRE_TARGETDEPS += $${LIBSPATH}/libcryptoMD.lib
LIBS += -L$${LIBSPATH}/ -llibsslMD
PRE_TARGETDEPS += $${LIBSPATH}/libsslMD.lib
LIBS += -L$${LIBSPATH}/ -levent
PRE_TARGETDEPS += $${LIBSPATH}/event.lib
LIBS += -L$${LIBSPATH}/ -levent_core
PRE_TARGETDEPS += $${LIBSPATH}/event_core.lib
LIBS += -L$${LIBSPATH}/ -levent_extra
PRE_TARGETDEPS += $${LIBSPATH}/event_extra.lib
LIBS += -L$${LIBSPATH}/ -lWS2_32
PRE_TARGETDEPS += $${LIBSPATH}/WS2_32.lib
LIBS += -L$${LIBSPATH}/ -lAdvAPI32
PRE_TARGETDEPS += $${LIBSPATH}/AdvAPI32.lib
LIBS += -L$${LIBSPATH}/ -lshell32
PRE_TARGETDEPS += $${LIBSPATH}/shell32.lib
LIBS += -L$${LIBSPATH}/ -lUser32
PRE_TARGETDEPS += $${LIBSPATH}/User32.lib
LIBS += -L$${LIBSPATH}/ -lCrypt32
PRE_TARGETDEPS += $${LIBSPATH}/Crypt32.lib
#ShLwApi
LIBS += -L$${LIBSPATH}/ -lShLwApi
PRE_TARGETDEPS += $${LIBSPATH}/ShLwApi.lib

#LevelDB from VCPKG
LIBS += -L$${LIBSPATH}/ -llibleveldb
PRE_TARGETDEPS += $${LIBSPATH}/libleveldb.lib
#BerklyDB4.8 from our project repo (VCPKG version is not supported)
LIBS += -L$${LIBSPATH}/ -llibdb48
PRE_TARGETDEPS += $${LIBSPATH}/libdb48.lib
#libdb_stl48.lib (We need both libdb and libdbstl (Standered library)
LIBS += -L$${LIBSPATH}/ -llibdb_stl48
PRE_TARGETDEPS += $${LIBSPATH}/libdb_stl48.lib

#LIBS += -L$$PWD/../tor/ -ltorlib
#PRE_TARGETDEPS += $$PWD/../tor/torlib.lib
LIBS += -L$$PWD/../leveldb/ -lleveldblib
PRE_TARGETDEPS += $$PWD/../leveldb/leveldblib.lib
#LIBS += -L$$PWD/../db4.8/ -lberkeleydblib
#PRE_TARGETDEPS += $$PWD/../db4.8/berkeleydblib.lib

QMAKE_CFLAGS_WARN_ON -= -W3
QMAKE_CFLAGS_WARN_ON += -W2

QMAKE_CXXFLAGS_WARN_ON -= -W3
QMAKE_CXXFLAGS_WARN_ON += -W2

QMAKE_CXXFLAGS += -O2 -D_FORTIFY_SOURCE=1
QMAKE_CFLAGS += /std:c++17
QMAKE_CXXFLAGS += /std:c++17

#Include libs the windows way, for visual studio 64 bit compiler
#static for VS
#Compile Qt from source
#Refrences for MSVC
# http://amin-ahmadi.com/2016/09/22/how-to-build-qt-5-7-statically-using-msvc14-microsoft-visual-studio-2015/
# https://stackoverflow.com/questions/32735678/how-to-build-qt-5-5-qtwebengine-on-windows-msvc-2015
# configure -prefix "C:\D\QtSDK\5.10.1\msvc2017_64_static" -platform win64-msvc2017 -developer-build -opensource -confirm-license -nomake examples -nomake tests -opengl desktop -debug-and-release -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -sql-sqlite -sql-odbc -make libs
# nmake
# nmake install
CONFIG += static
QMAKE_LFLAGS += -static
QMAKE_CXXFLAGS += /MT
QMAKE_CFLAGS += -O2 -MT
QMAKE_CXXFLAGS += -O2 -MT

DEFINES -= NDEBUG
DEFINES += _WINSOCKAPI_

CONFIG(release, debug|release) {
    message( "release" )
    LIBSPATH = $$PWD/../packages64bit/lib
}
CONFIG(debug, debug|release) {
    message( "debug" )
    LIBSPATH = $$PWD/../packages64bit/debug/lib
}

HEADERS += $$PWD/win/unistd.h
INCLUDEPATH += $$PWD/win

#Command to install dependencies (Static)
#vcpkg.exe install boost:x64-windows-static berkeleydb:x64-windows-static leveldb:x64-windows-static libevent:x64-windows-static lua:x64-windows-static openssl:x64-windows-static zlib:x64-windows-static
#Command to install dependencies (Dynamic)
#vcpkg.exe install boost:x64-windows berkeleydb:x64-windows leveldb:x64-windows libevent:x64-windows lua:x64-windows openssl:x64-windows zlib:x64-windows
DEFINES += BOOST_ASIO_ENABLE_OLD_SERVICES BOOST_SPIRIT_THREADSAFE BOOST_THREAD_USE_LIB
#DEFINES += BOOST_DISABLE_CURRENT_FUNCTION

INCLUDEPATH += $$PWD/../packages64bit/include
DEPENDPATH += $$PWD/../packages64bit/include

LIBS += -L$${LIBSPATH}/ -llua
PRE_TARGETDEPS += $${LIBSPATH}/lua.lib
LIBS += -L$${LIBSPATH} -lboost_chrono-vc140-mt
PRE_TARGETDEPS += $${LIBSPATH}/boost_chrono-vc140-mt.lib
LIBS += -L$${LIBSPATH}/ -lboost_filesystem-vc140-mt
PRE_TARGETDEPS += $${LIBSPATH}/boost_filesystem-vc140-mt.lib
LIBS += -L$${LIBSPATH}/ -lboost_program_options-vc140-mt
PRE_TARGETDEPS += $${LIBSPATH}/boost_program_options-vc140-mt.lib
LIBS += -L$${LIBSPATH}/ -lboost_system-vc140-mt
PRE_TARGETDEPS += $${LIBSPATH}/boost_system-vc140-mt.lib
LIBS += -L$${LIBSPATH}/ -lboost_thread-vc140-mt
PRE_TARGETDEPS += $${LIBSPATH}/boost_thread-vc140-mt.lib
LIBS += -L$${LIBSPATH}/ -lboost_unit_test_framework-vc140-mt
PRE_TARGETDEPS += $${LIBSPATH}/boost_unit_test_framework-vc140-mt.lib
LIBS += -L$${LIBSPATH}/ -lzlib
PRE_TARGETDEPS += $${LIBSPATH}/zlib.lib
LIBS += -L$${LIBSPATH}/ -llibcryptoMD
PRE_TARGETDEPS += $${LIBSPATH}/libcryptoMD.lib
LIBS += -L$${LIBSPATH}/ -llibsslMD
PRE_TARGETDEPS += $${LIBSPATH}/libsslMD.lib
LIBS += -L$${LIBSPATH}/ -levent
PRE_TARGETDEPS += $${LIBSPATH}/event.lib
LIBS += -L$${LIBSPATH}/ -levent_core
PRE_TARGETDEPS += $${LIBSPATH}/event_core.lib
LIBS += -L$${LIBSPATH}/ -levent_extra
PRE_TARGETDEPS += $${LIBSPATH}/event_extra.lib
LIBS += -L$${LIBSPATH}/ -lWS2_32
PRE_TARGETDEPS += $${LIBSPATH}/WS2_32.lib
LIBS += -L$${LIBSPATH}/ -lAdvAPI32
PRE_TARGETDEPS += $${LIBSPATH}/AdvAPI32.lib
LIBS += -L$${LIBSPATH}/ -lshell32
PRE_TARGETDEPS += $${LIBSPATH}/shell32.lib
LIBS += -L$${LIBSPATH}/ -lUser32
PRE_TARGETDEPS += $${LIBSPATH}/User32.lib
LIBS += -L$${LIBSPATH}/ -lCrypt32
PRE_TARGETDEPS += $${LIBSPATH}/Crypt32.lib
#ShLwApi
LIBS += -L$${LIBSPATH}/ -lShLwApi
PRE_TARGETDEPS += $${LIBSPATH}/ShLwApi.lib

#LevelDB from VCPKG
LIBS += -L$${LIBSPATH}/ -llibleveldb
PRE_TARGETDEPS += $${LIBSPATH}/libleveldb.lib
#BerklyDB4.8 from our project repo (VCPKG version is not supported)
LIBS += -L$${LIBSPATH}/ -llibdb48
PRE_TARGETDEPS += $${LIBSPATH}/libdb48.lib
#libdb_stl48.lib (We need both libdb and libdbstl (Standered library)
LIBS += -L$${LIBSPATH}/ -llibdb_stl48
PRE_TARGETDEPS += $${LIBSPATH}/libdb_stl48.lib

#LIBS += -L$$PWD/../tor/ -ltorlib
#PRE_TARGETDEPS += $$PWD/../tor/torlib.lib
LIBS += -L$$PWD/../leveldb/ -lleveldblib
PRE_TARGETDEPS += $$PWD/../leveldb/leveldblib.lib
#LIBS += -L$$PWD/../db4.8/ -lberkeleydblib
#PRE_TARGETDEPS += $$PWD/../db4.8/berkeleydblib.lib

QMAKE_CFLAGS_WARN_ON -= -W3
QMAKE_CFLAGS_WARN_ON += -W2

QMAKE_CXXFLAGS_WARN_ON -= -W3
QMAKE_CXXFLAGS_WARN_ON += -W2

QMAKE_CXXFLAGS += -O2 -D_FORTIFY_SOURCE=1
QMAKE_CFLAGS += /std:c++17
QMAKE_CXXFLAGS += /std:c++17


Enabled osgEarth support on Linux systems

#-------------------------------------------------
#
# QGroundControl - Micro Air Vehicle Groundstation
#
# Please see our website at <http://qgroundcontrol.org>
#
# Author:
# Lorenz Meier <mavteam@student.ethz.ch>
#
# (c) 2009-2010 PIXHAWK Team
#
# This file is part of the mav groundstation project
# QGroundControl is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# QGroundControl is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with QGroundControl. If not, see <http://www.gnu.org/licenses/>.
#
#-------------------------------------------------

#$$BASEDIR/lib/qextserialport/include
#               $$BASEDIR/lib/openjaus/libjaus/include \
#               $$BASEDIR/lib/openjaus/libopenJaus/include

message(Qt version $$[QT_VERSION])

release {
#    DEFINES += QT_NO_DEBUG_OUTPUT
#    DEFINES += QT_NO_WARNING_OUTPUT
}

# MAC OS X
macx {

    HARDWARE_PLATFORM = $$system(uname -a)
    contains( HARDWARE_PLATFORM, 9.6.0 ) || contains( HARDWARE_PLATFORM, 9.7.0 ) || contains( HARDWARE_PLATFORM, 9.8.0 ) || || contains( HARDWARE_PLATFORM, 9.9.0 ) {
        # x86 Mac OS X Leopard 10.5 and earlier
        CONFIG += x86 cocoa phonon
        message(Building for Mac OS X 32bit/Leopard 10.5 and earlier)

                # Enable function-profiling with the OS X saturn tool
                debug {
                        #QMAKE_CXXFLAGS += -finstrument-functions
                        #LIBS += -lSaturn
                }
    } else {
        # x64 Mac OS X Snow Leopard 10.6 and later
        CONFIG += x86_64 cocoa
        CONFIG -= x86 phonon
        message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later)
    }

    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6

    DESTDIR = $$BASEDIR/bin/mac
    INCLUDEPATH += -framework SDL \
        $$BASEDIR/../mavlink/contrib/slugs/include \
        $$BASEDIR/../mavlink/include

    LIBS += -framework IOKit \
        -framework SDL \
        -framework CoreFoundation \
        -framework ApplicationServices \
 #       -framework GLUT \
        -lm

    ICON = $$BASEDIR/images/icons/macx.icns

    # Copy audio files if needed
    QMAKE_PRE_LINK += cp -r $$BASEDIR/audio $$DESTDIR/qgroundcontrol.app/Contents/MacOs/.

    exists(/opt/local/lib/osg):exists("/opt/local/lib/osgEarth") {
    message("Building support for OSGEARTH")
    DEPENDENCIES_PRESENT += osgearth
    LIBS += -L/opt/local/lib/
    INCLUDEPATH += /opt/local/include
    # Include OpenSceneGraph and osgEarth libraries
    LIBS += -losg \
        -losgViewer \
        -losgEarth
    DEFINES += QGC_OSG_ENABLED
    }
}

# GNU/Linux
linux-g++-32 {

    CONFIG += debug

    debug {
        DESTDIR = $$BASEDIR
    }

    release {
        DESTDIR = $$BASEDIR
    }
    INCLUDEPATH += /usr/include \
                   /usr/include/qt4/phonon
              # $$BASEDIR/lib/flite/include \
              # $$BASEDIR/lib/flite/lang

    HARDWARE_PLATFORM = $$system(uname -a)
    contains( HARDWARE_PLATFORM, x86_64 ) {
        # 64-bit Linux
        #LIBS += \
            #-L$$BASEDIR/lib/flite/linux64
        message(Building for GNU/Linux 64bit/x64)
    } else {
        # 32-bit Linux
        #LIBS += \
           #-L$$BASEDIR/lib/flite/linux32
        message(Building for GNU/Linux 32bit/i386)
    }
    LIBS += \
        -L/usr/lib \
        -lm \
        -lflite_cmu_us_kal \
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
        -lSDL \
        -lSDLmain

exists(/usr/lib/osg):exists(/usr/lib/osgEarth) {
message("Building support for OSGEARTH")
DEPENDENCIES_PRESENT += osgearth
# Include OpenSceneGraph and osgEarth libraries
LIBS += -losg \
    -losgViewer \
    -losgEarth
DEFINES += QGC_OSG_ENABLED
}

QMAKE_CXXFLAGS += -Wl,-E

        #-lflite_cmu_us_rms \
        #-lflite_cmu_us_slt \
}

linux-g++-64 {
    CONFIG += debug

    debug {
        DESTDIR = $$BASEDIR
    }

    release {
        DESTDIR = $$BASEDIR
    }
    INCLUDEPATH += /usr/include \
                   /usr/include/qt4/phonon
              # $$BASEDIR/lib/flite/include \
              # $$BASEDIR/lib/flite/lang

    HARDWARE_PLATFORM = $$system(uname -a)
    contains( HARDWARE_PLATFORM, x86_64 ) {
        # 64-bit Linux
        #LIBS += \
            #-L$$BASEDIR/lib/flite/linux64
        message(Building for GNU/Linux 64bit/x64)
    } else {
        # 32-bit Linux
        #LIBS += \
           #-L$$BASEDIR/lib/flite/linux32
        message(Building for GNU/Linux 32bit/i386)
    }
    LIBS += \
        -L/usr/lib \
        -lm \
        -lflite_cmu_us_kal \
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
        -lSDL \
        -lSDLmain

exists(/usr/lib/osg):exists(/usr/lib/osgEarth) {
message("Building support for OSGEARTH")
DEPENDENCIES_PRESENT += osgearth
# Include OpenSceneGraph and osgEarth libraries
LIBS += -losg \
    -losgViewer \
    -losgEarth
DEFINES += QGC_OSG_ENABLED
}
}

# Windows (32bit)
win32 {

    message(Building for Windows Platform (32bit))

    # Special settings for debug
    #CONFIG += CONSOLE

    INCLUDEPATH += $$BASEDIR\lib\sdl\include \
                   $$BASEDIR\lib\opal\include #\ #\
                   #"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"

    LIBS += -L$$BASEDIR\lib\sdl\win32 \
             -lmingw32 -lSDLmain -lSDL -mwindows

    debug {
        DESTDIR = $$BASEDIR/bin
    }

    release {
        DESTDIR = $$BASEDIR/bin
    }

    RC_FILE = $$BASEDIR/qgroundcontrol.rc

    # Copy dependencies
    QMAKE_PRE_LINK += copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/debug/ & copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/release/
    QMAKE_PRE_LINK += copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/debug/ & copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/release/
    QMAKE_PRE_LINK += copy /Y audio $$BUILDDIR\debug\
}

# Windows (64bit)
win64 {

    message(Building for Windows Platform (64bit))

    # Special settings for debug
    #CONFIG += CONSOLE

    INCLUDEPATH += $$BASEDIR\lib\sdl\include \
                   $$BASEDIR\lib\opal\include #\ #\
                   #"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"

    LIBS += -L$$BASEDIR\lib\sdl\win32 \
             -lmingw32 -lSDLmain -lSDL -mwindows

    debug {
        DESTDIR = $$BASEDIR/bin
    }

    release {
        DESTDIR = $$BASEDIR/bin
    }

    RC_FILE = $$BASEDIR/qgroundcontrol.rc

    # Copy dependencies
    QMAKE_PRE_LINK += copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/debug/ & copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/release/
    QMAKE_PRE_LINK += copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/debug/ & copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/release/
    QMAKE_PRE_LINK += copy /Y audio $$BUILDDIR\debug\
}

#-------------------------------------------------
#
# QGroundControl - Micro Air Vehicle Groundstation
#
# Please see our website at <http://qgroundcontrol.org>
#
# Author:
# Lorenz Meier <mavteam@student.ethz.ch>
#
# (c) 2009-2010 PIXHAWK Team
#
# This file is part of the mav groundstation project
# QGroundControl is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# QGroundControl is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with QGroundControl. If not, see <http://www.gnu.org/licenses/>.
#
#-------------------------------------------------

#$$BASEDIR/lib/qextserialport/include
#               $$BASEDIR/lib/openjaus/libjaus/include \
#               $$BASEDIR/lib/openjaus/libopenJaus/include

message(Qt version $$[QT_VERSION])

release {
#    DEFINES += QT_NO_DEBUG_OUTPUT
#    DEFINES += QT_NO_WARNING_OUTPUT
}

# MAC OS X
macx {

    HARDWARE_PLATFORM = $$system(uname -a)
    contains( HARDWARE_PLATFORM, 9.6.0 ) || contains( HARDWARE_PLATFORM, 9.7.0 ) || contains( HARDWARE_PLATFORM, 9.8.0 ) || || contains( HARDWARE_PLATFORM, 9.9.0 ) {
        # x86 Mac OS X Leopard 10.5 and earlier
        CONFIG += x86 cocoa phonon
        message(Building for Mac OS X 32bit/Leopard 10.5 and earlier)

                # Enable function-profiling with the OS X saturn tool
                debug {
                        #QMAKE_CXXFLAGS += -finstrument-functions
                        #LIBS += -lSaturn
                }
    } else {
        # x64 Mac OS X Snow Leopard 10.6 and later
        CONFIG += x86_64 cocoa
        CONFIG -= x86 phonon
        message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later)
    }

    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6

    DESTDIR = $$BASEDIR/bin/mac
    INCLUDEPATH += -framework SDL \
        $$BASEDIR/../mavlink/contrib/slugs/include \
        $$BASEDIR/../mavlink/include

    LIBS += -framework IOKit \
        -framework SDL \
        -framework CoreFoundation \
        -framework ApplicationServices \
 #       -framework GLUT \
        -lm

    ICON = $$BASEDIR/images/icons/macx.icns

    # Copy audio files if needed
    QMAKE_PRE_LINK += cp -r $$BASEDIR/audio $$DESTDIR/qgroundcontrol.app/Contents/MacOs/.

    exists(/opt/local/lib/osg):exists("/opt/local/lib/osgEarth") {
    message("Building support for OSGEARTH")
    LIBS += -L/opt/local/lib/
    INCLUDEPATH += /opt/local/include
    # Include OpenSceneGraph and osgEarth libraries
    LIBS += -losg \
        -losgViewer \
        -losgEarth
    DEFINES += QGC_OSG_ENABLED
    }
}

# GNU/Linux
linux-g++-32 {

    CONFIG += debug

    debug {
        DESTDIR = $$BASEDIR
    }

    release {
        DESTDIR = $$BASEDIR
    }
    INCLUDEPATH += /usr/include \
                   /usr/include/qt4/phonon
              # $$BASEDIR/lib/flite/include \
              # $$BASEDIR/lib/flite/lang

    HARDWARE_PLATFORM = $$system(uname -a)
    contains( HARDWARE_PLATFORM, x86_64 ) {
        # 64-bit Linux
        #LIBS += \
            #-L$$BASEDIR/lib/flite/linux64
        message(Building for GNU/Linux 64bit/x64)
    } else {
        # 32-bit Linux
        #LIBS += \
           #-L$$BASEDIR/lib/flite/linux32
        message(Building for GNU/Linux 32bit/i386)
    }
    LIBS += \
        -L/usr/lib \
        -lm \
        -lflite_cmu_us_kal \
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
        -lSDL \
        -lSDLmain

exists(/usr/lib/osg):exists(/usr/lib/osgEarth) {
message("Building support for OSGEARTH")
# Include OpenSceneGraph and osgEarth libraries
LIBS += -losg \
    -losgViewer \
    -losgEarth
DEFINES += QGC_OSG_ENABLED
}

QMAKE_CXXFLAGS += -Wl,-E

        #-lflite_cmu_us_rms \
        #-lflite_cmu_us_slt \
}

linux-g++-64 {
    CONFIG += debug

    debug {
        DESTDIR = $$BASEDIR
    }

    release {
        DESTDIR = $$BASEDIR
    }
    INCLUDEPATH += /usr/include \
                   /usr/include/qt4/phonon
              # $$BASEDIR/lib/flite/include \
              # $$BASEDIR/lib/flite/lang

    HARDWARE_PLATFORM = $$system(uname -a)
    contains( HARDWARE_PLATFORM, x86_64 ) {
        # 64-bit Linux
        #LIBS += \
            #-L$$BASEDIR/lib/flite/linux64
        message(Building for GNU/Linux 64bit/x64)
    } else {
        # 32-bit Linux
        #LIBS += \
           #-L$$BASEDIR/lib/flite/linux32
        message(Building for GNU/Linux 32bit/i386)
    }
    LIBS += \
        -L/usr/lib \
        -lm \
        -lflite_cmu_us_kal \
        -lflite_usenglish \
        -lflite_cmulex \
        -lflite \
        -lSDL \
        -lSDLmain

exists(/usr/lib/osg):exists(/usr/lib/osgEarth) {
message("Building support for OSGEARTH")
# Include OpenSceneGraph and osgEarth libraries
LIBS += -losg \
    -losgViewer \
    -losgEarth
DEFINES += QGC_OSG_ENABLED
}
}

# Windows (32bit)
win32 {

    message(Building for Windows Platform (32bit))

    # Special settings for debug
    #CONFIG += CONSOLE

    INCLUDEPATH += $$BASEDIR\lib\sdl\include \
                   $$BASEDIR\lib\opal\include #\ #\
                   #"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"

    LIBS += -L$$BASEDIR\lib\sdl\win32 \
             -lmingw32 -lSDLmain -lSDL -mwindows

    debug {
        DESTDIR = $$BASEDIR/bin
    }

    release {
        DESTDIR = $$BASEDIR/bin
    }

    RC_FILE = $$BASEDIR/qgroundcontrol.rc

    # Copy dependencies
    QMAKE_PRE_LINK += copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/debug/ & copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/release/
    QMAKE_PRE_LINK += copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/debug/ & copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/release/
    QMAKE_PRE_LINK += copy /Y audio $$BUILDDIR\debug\
}

# Windows (64bit)
win64 {

    message(Building for Windows Platform (64bit))

    # Special settings for debug
    #CONFIG += CONSOLE

    INCLUDEPATH += $$BASEDIR\lib\sdl\include \
                   $$BASEDIR\lib\opal\include #\ #\
                   #"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"

    LIBS += -L$$BASEDIR\lib\sdl\win32 \
             -lmingw32 -lSDLmain -lSDL -mwindows

    debug {
        DESTDIR = $$BASEDIR/bin
    }

    release {
        DESTDIR = $$BASEDIR/bin
    }

    RC_FILE = $$BASEDIR/qgroundcontrol.rc

    # Copy dependencies
    QMAKE_PRE_LINK += copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/debug/ & copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/release/
    QMAKE_PRE_LINK += copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/debug/ & copy /Y $$BASEDIR/lib/sdl/SDL.dll $$BUILDDIR/release/
    QMAKE_PRE_LINK += copy /Y audio $$BUILDDIR\debug\
}


fix compilation error in test project.

fix compilation error in test project.

HEADER_CLASSES = ../include/TAbstractModel ../include/TAbstractUser ../include/TActionContext ../include/TActionController ../include/TActionHelper ../include/TActionThread ../include/TActionView ../include/TPrototypeAjaxHelper ../include/TApplicationServerBase ../include/TThreadApplicationServer ../include/TPreforkApplicationServer ../include/TContentHeader ../include/TCookie ../include/TCookieJar ../include/TCriteria ../include/TCriteriaConverter ../include/TCryptMac ../include/TDirectView ../include/TDispatcher ../include/TGlobal ../include/THtmlAttribute ../include/THtmlParser ../include/THttpHeader ../include/THttpRequest ../include/THttpRequestHeader ../include/THttpResponse ../include/THttpResponseHeader ../include/THttpUtility ../include/TInternetMessageHeader ../include/TJavaScriptObject ../include/TLog ../include/TLogger ../include/TLoggerPlugin ../include/TMailMessage ../include/TModelUtil ../include/TMultipartFormData ../include/TOption ../include/TSession ../include/TSessionStore ../include/TSessionStorePlugin ../include/TSharedMemoryLogStream ../include/TSmtpMailer ../include/TSqlORMapper ../include/TSqlORMapperIterator ../include/TSqlObject ../include/TSqlQuery ../include/TSqlQueryORMapper ../include/TSystemGlobal ../include/TTemporaryFile ../include/TViewHelper ../include/TWebApplication ../include/TfException ../include/TfNamespace ../include/TreeFrogController ../include/TreeFrogModel ../include/TreeFrogView ../include/TAbstractController ../include/TActionMailer ../include/TFormValidator ../include/TSqlQueryORMapperIterator ../include/TAccessValidator ../include/TSqlTransaction ../include/TPaginator ../include/TKvsDatabase ../include/TKvsDriver ../include/TModelObject ../include/TPopMailer ../include/TMultiplexingServer ../include/TAccessLog ../include/TActionWorker ../include/TAtomicQueue ../include/TJsonUtil ../include/TScheduler ../include/TApplicationScheduler ../include/TCommandLineInterface ../include/TSendmailMailer ../include/TAppSettings ../include/TWebSocketEndpoint ../include/TDatabaseContext ../include/TDatabaseContextThread ../include/TWebSocketSession ../include/TRedis ../include/TSqlJoin ../include/THazardPtrManager ../include/TAtomic ../include/TAtomicPtr ../include/TDebug ../include/TBackgroundProcess ../include/TBackgroundProcessHandler

HEADER_FILES = tabstractmodel.h tabstractuser.h tactioncontext.h tactioncontroller.h tactionhelper.h tactionthread.h tactionview.h tprototypeajaxhelper.h tapplicationserverbase.h tthreadapplicationserver.h tpreforkapplicationserver.h tcontentheader.h tcookie.h tcookiejar.h tcriteria.h tcriteriaconverter.h tcryptmac.h tdirectview.h tdispatcher.h tfcore.h tfexception.h tfnamespace.h tglobal.h thtmlattribute.h thtmlparser.h thttpheader.h thttprequest.h thttprequestheader.h thttpresponse.h thttpresponseheader.h thttputility.h tinternetmessageheader.h tjavascriptobject.h tlog.h tlogger.h tloggerplugin.h tmailmessage.h tmodelutil.h tmultipartformdata.h toption.h tsession.h tsessionstore.h tsessionstoreplugin.h tsharedmemorylogstream.h tsmtpmailer.h tsqlobject.h tsqlormapper.h tsqlormapperiterator.h tsqlquery.h tsqlqueryormapper.h tsystemglobal.h ttemporaryfile.h tviewhelper.h twebapplication.h tabstractcontroller.h tactionmailer.h tformvalidator.h tsqlqueryormapperiterator.h taccessvalidator.h tsqltransaction.h tpaginator.h tkvsdatabase.h tkvsdriver.h tmodelobject.h tpopmailer.h tmultiplexingserver.h taccesslog.h tactionworker.h tatomicqueue.h tjsonutil.h tscheduler.h tapplicationscheduler.h tcommandlineinterface.h tsendmailmailer.h tappsettings.h twebsocketendpoint.h tdatabasecontext.h tdatabasecontextthread.h tsystembus.h tprocessinfo.h twebsocketsession.h tredis.h tsqljoin.h thazardptrmanager.h tatomic.h tatomicptr.h tdebug.h tbackgroundprocess.h tbackgroundprocesshandler.h

HEADER_FILES += tsqldatabasepool.h tkvsdatabasepool.h tstack.h thazardobject.h thazardptr.h

# Qt5
greaterThan(QT_MAJOR_VERSION, 4) {
  HEADER_CLASSES += ../include/TJSLoader
  HEADER_FILES   += tjsloader.h
  HEADER_CLASSES += ../include/TJSModule
  HEADER_FILES   += tjsmodule.h
  HEADER_CLASSES += ../include/TJSInstance
  HEADER_FILES   += tjsinstance.h
  HEADER_CLASSES += ../include/TReactComponent
  HEADER_FILES   += treactcomponent.h
}

unix {
  HEADER_FILES += tfcore_unix.h
}

MONGODB_CLASSES = ../include/TMongoCursor ../include/TBson ../include/TMongoDriver ../include/TMongoQuery ../include/TMongoObject ../include/TMongoODMapper ../include/TCriteriaMongoConverter

MONGODB_FILES = tmongocursor.h tbson.h tmongodriver.h tmongoquery.h tmongoobject.h tmongoodmapper.h tcriteriamongoconverter.h

TEST_CLASSES = ../include/TfTest/TfTest

TEST_FILES = tftest.h

HEADER_CLASSES = ../include/TAbstractModel ../include/TAbstractUser ../include/TActionContext ../include/TActionController ../include/TActionHelper ../include/TActionThread ../include/TActionView ../include/TPrototypeAjaxHelper ../include/TApplicationServerBase ../include/TThreadApplicationServer ../include/TPreforkApplicationServer ../include/TContentHeader ../include/TCookie ../include/TCookieJar ../include/TCriteria ../include/TCriteriaConverter ../include/TCryptMac ../include/TDirectView ../include/TDispatcher ../include/TGlobal ../include/THtmlAttribute ../include/THtmlParser ../include/THttpHeader ../include/THttpRequest ../include/THttpRequestHeader ../include/THttpResponse ../include/THttpResponseHeader ../include/THttpUtility ../include/TInternetMessageHeader ../include/TJavaScriptObject ../include/TLog ../include/TLogger ../include/TLoggerPlugin ../include/TMailMessage ../include/TModelUtil ../include/TMultipartFormData ../include/TOption ../include/TSession ../include/TSessionStore ../include/TSessionStorePlugin ../include/TSharedMemoryLogStream ../include/TSmtpMailer ../include/TSqlORMapper ../include/TSqlORMapperIterator ../include/TSqlObject ../include/TSqlQuery ../include/TSqlQueryORMapper ../include/TSystemGlobal ../include/TTemporaryFile ../include/TViewHelper ../include/TWebApplication ../include/TfException ../include/TfNamespace ../include/TreeFrogController ../include/TreeFrogModel ../include/TreeFrogView ../include/TAbstractController ../include/TActionMailer ../include/TFormValidator ../include/TSqlQueryORMapperIterator ../include/TAccessValidator ../include/TSqlTransaction ../include/TPaginator ../include/TKvsDatabase ../include/TKvsDriver ../include/TModelObject ../include/TPopMailer ../include/TMultiplexingServer ../include/TAccessLog ../include/TActionWorker ../include/TAtomicQueue ../include/TJsonUtil ../include/TScheduler ../include/TApplicationScheduler ../include/TCommandLineInterface ../include/TSendmailMailer ../include/TAppSettings ../include/TWebSocketEndpoint ../include/TDatabaseContext ../include/TDatabaseContextThread ../include/TWebSocketSession ../include/TRedis ../include/TSqlJoin ../include/THazardPtrManager ../include/TAtomic ../include/TAtomicPtr ../include/TDebug ../include/TBackgroundProcess ../include/TBackgroundProcessHandler

HEADER_FILES = tabstractmodel.h tabstractuser.h tactioncontext.h tactioncontroller.h tactionhelper.h tactionthread.h tactionview.h tprototypeajaxhelper.h tapplicationserverbase.h tthreadapplicationserver.h tpreforkapplicationserver.h tcontentheader.h tcookie.h tcookiejar.h tcriteria.h tcriteriaconverter.h tcryptmac.h tdirectview.h tdispatcher.h tfcore.h tfexception.h tfnamespace.h tglobal.h thtmlattribute.h thtmlparser.h thttpheader.h thttprequest.h thttprequestheader.h thttpresponse.h thttpresponseheader.h thttputility.h tinternetmessageheader.h tjavascriptobject.h tlog.h tlogger.h tloggerplugin.h tmailmessage.h tmodelutil.h tmultipartformdata.h toption.h tsession.h tsessionstore.h tsessionstoreplugin.h tsharedmemorylogstream.h tsmtpmailer.h tsqlobject.h tsqlormapper.h tsqlormapperiterator.h tsqlquery.h tsqlqueryormapper.h tsystemglobal.h ttemporaryfile.h tviewhelper.h twebapplication.h tabstractcontroller.h tactionmailer.h tformvalidator.h tsqlqueryormapperiterator.h taccessvalidator.h tsqltransaction.h tpaginator.h tkvsdatabase.h tkvsdriver.h tmodelobject.h tpopmailer.h tmultiplexingserver.h taccesslog.h tactionworker.h tatomicqueue.h tjsonutil.h tscheduler.h tapplicationscheduler.h tcommandlineinterface.h tsendmailmailer.h tappsettings.h twebsocketendpoint.h tdatabasecontext.h tdatabasecontextthread.h tsystembus.h tprocessinfo.h twebsocketsession.h tredis.h tsqljoin.h thazardptrmanager.h tatomic.h tatomicptr.h tdebug.h tbackgroundprocess.h tbackgroundprocesshandler.h

HEADER_FILES += tsqldatabasepool.h tkvsdatabasepool.h

# Qt5
greaterThan(QT_MAJOR_VERSION, 4) {
  HEADER_CLASSES += ../include/TJSLoader
  HEADER_FILES   += tjsloader.h
  HEADER_CLASSES += ../include/TJSModule
  HEADER_FILES   += tjsmodule.h
  HEADER_CLASSES += ../include/TJSInstance
  HEADER_FILES   += tjsinstance.h
  HEADER_CLASSES += ../include/TReactComponent
  HEADER_FILES   += treactcomponent.h
}

unix {
  HEADER_FILES += tfcore_unix.h
}

MONGODB_CLASSES = ../include/TMongoCursor ../include/TBson ../include/TMongoDriver ../include/TMongoQuery ../include/TMongoObject ../include/TMongoODMapper ../include/TCriteriaMongoConverter

MONGODB_FILES = tmongocursor.h tbson.h tmongodriver.h tmongoquery.h tmongoobject.h tmongoodmapper.h tcriteriamongoconverter.h

TEST_CLASSES = ../include/TfTest/TfTest

TEST_FILES = tftest.h


wallet-libs.pri, wrap with !macx the pkg-config

greaterThan(QT_MAJOR_VERSION, 4) {
    QT += widgets
    DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
}

# for boost 1.37, add -mt to the boost libraries
# use: qmake BOOST_LIB_SUFFIX=-mt
# for boost thread win32 with _win32 sufix
# use: BOOST_THREAD_LIB_SUFFIX=_win32-...
# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8

BOOST_LIB_SUFFIX=
windows:BOOST_INCLUDE_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/include/boost
windows:BOOST_LIB_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/lib
macx:BOOST_LIB_PATH=/usr/local/opt/boost@1.60/lib
windows:BDB_INCLUDE_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/include
windows:BDB_LIB_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/lib
macx:BDB_LIB_PATH=/usr/local/Cellar/berkeley-db\@4/4.8.30/lib/
MINIUPNPC_LIB_SUFFIX=-miniupnpc
windows:MINIUPNPC_INCLUDE_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/include
windows:MINIUPNPC_LIB_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/libc
macx:OPENSSL_LIB_PATH=/usr/local/opt/openssl/lib
macx:MINIUPNPC_INCLUDE_PATH=/usr/local/Cellar/miniupnpc/2.0.20170509/include
macx:MINIUPNPC_LIB_PATH=/usr/local/Cellar/miniupnpc/2.0.20170509/lib
macx:QRENCODE_INCLUDE_PATH=/usr/local/Cellar/qrencode/3.4.4/include
macx:QRENCODE_LIB_PATH=/usr/local/Cellar/qrencode/3.4.4/lib
macx:CURL_LIB_PATH=/usr/local/opt/curl/lib
windows:QRENCODE_INCLUDE_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/include
windows:QRENCODE_LIB_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/libc

# Dependency library locations can be customized with:
#    BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
#    BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively

OBJECTS_DIR = build
MOC_DIR = build
UI_DIR = build

# fixes an issue with boost 1.66 and the number of template parameters of basic_socket_acceptor
DEFINES += BOOST_ASIO_ENABLE_OLD_SERVICES
# TODO: Move to the new standard of boost as current code is deprecated

# use: qmake "RELEASE=1"
contains(RELEASE, 1) {
    # Mac: compile for maximum compatibility (10.5, 32-bit)
    macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk

    !windows:!macx {
        # Linux: static link
        LIBS += -Wl,-Bstatic
    }
}

!win32 {
# for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection
QMAKE_CXXFLAGS *= -fstack-protector-all
QMAKE_LFLAGS *= -fstack-protector-all
# We need to exclude this for Windows cross compile with MinGW 4.2.x, as it will result in a non-working executable!
# This can be enabled for Windows, when we switch to MinGW >= 4.4.x.
}
# for extra security (see: https://wiki.debian.org/Hardening)
QMAKE_CXXFLAGS *= -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now
# for extra security on Windows: enable ASLR and DEP via GCC linker flags
win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat
win32:QMAKE_LFLAGS *= -Wl,--large-address-aware -static
#win32:QMAKE_LFLAGS += -static-libgcc -static-libstdc++

# use: qmake "USE_QRCODE=1"
# libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support
contains(USE_QRCODE, 1) {
    message(Building with QRCode support)
    DEFINES += USE_QRCODE
    LIBS += -lqrencode
    windows:LIBS += -lpthread
}

# use: qmake "USE_UPNP=1" ( enabled by default; default)
#  or: qmake "USE_UPNP=0" (disabled by default)
#  or: qmake "USE_UPNP=-" (not supported)
# miniupnpc (http://miniupnp.free.fr/files/) must be installed for support
contains(USE_UPNP, -) {
    message(Building without UPNP support)
} else {
    message(Building with UPNP support)
    count(USE_UPNP, 0) {
        USE_UPNP=1
    }
    DEFINES += USE_UPNP=$$USE_UPNP STATICLIB
    INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH
    LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc
    win32:LIBS += -liphlpapi
}

# use: qmake "USE_DBUS=1" or qmake "USE_DBUS=0"
linux:count(USE_DBUS, 0) {
    USE_DBUS=1
}
contains(USE_DBUS, 1) {
    message(Building with DBUS (Freedesktop notifications) support)
    DEFINES += USE_DBUS
    QT += dbus
}

contains(BITCOIN_NEED_QT_PLUGINS, 1) {
    DEFINES += BITCOIN_NEED_QT_PLUGINS
    QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
}

INCLUDEPATH += $$PWD/leveldb/include $$PWD/leveldb/helpers
macx: INCLUDEPATH += /usr/include /usr/local/opt/berkeley-db@4/include /usr/local/opt/boost/include /usr/local/opt/openssl/include
LIBS += $$PWD/leveldb/libleveldb.a $$PWD/leveldb/libmemenv.a
SOURCES += txdb-leveldb.cpp

#NEBLIO_CONFIG += LEVELDB_TESTS

!win32 {
    # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences
    genleveldb.commands = cd $$PWD/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
    contains( NEBLIO_CONFIG, LEVELDB_TESTS ) {
        genleveldb.commands += ./arena_test && ./cache_test && ./env_test && ./table_test && ./write_batch_test && ./coding_test && ./db_bench && ./fault_injection_test && ./issue178_test && ./autocompact_test && ./dbformat_test && ./filename_test && ./issue200_test && ./log_test && ./bloom_test && ./corruption_test && ./db_test && ./filter_block_test && ./recovery_test && ./version_edit_test && ./crc32c_test && ./hash_test && ./memenv_test && ./skiplist_test && ./version_set_test && ./c_test && ./env_posix_test
    }
} else {
    # make an educated guess about what the ranlib command is called
    isEmpty(QMAKE_RANLIB) {
        QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
    }
    LIBS += -lshlwapi
   # genleveldb.commands = cd $$PWD/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/leveldb/libmemenv.a
}
genleveldb.target = $$PWD/leveldb/libleveldb.a
genleveldb.depends = FORCE
PRE_TARGETDEPS += $$PWD/leveldb/libleveldb.a
QMAKE_EXTRA_TARGETS += genleveldb
# Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it.
QMAKE_CLEAN += $$PWD/leveldb/libleveldb.a; cd $$PWD/leveldb ; $(MAKE) clean

# regenerate build.h
!windows|contains(USE_BUILD_INFO, 1) {
    genbuild.depends = FORCE
    genbuild.commands = cd $$PWD; /bin/sh ../share/genbuild.sh $$OUT_PWD/build/build.h
    genbuild.target = $$OUT_PWD/build/build.h
    PRE_TARGETDEPS += $$OUT_PWD/build/build.h
    QMAKE_EXTRA_TARGETS += genbuild
    DEFINES += HAVE_BUILD_INFO
}

contains(USE_O3, 1) {
    message(Building O3 optimization flag)
    QMAKE_CXXFLAGS_RELEASE -= -O2
    QMAKE_CFLAGS_RELEASE -= -O2
    QMAKE_CXXFLAGS += -O3
    QMAKE_CFLAGS += -O3
}

*-g++-32 {
    message("32 platform, adding -msse2 flag")

    QMAKE_CXXFLAGS += -msse2
    QMAKE_CFLAGS += -msse2
}

QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector

CODECFORTR = UTF-8

# for lrelease/lupdate
# also add new translations to qt/bitcoin.qrc under translations/
TRANSLATIONS = $$files(qt/locale/bitcoin_*.ts)

isEmpty(QMAKE_LRELEASE) {
    QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
}
isEmpty(QM_DIR):QM_DIR = $$PWD/qt/locale
# automatically build translations, so they can be included in resource file
TSQM.name = lrelease ${QMAKE_FILE_IN}
TSQM.input = TRANSLATIONS
TSQM.output = $$QM_DIR/${QMAKE_FILE_BASE}.qm
TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
TSQM.CONFIG = no_link
QMAKE_EXTRA_COMPILERS += TSQM

# "Other files" to show in Qt Creator
OTHER_FILES += \
    doc/*.rst doc/*.txt doc/README README.md res/bitcoin-qt.rc

# platform specific defaults, if not overridden on command line
isEmpty(BOOST_LIB_SUFFIX) {
    macx:BOOST_LIB_SUFFIX = -mt
    windows:BOOST_LIB_SUFFIX = -mt
}

isEmpty(BOOST_THREAD_LIB_SUFFIX) {
    win32:BOOST_THREAD_LIB_SUFFIX = _win32$$BOOST_LIB_SUFFIX
    else:BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
}

isEmpty(BDB_LIB_PATH) {
    macx:BDB_LIB_PATH = /opt/local/lib/db48
}

isEmpty(BDB_LIB_SUFFIX) {
    macx:BDB_LIB_SUFFIX = -4.8
}

isEmpty(BDB_INCLUDE_PATH) {
    macx:BDB_INCLUDE_PATH = /opt/local/include/db48
}

isEmpty(BOOST_LIB_PATH) {
    macx:BOOST_LIB_PATH = /opt/local/lib
}

isEmpty(BOOST_INCLUDE_PATH) {
    #macx:BOOST_INCLUDE_PATH = /opt/local/include
    macx:BOOST_INCLUDE_PATH = /usr/local/include
}

windows:DEFINES += WIN32

windows:!contains(MINGW_THREAD_BUGFIX, 0) {
    # At least qmake's win32-g++-cross profile is missing the -lmingwthrd
    # thread-safety flag. GCC has -mthreads to enable this, but it doesn't
    # work with static linking. -lmingwthrd must come BEFORE -lmingw, so
    # it is prepended to QMAKE_LIBS_QT_ENTRY.
    # It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes
    # any problems on some untested qmake profile now or in the future.
    DEFINES += _MT BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
    QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY
}

macx:HEADERS += qt/macdockiconhandler.h qt/macnotificationhandler.h
macx:OBJECTIVE_SOURCES += qt/macdockiconhandler.mm qt/macnotificationhandler.mm
macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
macx:TARGET = "neblio-Qt"
macx:QMAKE_CFLAGS_THREAD += -pthread
macx:QMAKE_LFLAGS_THREAD += -pthread
macx:QMAKE_CXXFLAGS_THREAD += -pthread

# do not include resources while testing
!contains( NEBLIO_TEST, TRUE ) {
    macx:ICON = qt/res/icons/bitcoin.icns
    windows:RC_FILE = qt/res/bitcoin-qt.rc
}

# Set libraries and includes at end, to use platform-defined defaults if not overridden
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
macx: LIBS += $$join(CURL_LIB_PATH,,-L,)
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
# -lgdi32 has to happen after -lcrypto (see  #681)
windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX -lboost_regex$$BOOST_LIB_SUFFIX
windows:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
macx: LIBS += -lcurl

# For Fedora
unix:INCLUDEPATH += /usr/include/libdb4/
unix:LIBS        += -L/usr/lib64/libdb4/

!macx {
    PKG_CONFIG_ENV_VAR = $$(PKG_CONFIG_PATH)
    !isEmpty(PKG_CONFIG_ENV_VAR) {
        PKG_CONFIG_PATH = $$(PKG_CONFIG_PATH)
    }
    isEmpty(PKG_CONFIG_PATH_ENV_VAR) {
        message("PKGCONFIG enviroment variable is not set")
        pkgConfPrefix = ""
    } else {
        message("PKGCONFIG enviroment variable is found to be set to: \"$${PKG_CONFIG_ENV_VAR}\"; it will be used for pkg-config")
        pkgConfPrefix = "PKGCONFIG=$${PKG_CONFIG_PATH}"
    }

    !isEmpty(PKG_CONFIG_PATH) {
        message("Setting PKG_CONFIG_PATH to $${PKG_CONFIG_PATH}")
    }

        pkgconf_exec = "$${pkgConfPrefix} $${CROSS_COMPILE}pkg-config"

    QMAKE_CFLAGS += $$system("$${pkgconf_exec} libcurl --cflags")
    QMAKE_CXXFLAGS += $$system("$${pkgconf_exec} libcurl --cflags")

    # static when release
    contains(RELEASE, 1) {
        libcurlPkgconfCmd = "$${pkgconf_exec} libcurl --libs --static"
    } else {
        libcurlPkgconfCmd = "$${pkgconf_exec} libcurl --libs"
    }
    # the testing whether system() has a zero exit code with the third parameter of system() doesn't work on all Qt versions
    libcURL_LIBS = $$system($$libcurlPkgconfCmd)
    # OpenSSL linking is not necessary as it comes with curl
    # openssl_LIBS = $$system($$opensslPkgconfCmd)
    LIBS += $$libcURL_LIBS $$openssl_LIBS
}

contains(RELEASE, 1) {
    !windows:!macx {
        # Linux: turn dynamic linking back on for c/c++ runtime libraries
        LIBS += -Wl,-Bdynamic
    }
}

!windows:!macx {
    DEFINES += LINUX
    LIBS += -lrt -ldl
}

greaterThan(QT_MAJOR_VERSION, 4) {
    QT += widgets
    DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
}

# for boost 1.37, add -mt to the boost libraries
# use: qmake BOOST_LIB_SUFFIX=-mt
# for boost thread win32 with _win32 sufix
# use: BOOST_THREAD_LIB_SUFFIX=_win32-...
# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8

BOOST_LIB_SUFFIX=
windows:BOOST_INCLUDE_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/include/boost
windows:BOOST_LIB_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/lib
macx:BOOST_LIB_PATH=/usr/local/opt/boost@1.60/lib
windows:BDB_INCLUDE_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/include
windows:BDB_LIB_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/lib
macx:BDB_LIB_PATH=/usr/local/Cellar/berkeley-db\@4/4.8.30/lib/
MINIUPNPC_LIB_SUFFIX=-miniupnpc
windows:MINIUPNPC_INCLUDE_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/include
windows:MINIUPNPC_LIB_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/libc
macx:OPENSSL_LIB_PATH=/usr/local/opt/openssl/lib
macx:MINIUPNPC_INCLUDE_PATH=/usr/local/Cellar/miniupnpc/2.0.20170509/include
macx:MINIUPNPC_LIB_PATH=/usr/local/Cellar/miniupnpc/2.0.20170509/lib
macx:QRENCODE_INCLUDE_PATH=/usr/local/Cellar/qrencode/3.4.4/include
macx:QRENCODE_LIB_PATH=/usr/local/Cellar/qrencode/3.4.4/lib
macx:CURL_LIB_PATH=/usr/local/opt/curl/lib
windows:QRENCODE_INCLUDE_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/include
windows:QRENCODE_LIB_PATH=/home/build/Documents/mxe/usr/i686-w64-mingw32.static/libc

# Dependency library locations can be customized with:
#    BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
#    BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively

OBJECTS_DIR = build
MOC_DIR = build
UI_DIR = build

# fixes an issue with boost 1.66 and the number of template parameters of basic_socket_acceptor
DEFINES += BOOST_ASIO_ENABLE_OLD_SERVICES
# TODO: Move to the new standard of boost as current code is deprecated

# use: qmake "RELEASE=1"
contains(RELEASE, 1) {
    # Mac: compile for maximum compatibility (10.5, 32-bit)
    macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk

    !windows:!macx {
        # Linux: static link
        LIBS += -Wl,-Bstatic
    }
}

!win32 {
# for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection
QMAKE_CXXFLAGS *= -fstack-protector-all
QMAKE_LFLAGS *= -fstack-protector-all
# We need to exclude this for Windows cross compile with MinGW 4.2.x, as it will result in a non-working executable!
# This can be enabled for Windows, when we switch to MinGW >= 4.4.x.
}
# for extra security (see: https://wiki.debian.org/Hardening)
QMAKE_CXXFLAGS *= -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now
# for extra security on Windows: enable ASLR and DEP via GCC linker flags
win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat
win32:QMAKE_LFLAGS *= -Wl,--large-address-aware -static
#win32:QMAKE_LFLAGS += -static-libgcc -static-libstdc++

# use: qmake "USE_QRCODE=1"
# libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support
contains(USE_QRCODE, 1) {
    message(Building with QRCode support)
    DEFINES += USE_QRCODE
    LIBS += -lqrencode
    windows:LIBS += -lpthread
}

# use: qmake "USE_UPNP=1" ( enabled by default; default)
#  or: qmake "USE_UPNP=0" (disabled by default)
#  or: qmake "USE_UPNP=-" (not supported)
# miniupnpc (http://miniupnp.free.fr/files/) must be installed for support
contains(USE_UPNP, -) {
    message(Building without UPNP support)
} else {
    message(Building with UPNP support)
    count(USE_UPNP, 0) {
        USE_UPNP=1
    }
    DEFINES += USE_UPNP=$$USE_UPNP STATICLIB
    INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH
    LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc
    win32:LIBS += -liphlpapi
}

# use: qmake "USE_DBUS=1" or qmake "USE_DBUS=0"
linux:count(USE_DBUS, 0) {
    USE_DBUS=1
}
contains(USE_DBUS, 1) {
    message(Building with DBUS (Freedesktop notifications) support)
    DEFINES += USE_DBUS
    QT += dbus
}

contains(BITCOIN_NEED_QT_PLUGINS, 1) {
    DEFINES += BITCOIN_NEED_QT_PLUGINS
    QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
}

INCLUDEPATH += $$PWD/leveldb/include $$PWD/leveldb/helpers
macx: INCLUDEPATH += /usr/include /usr/local/opt/berkeley-db@4/include /usr/local/opt/boost/include /usr/local/opt/openssl/include
LIBS += $$PWD/leveldb/libleveldb.a $$PWD/leveldb/libmemenv.a
SOURCES += txdb-leveldb.cpp

#NEBLIO_CONFIG += LEVELDB_TESTS

!win32 {
    # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences
    genleveldb.commands = cd $$PWD/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
    contains( NEBLIO_CONFIG, LEVELDB_TESTS ) {
        genleveldb.commands += ./arena_test && ./cache_test && ./env_test && ./table_test && ./write_batch_test && ./coding_test && ./db_bench && ./fault_injection_test && ./issue178_test && ./autocompact_test && ./dbformat_test && ./filename_test && ./issue200_test && ./log_test && ./bloom_test && ./corruption_test && ./db_test && ./filter_block_test && ./recovery_test && ./version_edit_test && ./crc32c_test && ./hash_test && ./memenv_test && ./skiplist_test && ./version_set_test && ./c_test && ./env_posix_test
    }
} else {
    # make an educated guess about what the ranlib command is called
    isEmpty(QMAKE_RANLIB) {
        QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
    }
    LIBS += -lshlwapi
   # genleveldb.commands = cd $$PWD/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/leveldb/libmemenv.a
}
genleveldb.target = $$PWD/leveldb/libleveldb.a
genleveldb.depends = FORCE
PRE_TARGETDEPS += $$PWD/leveldb/libleveldb.a
QMAKE_EXTRA_TARGETS += genleveldb
# Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it.
QMAKE_CLEAN += $$PWD/leveldb/libleveldb.a; cd $$PWD/leveldb ; $(MAKE) clean

# regenerate build.h
!windows|contains(USE_BUILD_INFO, 1) {
    genbuild.depends = FORCE
    genbuild.commands = cd $$PWD; /bin/sh ../share/genbuild.sh $$OUT_PWD/build/build.h
    genbuild.target = $$OUT_PWD/build/build.h
    PRE_TARGETDEPS += $$OUT_PWD/build/build.h
    QMAKE_EXTRA_TARGETS += genbuild
    DEFINES += HAVE_BUILD_INFO
}

contains(USE_O3, 1) {
    message(Building O3 optimization flag)
    QMAKE_CXXFLAGS_RELEASE -= -O2
    QMAKE_CFLAGS_RELEASE -= -O2
    QMAKE_CXXFLAGS += -O3
    QMAKE_CFLAGS += -O3
}

*-g++-32 {
    message("32 platform, adding -msse2 flag")

    QMAKE_CXXFLAGS += -msse2
    QMAKE_CFLAGS += -msse2
}

QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector

CODECFORTR = UTF-8

# for lrelease/lupdate
# also add new translations to qt/bitcoin.qrc under translations/
TRANSLATIONS = $$files(qt/locale/bitcoin_*.ts)

isEmpty(QMAKE_LRELEASE) {
    QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
}
isEmpty(QM_DIR):QM_DIR = $$PWD/qt/locale
# automatically build translations, so they can be included in resource file
TSQM.name = lrelease ${QMAKE_FILE_IN}
TSQM.input = TRANSLATIONS
TSQM.output = $$QM_DIR/${QMAKE_FILE_BASE}.qm
TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
TSQM.CONFIG = no_link
QMAKE_EXTRA_COMPILERS += TSQM

# "Other files" to show in Qt Creator
OTHER_FILES += \
    doc/*.rst doc/*.txt doc/README README.md res/bitcoin-qt.rc

# platform specific defaults, if not overridden on command line
isEmpty(BOOST_LIB_SUFFIX) {
    macx:BOOST_LIB_SUFFIX = -mt
    windows:BOOST_LIB_SUFFIX = -mt
}

isEmpty(BOOST_THREAD_LIB_SUFFIX) {
    win32:BOOST_THREAD_LIB_SUFFIX = _win32$$BOOST_LIB_SUFFIX
    else:BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
}

isEmpty(BDB_LIB_PATH) {
    macx:BDB_LIB_PATH = /opt/local/lib/db48
}

isEmpty(BDB_LIB_SUFFIX) {
    macx:BDB_LIB_SUFFIX = -4.8
}

isEmpty(BDB_INCLUDE_PATH) {
    macx:BDB_INCLUDE_PATH = /opt/local/include/db48
}

isEmpty(BOOST_LIB_PATH) {
    macx:BOOST_LIB_PATH = /opt/local/lib
}

isEmpty(BOOST_INCLUDE_PATH) {
    #macx:BOOST_INCLUDE_PATH = /opt/local/include
    macx:BOOST_INCLUDE_PATH = /usr/local/include
}

windows:DEFINES += WIN32

windows:!contains(MINGW_THREAD_BUGFIX, 0) {
    # At least qmake's win32-g++-cross profile is missing the -lmingwthrd
    # thread-safety flag. GCC has -mthreads to enable this, but it doesn't
    # work with static linking. -lmingwthrd must come BEFORE -lmingw, so
    # it is prepended to QMAKE_LIBS_QT_ENTRY.
    # It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes
    # any problems on some untested qmake profile now or in the future.
    DEFINES += _MT BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
    QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY
}

macx:HEADERS += qt/macdockiconhandler.h qt/macnotificationhandler.h
macx:OBJECTIVE_SOURCES += qt/macdockiconhandler.mm qt/macnotificationhandler.mm
macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
macx:TARGET = "neblio-Qt"
macx:QMAKE_CFLAGS_THREAD += -pthread
macx:QMAKE_LFLAGS_THREAD += -pthread
macx:QMAKE_CXXFLAGS_THREAD += -pthread

# do not include resources while testing
!contains( NEBLIO_TEST, TRUE ) {
    macx:ICON = qt/res/icons/bitcoin.icns
    windows:RC_FILE = qt/res/bitcoin-qt.rc
}

# Set libraries and includes at end, to use platform-defined defaults if not overridden
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
macx: LIBS += $$join(CURL_LIB_PATH,,-L,)
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
# -lgdi32 has to happen after -lcrypto (see  #681)
windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX -lboost_regex$$BOOST_LIB_SUFFIX
windows:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
macx: LIBS += -lcurl

# For Fedora
unix:INCLUDEPATH += /usr/include/libdb4/
unix:LIBS        += -L/usr/lib64/libdb4/

PKG_CONFIG_ENV_VAR = $$(PKG_CONFIG_PATH)
!isEmpty(PKG_CONFIG_ENV_VAR) {
    PKG_CONFIG_PATH = $$(PKG_CONFIG_PATH)
}
isEmpty(PKG_CONFIG_PATH_ENV_VAR) {
    message("PKGCONFIG enviroment variable is not set")
    pkgConfPrefix = ""
} else {
    message("PKGCONFIG enviroment variable is found to be set to: \"$${PKG_CONFIG_ENV_VAR}\"; it will be used for pkg-config")
    pkgConfPrefix = "PKGCONFIG=$${PKG_CONFIG_PATH}"
}

!isEmpty(PKG_CONFIG_PATH) {
    message("Setting PKG_CONFIG_PATH to $${PKG_CONFIG_PATH}")
}

macx:pkgconf_exec  = "$${pkgConfPrefix} /usr/local/bin/pkg-config"
!macx:pkgconf_exec = "$${pkgConfPrefix} $${CROSS_COMPILE}pkg-config"

QMAKE_CFLAGS += $$system("$${pkgconf_exec} libcurl --cflags")
QMAKE_CXXFLAGS += $$system("$${pkgconf_exec} libcurl --cflags")

# static when release
contains(RELEASE, 1) {
    libcurlPkgconfCmd = "$${pkgconf_exec} libcurl --libs --static"
} else {
    libcurlPkgconfCmd = "$${pkgconf_exec} libcurl --libs"
}
# the testing whether system() has a zero exit code with the third parameter of system() doesn't work on all Qt versions
libcURL_LIBS = $$system($$libcurlPkgconfCmd)
# OpenSSL linking is not necessary as it comes with curl
# openssl_LIBS = $$system($$opensslPkgconfCmd)
LIBS += $$libcURL_LIBS $$openssl_LIBS

contains(RELEASE, 1) {
    !windows:!macx {
        # Linux: turn dynamic linking back on for c/c++ runtime libraries
        LIBS += -Wl,-Bdynamic
    }
}

!windows:!macx {
    DEFINES += LINUX
    LIBS += -lrt -ldl
}


Update QMidi.

Update QMidi.

win32 { LIBS += -lwinmm }
linux* { LIBS += -lasound }
haiku* { LIBS += -lbe -lmidi -lmidi2 }

INCLUDEPATH += $$PWD

SOURCES += $$PWD/QMidiOut.cpp \
	$$PWD/QMidiFile.cpp

HEADERS += $$PWD/QMidiOut.h \
	$$PWD/QMidiFile.h

win32 { LIBS += -lwinmm }
linux-g++ { LIBS += -lasound }
haiku-g++ { LIBS += -lbe -lmidi -lmidi2 }

INCLUDEPATH += $$PWD

SOURCES += $$PWD/QMidiOut.cpp \
	$$PWD/QMidiFile.cpp

HEADERS += $$PWD/QMidiOut.h \
	$$PWD/QMidiFile.h


Bumped version for release. Signed-off-by: Carl Wong <carl.wong@intel.com>

Bumped version for release.
Signed-off-by: Carl Wong <71f6120c3829ee10a91638f591f6c67d26f52dda@intel.com>


Bumped version to 0.2.13 for release.

Bumped version to 0.2.13 for release.


Bump version.

Bump version.


Fixed qmake target

Fixed qmake target

# This file is a template commmon for all qmake projects.
#
# To use it, define ROOT_DIR variable and include($$ROOT_DIR/common.pri)

# our own version variables
VERSION_MAJOR = 0
VERSION_MINOR = 1

# qt's variable
VERSION = $${VERSION_MAJOR}.$${VERSION_MINOR}

# Additional include directories, common to most projects.
INCLUDEPATH += $$ROOT_DIR/3party/boost

CONFIG(release, debug|release) {
  DEFINES += RELEASE _RELEASE
  CONFIG_NAME = release
} else {
  DEFINES += DEBUG _DEBUG
  CONFIG_NAME = debug
}

BINARIES_PATH = $$ROOT_DIR/out/$$CONFIG_NAME
TEMP_PATH = $$ROOT_DIR/out/$$CONFIG_NAME/tmp/$$TARGET

DESTDIR = $$BINARIES_PATH
OBJECTS_DIR = $$TEMP_PATH
RCC_DIR = $$TEMP_PATH
MOC_DIR = $$TEMP_PATH
UI_DIR = $$TEMP_PATH

LIBS += -L$$BINARIES_PATH

# By default, do not include base QT classes in any project.
QT -= core gui

# Turn on compiler warnings.
CONFIG += warn_on

# Libraries' dependencies hack.
win32-msvc2008|symbian {
  LIB_EXT = .lib
  LIB_PREFIX =
}
unix|win32-g++|bada-simulator {
 LIB_EXT = .a
 LIB_PREFIX = lib
}

# Add libraries' dependencies.
for(project, DEPENDENCIES) {
  PRE_TARGETDEPS += $$BINARIES_PATH/$$LIB_PREFIX$$project$$LIB_EXT
  LIBS += -l$$project
}

# Windows-specific options for all projects
win32-msvc2008 {
  QMAKE_CLEAN += *.user
  DEFINES += _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX
  QMAKE_CXXFLAGS += -wd4100 -Zi
  QMAKE_CXXFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb
  QMAKE_CFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb
  QMAKE_LFLAGS += /PDB:$${DESTDIR}/$${TARGET}.pdb /DEBUG

  QMAKE_CXXFLAGS_RELEASE -= -O2
  # don't set -GL - bug in msvc
  QMAKE_CXXFLAGS_RELEASE += -Ox -Ob2 -Oi -Ot
  # don't set /LTCG - bug in msvc
  QMAKE_LFLAGS_RELEASE += /MACHINE:X86
 }

unix|win32-g++ {
  QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare
#  QMAKE_CXXFLAGS_RELEASE += -g
}

win32-g++ {
  QMAKE_CFLAGS *= -Wextra
  QMAKE_CXXFLAGS *= -Wextra
}

macx-g++ {
  # minimum supported Mac OS X version
  QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
  QMAKE_CFLAGS *= -mmacosx-version-min=10.5
  QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
}

# This file is a template commmon for all qmake projects.
#
# To use it, define ROOT_DIR variable and include($$ROOT_DIR/common.pri)

# our own version variables
VERSION_MAJOR = 0
VERSION_MINOR = 1

# qt's variable
VERSION = $${VERSION_MAJOR}.$${VERSION_MINOR}

# Additional include directories, common to most projects.
INCLUDEPATH += $$ROOT_DIR/3party/boost

CONFIG(release, debug|release) {
  DEFINES += RELEASE _RELEASE
  CONFIG_NAME = release
} else {
  DEFINES += DEBUG _DEBUG
  CONFIG_NAME = debug
}

BINARIES_PATH = $$ROOT_DIR/out/$$CONFIG_NAME
TEMP_PATH = $$ROOT_DIR/out/$$CONFIG_NAME/tmp/$$TARGET

DESTDIR = $$BINARIES_PATH
OBJECTS_DIR = $$TEMP_PATH
RCC_DIR = $$TEMP_PATH
MOC_DIR = $$TEMP_PATH
UI_DIR = $$TEMP_PATH

LIBS += -L$$BINARIES_PATH

# By default, do not include base QT classes in any project.
QT -= core gui

# Turn on compiler warnings.
CONFIG += warn_on

# Libraries' dependencies hack.
win32-msvc2008|symbian {
  LIB_EXT = .lib
  LIB_PREFIX =
}
unix|win32-g++|bada-simulator {
 LIB_EXT = .a
 LIB_PREFIX = lib
}

# Add libraries' dependencies.
for(project, DEPENDENCIES) {
  PRE_TARGETDEPS += $$BINARIES_PATH/$$LIB_PREFIX$$project$$LIB_EXT
  LIBS += -l$$project
}

# Windows-specific options for all projects
win32-msvc2008 {
  QMAKE_CLEAN += *.user
  DEFINES += _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX
  QMAKE_CXXFLAGS += -wd4100 -Zi
  QMAKE_CXXFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb
  QMAKE_CFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb
  QMAKE_LFLAGS += /PDB:$${DESTDIR}/$${TARGET}.pdb /DEBUG

  QMAKE_CXXFLAGS_RELEASE -= -O2
  # don't set -GL - bug in msvc
  QMAKE_CXXFLAGS_RELEASE += -Ox -Ob2 -Oi -Ot
  # don't set /LTCG - bug in msvc
  QMAKE_LFLAGS_RELEASE += /MACHINE:X86
 }

unix|win32-g++ {
  QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare
#  QMAKE_CXXFLAGS_RELEASE += -g
}

win32-g++ {
  QMAKE_CFLAGS *= -Wextra
  QMAKE_CXXFLAGS *= -Wextra
}

macx-g++42 {
  # minimum supported Mac OS X version
  QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
  QMAKE_CFLAGS *= -mmacosx-version-min=10.5
  QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
}


Disabled warning for unused parameter

Disabled warning for unused parameter

# This file is a template commmon for all qmake projects.
#
# To use it, define ROOT_DIR variable and include($$ROOT_DIR/common.pri)

# our own version variables
VERSION_MAJOR = 1
VERSION_MINOR = 0

# qt's variable
VERSION = $${VERSION_MAJOR}.$${VERSION_MINOR}

# Additional include directories, common to most projects.
INCLUDEPATH += $$ROOT_DIR/3party/boost

CONFIG(release, debug|release) {
  DEFINES += RELEASE _RELEASE NDEBUG
  CONFIG_NAME = release
} else {
  DEFINES += DEBUG _DEBUG
  CONFIG_NAME = debug
}

# turn off maps downloader engine for desktops in release and production
!iphone* {
  CONFIG(release, debug|release)|CONFIG(production) {
    CONFIG += no_downloader
    DEFINES += NO_DOWNLOADER
  }
}

BINARIES_PATH = $$ROOT_DIR/out/$$CONFIG_NAME
TEMP_PATH = $$ROOT_DIR/out/$$CONFIG_NAME/tmp/$$TARGET

DESTDIR = $$BINARIES_PATH
OBJECTS_DIR = $$TEMP_PATH
RCC_DIR = $$TEMP_PATH
MOC_DIR = $$TEMP_PATH
UI_DIR = $$TEMP_PATH

LIBS += -L$$BINARIES_PATH

# By default, do not include base QT classes in any project.
QT -= core gui

# Turn on compiler warnings.
CONFIG += warn_on

# Libraries' dependencies hack.
win32-msvc*|symbian {
  LIB_EXT = .lib
  LIB_PREFIX =
}
unix|win32-g++|bada-simulator {
 LIB_EXT = .a
 LIB_PREFIX = lib
}

# Add libraries' dependencies.
for(project, DEPENDENCIES) {
  PRE_TARGETDEPS += $$BINARIES_PATH/$$LIB_PREFIX$$project$$LIB_EXT
  LIBS += -l$$project
}

#INCLUDEPATH += $$ROOT_DIR/3party/protobuf/src/

# Windows-specific options for all projects
win32 {
  DEFINES += _WIN32_WINNT=0x0501
  DEFINES += WINVER=0x0501
  DEFINES += _WIN32_IE=0x0501
  DEFINES += WIN32_LEAN_AND_MEAN=1
  DEFINES += NTDDI_VERSION=0x05010000
}

win32-msvc* {
  QMAKE_CLEAN += *.user
  DEFINES += _SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX
  QMAKE_CXXFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb /Zi /fp:fast
  QMAKE_CFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb /Zi /fp:fast

  QMAKE_CXXFLAGS_RELEASE -= /O2
  # don't set -GL - bug in msvc2008
  QMAKE_CXXFLAGS_RELEASE += /Ox /GF
  # don't set /LTCG - bug in msvc2008
  QMAKE_LFLAGS_RELEASE += /MACHINE:X86 /OPT:REF

  CONFIG(release, debug|release) {
    DEFINES += _SECURE_SCL=0
  }
}

win32-msvc2010 {
  DEFINES += _HAS_CPP0X=0 # disable tr1 and c++0x features to avoid build errors
  QMAKE_CFLAGS_RELEASE += /GL
  QMAKE_CXXFLAGS_RELEASE += /GL
  QMAKE_LFLAGS_RELEASE += /LTCG
  QMAKE_LIB += /LTCG
}

unix|win32-g++ {
  QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare -Wno-strict-aliasing -Wconversion -Wno-unused-parameter
  # experimental
  QMAKE_CFLAGS_RELEASE -= -O2
  QMAKE_CFLAGS_RELEASE += -O3
  QMAKE_CXXFLAGS_RELEASE -= -O2
  QMAKE_CXXFLAGS_RELEASE += -O3
  QMAKE_CFLAGS_RELEASE *= -ffast-math
  QMAKE_CXXFLAGS_RELEASE *= -ffast-math
}

linux-g++* {
  QMAKE_CC                = gcc-4.5
  QMAKE_CXX               = g++-4.5
  QMAKE_CFLAGS_RELEASE   += -flto
  QMAKE_CXXFLAGS_RELEASE += -flto
  QMAKE_LFLAGS_RELEASE   += -flto
}

win32-g++ {
  QMAKE_CFLAGS *= -Wextra
  QMAKE_CXXFLAGS *= -Wextra
}

macx-* {
  # minimum supported Mac OS X version
  QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
  QMAKE_CFLAGS *= -mmacosx-version-min=10.6
  QMAKE_CXXFLAGS *= -mmacosx-version-min=10.6
  # replace 10.5 with 10.6
  QMAKE_CFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_CXXFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_CFLAGS_X86_64 += -mmacosx-version-min=10.6    # CXX is made based on CFLAGS
  QMAKE_OBJECTIVE_CFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_OBJECTIVE_CFLAGS_X86_64 += -mmacosx-version-min=10.6
  QMAKE_LFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_LFLAGS_X86_64 += -mmacosx-version-min=10.6
}

CONFIG(production) {
  DEFINES += OMIM_PRODUCTION
} else {
  # enable debugging information for non-production release builds
  unix|win32-g++ {
    QMAKE_CFLAGS_RELEASE += -g
    QMAKE_CXXFLAGS_RELEASE += -g
  } win32-msvc* {
    QMAKE_LFLAGS += /PDB:$${DESTDIR}/$${TARGET}.pdb /DEBUG
  }
}

# This file is a template commmon for all qmake projects.
#
# To use it, define ROOT_DIR variable and include($$ROOT_DIR/common.pri)

# our own version variables
VERSION_MAJOR = 1
VERSION_MINOR = 0

# qt's variable
VERSION = $${VERSION_MAJOR}.$${VERSION_MINOR}

# Additional include directories, common to most projects.
INCLUDEPATH += $$ROOT_DIR/3party/boost

CONFIG(release, debug|release) {
  DEFINES += RELEASE _RELEASE NDEBUG
  CONFIG_NAME = release
} else {
  DEFINES += DEBUG _DEBUG
  CONFIG_NAME = debug
}

# turn off maps downloader engine for desktops in release and production
!iphone* {
  CONFIG(release, debug|release)|CONFIG(production) {
    CONFIG += no_downloader
    DEFINES += NO_DOWNLOADER
  }
}

BINARIES_PATH = $$ROOT_DIR/out/$$CONFIG_NAME
TEMP_PATH = $$ROOT_DIR/out/$$CONFIG_NAME/tmp/$$TARGET

DESTDIR = $$BINARIES_PATH
OBJECTS_DIR = $$TEMP_PATH
RCC_DIR = $$TEMP_PATH
MOC_DIR = $$TEMP_PATH
UI_DIR = $$TEMP_PATH

LIBS += -L$$BINARIES_PATH

# By default, do not include base QT classes in any project.
QT -= core gui

# Turn on compiler warnings.
CONFIG += warn_on

# Libraries' dependencies hack.
win32-msvc*|symbian {
  LIB_EXT = .lib
  LIB_PREFIX =
}
unix|win32-g++|bada-simulator {
 LIB_EXT = .a
 LIB_PREFIX = lib
}

# Add libraries' dependencies.
for(project, DEPENDENCIES) {
  PRE_TARGETDEPS += $$BINARIES_PATH/$$LIB_PREFIX$$project$$LIB_EXT
  LIBS += -l$$project
}

#INCLUDEPATH += $$ROOT_DIR/3party/protobuf/src/

# Windows-specific options for all projects
win32 {
  DEFINES += _WIN32_WINNT=0x0501
  DEFINES += WINVER=0x0501
  DEFINES += _WIN32_IE=0x0501
  DEFINES += WIN32_LEAN_AND_MEAN=1
  DEFINES += NTDDI_VERSION=0x05010000
}

win32-msvc* {
  QMAKE_CLEAN += *.user
  DEFINES += _SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX
  QMAKE_CXXFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb /Zi /fp:fast
  QMAKE_CFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb /Zi /fp:fast

  QMAKE_CXXFLAGS_RELEASE -= /O2
  # don't set -GL - bug in msvc2008
  QMAKE_CXXFLAGS_RELEASE += /Ox /GF
  # don't set /LTCG - bug in msvc2008
  QMAKE_LFLAGS_RELEASE += /MACHINE:X86 /OPT:REF

  CONFIG(release, debug|release) {
    DEFINES += _SECURE_SCL=0
  }
}

win32-msvc2010 {
  DEFINES += _HAS_CPP0X=0 # disable tr1 and c++0x features to avoid build errors
  QMAKE_CFLAGS_RELEASE += /GL
  QMAKE_CXXFLAGS_RELEASE += /GL
  QMAKE_LFLAGS_RELEASE += /LTCG
  QMAKE_LIB += /LTCG
}

unix|win32-g++ {
  QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare -Wno-strict-aliasing -Wconversion
  # experimental
  QMAKE_CFLAGS_RELEASE -= -O2
  QMAKE_CFLAGS_RELEASE += -O3
  QMAKE_CXXFLAGS_RELEASE -= -O2
  QMAKE_CXXFLAGS_RELEASE += -O3
  QMAKE_CFLAGS_RELEASE *= -ffast-math
  QMAKE_CXXFLAGS_RELEASE *= -ffast-math
}

linux-g++* {
  QMAKE_CC                = gcc-4.5
  QMAKE_CXX               = g++-4.5
  QMAKE_CFLAGS_RELEASE   += -flto
  QMAKE_CXXFLAGS_RELEASE += -flto
  QMAKE_LFLAGS_RELEASE   += -flto
}

win32-g++ {
  QMAKE_CFLAGS *= -Wextra
  QMAKE_CXXFLAGS *= -Wextra
}

macx-* {
  # minimum supported Mac OS X version
  QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
  QMAKE_CFLAGS *= -mmacosx-version-min=10.6
  QMAKE_CXXFLAGS *= -mmacosx-version-min=10.6
  # replace 10.5 with 10.6
  QMAKE_CFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_CXXFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_CFLAGS_X86_64 += -mmacosx-version-min=10.6    # CXX is made based on CFLAGS
  QMAKE_OBJECTIVE_CFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_OBJECTIVE_CFLAGS_X86_64 += -mmacosx-version-min=10.6
  QMAKE_LFLAGS_X86_64 -= -mmacosx-version-min=10.5
  QMAKE_LFLAGS_X86_64 += -mmacosx-version-min=10.6
}

CONFIG(production) {
  DEFINES += OMIM_PRODUCTION
} else {
  # enable debugging information for non-production release builds
  unix|win32-g++ {
    QMAKE_CFLAGS_RELEASE += -g
    QMAKE_CXXFLAGS_RELEASE += -g
  } win32-msvc* {
    QMAKE_LFLAGS += /PDB:$${DESTDIR}/$${TARGET}.pdb /DEBUG
  }
}


Bump version to 1.1.0

Bump version to 1.1.0

################################################################################
#  Copyright 2014-2015 Spectra Logic Corporation. All Rights Reserved.
#  Licensed under the Apache License, Version 2.0 (the "License"). You may not
#  use this file except in compliance with the License. A copy of the License
#  is located at
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
#  or in the "license" file accompanying this file.
#  This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
#  CONDITIONS OF ANY KIND, either express or implied. See the License for the
#  specific language governing permissions and limitations under the License.
################################################################################

# Define settings common between the main and test applications' project
# files

VERSION = 1.1.0

QT += concurrent core gui widgets

DEFINES += APP_VERSION=\\\"$$VERSION\\\"

INCLUDEPATH += $${PWD}/src

HEADERS = \
	$${PWD}/src/main_window.h \
	$${PWD}/src/helpers/number_helper.h \
	$${PWD}/src/lib/work_items/bulk_work_item.h \
	$${PWD}/src/lib/work_items/bulk_get_work_item.h \
	$${PWD}/src/lib/work_items/bulk_put_work_item.h \
	$${PWD}/src/lib/work_items/object_work_item.h \
	$${PWD}/src/lib/work_items/work_item.h \
	$${PWD}/src/lib/client.h \
	$${PWD}/src/lib/logger.h \
	$${PWD}/src/lib/mime_data.h \
	$${PWD}/src/lib/errors/ds3_error.h \
	$${PWD}/src/lib/watchers/get_bucket_watcher.h \
	$${PWD}/src/lib/watchers/get_service_watcher.h \
	$${PWD}/src/models/ds3_browser_model.h \
	$${PWD}/src/models/ds3_url.h \
	$${PWD}/src/models/host_browser_model.h \
	$${PWD}/src/models/job.h \
	$${PWD}/src/models/session.h \
	$${PWD}/src/views/browser.h \
	$${PWD}/src/views/browser_tree_view_style.h \
	$${PWD}/src/views/buckets/delete_bucket_dialog.h \
	$${PWD}/src/views/buckets/new_bucket_dialog.h \
	$${PWD}/src/views/console.h \
	$${PWD}/src/views/dialog.h \
	$${PWD}/src/views/ds3_browser.h \
	$${PWD}/src/views/ds3_delete_dialog.h \
	$${PWD}/src/views/host_browser.h \
	$${PWD}/src/views/job_view.h \
	$${PWD}/src/views/jobs_view.h \
	$${PWD}/src/views/objects/delete_objects_dialog.h \
	$${PWD}/src/views/session_dialog.h \
	$${PWD}/src/views/session_view.h

SOURCES = \
	$${PWD}/src/main_window.cc \
	$${PWD}/src/helpers/number_helper.cc \
	$${PWD}/src/lib/client.cc \
	$${PWD}/src/lib/mime_data.cc \
	$${PWD}/src/lib/errors/ds3_error.cc \
	$${PWD}/src/lib/watchers/get_bucket_watcher.cc \
	$${PWD}/src/lib/watchers/get_service_watcher.cc \
	$${PWD}/src/lib/work_items/bulk_work_item.cc \
	$${PWD}/src/lib/work_items/bulk_get_work_item.cc \
	$${PWD}/src/lib/work_items/bulk_put_work_item.cc \
	$${PWD}/src/lib/work_items/object_work_item.cc \
	$${PWD}/src/lib/work_items/work_item.cc \
	$${PWD}/src/models/ds3_browser_model.cc \
	$${PWD}/src/models/ds3_url.cc \
	$${PWD}/src/models/host_browser_model.cc \
	$${PWD}/src/models/job.cc \
	$${PWD}/src/models/session.cc \
	$${PWD}/src/views/browser.cc \
	$${PWD}/src/views/browser_tree_view_style.cc \
	$${PWD}/src/views/buckets/delete_bucket_dialog.cc \
	$${PWD}/src/views/buckets/new_bucket_dialog.cc \
	$${PWD}/src/views/console.cc \
	$${PWD}/src/views/dialog.cc \
	$${PWD}/src/views/ds3_browser.cc \
	$${PWD}/src/views/ds3_delete_dialog.cc \
	$${PWD}/src/views/host_browser.cc \
	$${PWD}/src/views/jobs_view.cc \
	$${PWD}/src/views/objects/delete_objects_dialog.cc \
	$${PWD}/src/views/session_dialog.cc \
	$${PWD}/src/views/session_view.cc

msvc {
	LIBS += ds3.lib
	QMAKE_CXXFLAGS += /WX /D_CRT_SECURE_NO_WARNINGS
} else {
	# Necessary on OSX at least
	exists(/usr/local/include) {
		INCLUDEPATH += /usr/local/include
	}
	# Necessary on OSX at least
	exists(/usr/local/lib) {
		LIBS += -L/usr/local/lib
	}

	LIBS += -lds3 -lcurl
}

gcc: QMAKE_CXXFLAGS += -Werror

################################################################################
#  Copyright 2014-2015 Spectra Logic Corporation. All Rights Reserved.
#  Licensed under the Apache License, Version 2.0 (the "License"). You may not
#  use this file except in compliance with the License. A copy of the License
#  is located at
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
#  or in the "license" file accompanying this file.
#  This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
#  CONDITIONS OF ANY KIND, either express or implied. See the License for the
#  specific language governing permissions and limitations under the License.
################################################################################

# Define settings common between the main and test applications' project
# files

VERSION = 0.0.4

QT += concurrent core gui widgets

DEFINES += APP_VERSION=\\\"$$VERSION\\\"

INCLUDEPATH += $${PWD}/src

HEADERS = \
	$${PWD}/src/main_window.h \
	$${PWD}/src/helpers/number_helper.h \
	$${PWD}/src/lib/work_items/bulk_work_item.h \
	$${PWD}/src/lib/work_items/bulk_get_work_item.h \
	$${PWD}/src/lib/work_items/bulk_put_work_item.h \
	$${PWD}/src/lib/work_items/object_work_item.h \
	$${PWD}/src/lib/work_items/work_item.h \
	$${PWD}/src/lib/client.h \
	$${PWD}/src/lib/logger.h \
	$${PWD}/src/lib/mime_data.h \
	$${PWD}/src/lib/errors/ds3_error.h \
	$${PWD}/src/lib/watchers/get_bucket_watcher.h \
	$${PWD}/src/lib/watchers/get_service_watcher.h \
	$${PWD}/src/models/ds3_browser_model.h \
	$${PWD}/src/models/ds3_url.h \
	$${PWD}/src/models/host_browser_model.h \
	$${PWD}/src/models/job.h \
	$${PWD}/src/models/session.h \
	$${PWD}/src/views/browser.h \
	$${PWD}/src/views/browser_tree_view_style.h \
	$${PWD}/src/views/buckets/delete_bucket_dialog.h \
	$${PWD}/src/views/buckets/new_bucket_dialog.h \
	$${PWD}/src/views/console.h \
	$${PWD}/src/views/dialog.h \
	$${PWD}/src/views/ds3_browser.h \
	$${PWD}/src/views/ds3_delete_dialog.h \
	$${PWD}/src/views/host_browser.h \
	$${PWD}/src/views/job_view.h \
	$${PWD}/src/views/jobs_view.h \
	$${PWD}/src/views/objects/delete_objects_dialog.h \
	$${PWD}/src/views/session_dialog.h \
	$${PWD}/src/views/session_view.h

SOURCES = \
	$${PWD}/src/main_window.cc \
	$${PWD}/src/helpers/number_helper.cc \
	$${PWD}/src/lib/client.cc \
	$${PWD}/src/lib/mime_data.cc \
	$${PWD}/src/lib/errors/ds3_error.cc \
	$${PWD}/src/lib/watchers/get_bucket_watcher.cc \
	$${PWD}/src/lib/watchers/get_service_watcher.cc \
	$${PWD}/src/lib/work_items/bulk_work_item.cc \
	$${PWD}/src/lib/work_items/bulk_get_work_item.cc \
	$${PWD}/src/lib/work_items/bulk_put_work_item.cc \
	$${PWD}/src/lib/work_items/object_work_item.cc \
	$${PWD}/src/lib/work_items/work_item.cc \
	$${PWD}/src/models/ds3_browser_model.cc \
	$${PWD}/src/models/ds3_url.cc \
	$${PWD}/src/models/host_browser_model.cc \
	$${PWD}/src/models/job.cc \
	$${PWD}/src/models/session.cc \
	$${PWD}/src/views/browser.cc \
	$${PWD}/src/views/browser_tree_view_style.cc \
	$${PWD}/src/views/buckets/delete_bucket_dialog.cc \
	$${PWD}/src/views/buckets/new_bucket_dialog.cc \
	$${PWD}/src/views/console.cc \
	$${PWD}/src/views/dialog.cc \
	$${PWD}/src/views/ds3_browser.cc \
	$${PWD}/src/views/ds3_delete_dialog.cc \
	$${PWD}/src/views/host_browser.cc \
	$${PWD}/src/views/jobs_view.cc \
	$${PWD}/src/views/objects/delete_objects_dialog.cc \
	$${PWD}/src/views/session_dialog.cc \
	$${PWD}/src/views/session_view.cc

msvc {
	LIBS += ds3.lib
	QMAKE_CXXFLAGS += /WX /D_CRT_SECURE_NO_WARNINGS
} else {
	# Necessary on OSX at least
	exists(/usr/local/include) {
		INCLUDEPATH += /usr/local/include
	}
	# Necessary on OSX at least
	exists(/usr/local/lib) {
		LIBS += -L/usr/local/lib
	}

	LIBS += -lds3 -lcurl
}

gcc: QMAKE_CXXFLAGS += -Werror


Version 0.3.6

Version 0.3.6

Signed-off-by: James Ausmus <f3ef53135d075b8aa563ebd9d076a1a3f7086345@intel.com>

VERSION = 0.3.6
#CONFIG += debug

PROJECT_NAME = meego-ux-panels
BASEDIR = $$system(pwd)

DEFINES += "PANEL_DESKTOP_PATH=\\\"/usr/share/meego-ux-panels/panels\\\""
DEFINES += "SETTINGS_ORG=\\\"MeeGo\\\""
DEFINES += "SETTINGS_APP=\\\"meego-ux-panels\\\""

DISTDIR = $${BASEDIR}/$${PROJECT_NAME}-$${VERSION}
TSDIR = $${DISTDIR}/ts

VERSION = 0.3.5.2
#CONFIG += debug

PROJECT_NAME = meego-ux-panels
BASEDIR = $$system(pwd)

DEFINES += "PANEL_DESKTOP_PATH=\\\"/usr/share/meego-ux-panels/panels\\\""
DEFINES += "SETTINGS_ORG=\\\"MeeGo\\\""
DEFINES += "SETTINGS_APP=\\\"meego-ux-panels\\\""

DISTDIR = $${BASEDIR}/$${PROJECT_NAME}-$${VERSION}
TSDIR = $${DISTDIR}/ts