fix src/src.pri's errors: UI_HEADERS_DIR, QMAKESPEC

# ===========================================================================
# 2013.04.17    XChinux created
#
#
# ===========================================================================

TEMPLATE = lib
TARGET = tianchi
QT += sql network script
greaterThan(QT_MAJOR_VERSION, 4) {
    QT += gui widgets concurrent
    win32:QT += axcontainer
} else {
    QT += gui
    win32:CONFIG += qaxcontainer
    DEFINES += QT_WIDGETS_LIB
}

TC_OUTPUT = $${PWD}/../output

TC_SPEC = qt$${QT_VERSION}

win32-g++*     : TC_SPEC = $${TC_SPEC}-mingw32
win32-msvc2005 : TC_SPEC = $${TC_SPEC}-vc2005_x86
win32-msvc2008 : TC_SPEC = $${TC_SPEC}-vc2008_x86
win32-msvc2010 : TC_SPEC = $${TC_SPEC}-vc2010_x86
win32-msvc2012 : TC_SPEC = $${TC_SPEC}-vc2012_x86

CONFIG(debug, debug|release) {
    TARGET = $${TARGET}d
}

CONFIG(static, static|shared) | CONFIG(staticlib, staticlib|shared) {
    TC_OUTPUT = $${TC_OUTPUT}/$${TC_SPEC}/static
    DESTDIR = $$TC_OUTPUT
} else {
    TC_OUTPUT = $${TC_OUTPUT}/$${TC_SPEC}/shared
    DESTDIR = $$TC_OUTPUT
    DEFINES += TIANCHI_EXPORT
    win32:RC_FILE = $$PWD/tianchi.rc
}

CONFIG(debug, debug|release) {
    TC_TMP = $${TC_OUTPUT}/debug
} else {
    TC_TMP = $${TC_OUTPUT}/release
}

MOC_DIR = $$TC_TMP
OBJECTS_DIR = $$TC_TMP
UI_DIR = $$TC_TMP
RCC_DIR = $$TC_TMP

TC_INCL = $$PWD/../inc

INCLUDEPATH += $$TC_INCL

win32:!win32-g++{
    LIBS += -lversion -ladvapi32 -lole32
}

HEADERS += \
    $$TC_INCL/Global.h \
    $$TC_INCL/tianchi.h \
    $$TC_INCL/Chinese/Chinese.h \
    $$TC_INCL/Core/Classes.h \
    $$TC_INCL/Core/Common.h \
    $$TC_INCL/Core/String.h \
    $$TC_INCL/Core/Utils.h \
    $$TC_INCL/File/Json.h \
    $$TC_INCL/File/LogTiny.h \
    $$TC_INCL/File/MSExcel.h \
    $$TC_INCL/File/FileUtils.h \
    $$TC_INCL/Gui/MarqueeLabel.h \
    $$TC_INCL/Gui/ClickLabel.h \
    $$TC_INCL/Gui/DateEdit.h \
    $$TC_INCL/Gui/GuiUtils.h \
    $$TC_INCL/Gui/TreeWidgetHeaderSetupDialog.h \
    $$TC_INCL/Network/DownloadHttp.h \
    $$TC_INCL/Network/SingleInstance.h \
    $$TC_INCL/OS/OS.h \
    $$TC_INCL/Sql/MSSQL.h

SOURCES += \
    $$PWD/Chinese/Chinese.cpp \
    $$PWD/Core/Classes.cpp \
    $$PWD/Core/Utils.cpp \
    $$PWD/Core/Common.cpp \
    $$PWD/Core/String.cpp \
    $$PWD/File/Json.cpp \
    $$PWD/File/LogTiny.cpp \
    $$PWD/File/MSExcel.cpp \
    $$PWD/File/FileUtils.cpp \
    $$PWD/Gui/MarqueeLabel.cpp \
    $$PWD/Gui/ClickLabel.cpp \
    $$PWD/Gui/DateEdit.cpp \
    $$PWD/Gui/TreeWidgetHeaderSetupDialog.cpp \
    $$PWD/Gui/GuiUtils.cpp \
    $$PWD/Network/DownloadHttp.cpp \
    $$PWD/Network/SingleInstance.cpp \
    $$PWD/OS/OS.cpp \
    $$PWD/Sql/MSSQL.cpp
FORMS += \
    $$PWD/Gui/TreeWidgetHeaderSetupDialog.ui

RESOURCES += \
    $$PWD/../res/tianchi.qrc

# ===========================================================================
# 2013.04.17    XChinux created
#
#
# ===========================================================================

TEMPLATE = lib
TARGET = tianchi
QT += sql network script
greaterThan(QT_MAJOR_VERSION, 4) {
    QT += gui widgets concurrent
    win32:QT += axcontainer
} else {
    QT += gui
    win32:CONFIG += qaxcontainer
    DEFINES += QT_WIDGETS_LIB
}

TC_OUTPUT = $${PWD}/../output

isEmpty(QMAKESPEC) {
win32-g++*     : QMAKESPEC = win32-g++
win32-msvc2005 : QMAKESPEC = win32-msvc2005
win32-msvc2008 : QMAKESPEC = win32-msvc2008
win32-msvc2010 : QMAKESPEC = win32-msvc2010
win32-msvc2012 : QMAKESPEC = win32-msvc2012
linux-g++*     : QMAKESPEC = linux-g++
}

TC_SPEC = $${QT_VERSION}-$${QMAKESPEC}

CONFIG(debug, debug|release) {
    TARGET = $${TARGET}d
}

CONFIG(static, static|shared) | CONFIG(staticlib, staticlib|shared) {
    TC_OUTPUT = $${TC_OUTPUT}/$${TC_SPEC}/static
    DESTDIR = $$TC_OUTPUT
} else {
    TC_OUTPUT = $${TC_OUTPUT}/$${TC_SPEC}/shared
    DESTDIR = $$TC_OUTPUT
    DEFINES += TIANCHI_EXPORT
    win32:RC_FILE = $$PWD/tianchi.rc
}

CONFIG(debug, debug|release) {
    TC_TMP = $${TC_OUTPUT}/debug
} else {
    TC_TMP = $${TC_OUTPUT}/release
}

MOC_DIR = $$TC_TMP
OBJECTS_DIR = $$TC_TMP
UI_HEADERS_DIR = $$TC_TMP
RCC_DIR = $$TC_TMP

TC_INCL = $$PWD/../inc

INCLUDEPATH += $$TC_INCL

win32:!win32-g++{
    LIBS += -lversion -ladvapi32 -lole32
}

HEADERS += \
    $$TC_INCL/Global.h \
    $$TC_INCL/tianchi.h \
    $$TC_INCL/Chinese/Chinese.h \
    $$TC_INCL/Core/Classes.h \
    $$TC_INCL/Core/Common.h \
    $$TC_INCL/Core/String.h \
    $$TC_INCL/Core/Utils.h \
    $$TC_INCL/File/Json.h \
    $$TC_INCL/File/LogTiny.h \
    $$TC_INCL/File/MSExcel.h \
    $$TC_INCL/File/FileUtils.h \
    $$TC_INCL/Gui/MarqueeLabel.h \
    $$TC_INCL/Gui/ClickLabel.h \
    $$TC_INCL/Gui/DateEdit.h \
    $$TC_INCL/Gui/GuiUtils.h \
    $$TC_INCL/Gui/TreeWidgetHeaderSetupDialog.h \
    $$TC_INCL/Network/DownloadHttp.h \
    $$TC_INCL/Network/SingleInstance.h \
    $$TC_INCL/OS/OS.h \
    $$TC_INCL/Sql/MSSQL.h

SOURCES += \
    $$PWD/Chinese/Chinese.cpp \
    $$PWD/Core/Classes.cpp \
    $$PWD/Core/Utils.cpp \
    $$PWD/Core/Common.cpp \
    $$PWD/Core/String.cpp \
    $$PWD/File/Json.cpp \
    $$PWD/File/LogTiny.cpp \
    $$PWD/File/MSExcel.cpp \
    $$PWD/File/FileUtils.cpp \
    $$PWD/Gui/MarqueeLabel.cpp \
    $$PWD/Gui/ClickLabel.cpp \
    $$PWD/Gui/DateEdit.cpp \
    $$PWD/Gui/TreeWidgetHeaderSetupDialog.cpp \
    $$PWD/Gui/GuiUtils.cpp \
    $$PWD/Network/DownloadHttp.cpp \
    $$PWD/Network/SingleInstance.cpp \
    $$PWD/OS/OS.cpp \
    $$PWD/Sql/MSSQL.cpp
FORMS += \
    $$PWD/Gui/TreeWidgetHeaderSetupDialog.ui

RESOURCES += \
    $$PWD/../res/tianchi.qrc


maybe now?

maybe now?

PROJECT_ROOT = $$PWD/..

CONFIG(debug, debug|release) {
        DIR_OUTPUT = $$PROJECT_ROOT/build/debug
        DEFINES += COMPILER_EXPLORER_DEBUG
}
CONFIG(release, debug|release) {
        DIR_OUTPUT = $$PROJECT_ROOT/build/release
}
DESTDIR = $$DIR_OUTPUT
OBJECTS_DIR = $$DESTDIR/.obj/$$PROJECTFILENAME
MOC_DIR = $$DESTDIR/.moc/$$PROJECTFILENAME
UI_DIR = $$DESTDIR/.ui/$$PROJECTFILENAME
RCC_DIR = $$DESTDIR/.res/$$PROJECTFILENAME

unix: CONFIG += c++14
mingw: QMAKE_CXXFLAGS += -std=gnu++1y

PROJECT_ROOT = $$PWD/..

CONFIG(debug, debug|release) {
        DIR_OUTPUT = $$PROJECT_ROOT/build/debug
        DEFINES += COMPILER_EXPLORER_DEBUG
}
CONFIG(release, debug|release) {
        DIR_OUTPUT = $$PROJECT_ROOT/build/release
}
DESTDIR = $$DIR_OUTPUT
OBJECTS_DIR = $$DESTDIR/.obj/$$PROJECTFILENAME
MOC_DIR = $$DESTDIR/.moc/$$PROJECTFILENAME
UI_DIR = $$DESTDIR/.ui/$$PROJECTFILENAME
RCC_DIR = $$DESTDIR/.res/$$PROJECTFILENAME

QMAKE_CXXFLAGS += -std=c++14
unix: CONFIG += c++14
mingw: QMAKE_CXXFLAGS += -std=gnu++1y


QMake: Turn on developer build via a variable

Add "DEVELOPER_BUILD=true" to qmake arguments to enable dev build

#options += static-lib

equals(DEVELOPER_BUILD, "true") {
    message("Developer build")
    options += developer-build
}

# Installation directories
isEmpty(INSTALL_PREFIX) {
    unix {
        INSTALL_PREFIX = /usr/local
    } else {
        INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
    }
}

isEmpty(INSTALL_LIB_DIR) {
    INSTALL_LIB_DIR = $$INSTALL_PREFIX/lib
}

isEmpty(INSTALL_INCLUDE_DIR) {
    INSTALL_INCLUDE_DIR = $$INSTALL_PREFIX/include
}

isEmpty(INSTALL_DATA_DIR) {
    INSTALL_DATA_DIR = $$INSTALL_PREFIX/share
}

isEmpty(INSTALL_DOC_DIR) {
    INSTALL_DOC_DIR = $$INSTALL_DATA_DIR/doc
}

isEmpty(INSTALL_QML_IMPORT_DIR) {
    INSTALL_QML_IMPORT_DIR = $$[QT_INSTALL_QML]
}

#options = developer-build
#options += static-lib

# Installation directories
isEmpty(INSTALL_PREFIX) {
    unix {
        INSTALL_PREFIX = /usr/local
    } else {
        INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
    }
}

isEmpty(INSTALL_LIB_DIR) {
    INSTALL_LIB_DIR = $$INSTALL_PREFIX/lib
}

isEmpty(INSTALL_INCLUDE_DIR) {
    INSTALL_INCLUDE_DIR = $$INSTALL_PREFIX/include
}

isEmpty(INSTALL_DATA_DIR) {
    INSTALL_DATA_DIR = $$INSTALL_PREFIX/share
}

isEmpty(INSTALL_DOC_DIR) {
    INSTALL_DOC_DIR = $$INSTALL_DATA_DIR/doc
}

isEmpty(INSTALL_QML_IMPORT_DIR) {
    INSTALL_QML_IMPORT_DIR = $$[QT_INSTALL_QML]
}


bump version for qmake

bump version for qmake

# Common definitions
QDJANGO_VERSION=0.2.0

# Determine library type (lib or staticlib)
isEmpty(QDJANGO_LIBRARY_TYPE) {
    QDJANGO_LIBRARY_TYPE = lib
}
contains(QDJANGO_LIBRARY_TYPE,staticlib) {
    DEFINES += QDJANGO_STATIC
} else {
    DEFINES += QDJANGO_SHARED
}
DEFINES += QDJANGO_BUILD

# Common definitions
QDJANGO_VERSION=0.1.0

# Determine library type (lib or staticlib)
isEmpty(QDJANGO_LIBRARY_TYPE) {
    QDJANGO_LIBRARY_TYPE = lib
}
contains(QDJANGO_LIBRARY_TYPE,staticlib) {
    DEFINES += QDJANGO_STATIC
} else {
    DEFINES += QDJANGO_SHARED
}
DEFINES += QDJANGO_BUILD


comment out page_mouse_trueos

comment out page_mouse_trueos

HEADERS	+= 	$${PWD}/getPage.h \
		$${PWD}/PageWidget.h \
		$${PWD}/page_main.h \
		$${PWD}/page_wallpaper.h \
		$${PWD}/page_theme.h \
		$${PWD}/page_autostart.h \
		$${PWD}/page_defaultapps.h \
		$${PWD}/page_fluxbox_keys.h \
		$${PWD}/page_fluxbox_settings.h \
		$${PWD}/page_interface_desktop.h \
		$${PWD}/page_interface_menu.h \
		$${PWD}/page_interface_panels.h \
		$${PWD}/page_session_locale.h \
		$${PWD}/page_session_options.h \
		$${PWD}/page_compton.h \
		$${PWD}/page_mouse.h
//		$$PWD/page_mouse_trueos.h

SOURCES	+=	$${PWD}/page_main.cpp \
		$${PWD}/page_wallpaper.cpp \
		$${PWD}/page_theme.cpp \
		$${PWD}/page_autostart.cpp \
		$${PWD}/page_defaultapps.cpp \
		$${PWD}/page_fluxbox_keys.cpp \
		$${PWD}/page_fluxbox_settings.cpp \
		$${PWD}/page_interface_desktop.cpp \
		$${PWD}/page_interface_menu.cpp \
		$${PWD}/page_interface_panels.cpp \
		$${PWD}/page_session_locale.cpp \
		$${PWD}/page_session_options.cpp \
		$${PWD}/page_compton.cpp \
		$${PWD}/page_mouse.cpp
//		$$PWD/page_mouse_trueos.cpp

FORMS	+=	$${PWD}/page_main.ui \
		$${PWD}/page_wallpaper.ui \
		$${PWD}/page_theme.ui \
		$${PWD}/page_autostart.ui \
		$${PWD}/page_defaultapps.ui \
		$${PWD}/page_fluxbox_keys.ui \
		$${PWD}/page_fluxbox_settings.ui \
		$${PWD}/page_interface_desktop.ui \
		$${PWD}/page_interface_menu.ui \
		$${PWD}/page_interface_panels.ui \
		$${PWD}/page_session_locale.ui \
		$${PWD}/page_session_options.ui \
		$${PWD}/page_compton.ui \
		$${PWD}/page_mouse.ui
//		$$PWD/page_mouse_trueos.ui

HEADERS	+= 	$${PWD}/getPage.h \
		$${PWD}/PageWidget.h \
		$${PWD}/page_main.h \
		$${PWD}/page_wallpaper.h \
		$${PWD}/page_theme.h \
		$${PWD}/page_autostart.h \
		$${PWD}/page_defaultapps.h \
		$${PWD}/page_fluxbox_keys.h \
		$${PWD}/page_fluxbox_settings.h \
		$${PWD}/page_interface_desktop.h \
		$${PWD}/page_interface_menu.h \
		$${PWD}/page_interface_panels.h \
		$${PWD}/page_session_locale.h \
		$${PWD}/page_session_options.h \
		$${PWD}/page_compton.h \
		$${PWD}/page_mouse.h \
    $$PWD/page_mouse_trueos.h

SOURCES	+=	$${PWD}/page_main.cpp \
		$${PWD}/page_wallpaper.cpp \
		$${PWD}/page_theme.cpp \
		$${PWD}/page_autostart.cpp \
		$${PWD}/page_defaultapps.cpp \
		$${PWD}/page_fluxbox_keys.cpp \
		$${PWD}/page_fluxbox_settings.cpp \
		$${PWD}/page_interface_desktop.cpp \
		$${PWD}/page_interface_menu.cpp \
		$${PWD}/page_interface_panels.cpp \
		$${PWD}/page_session_locale.cpp \
		$${PWD}/page_session_options.cpp \
		$${PWD}/page_compton.cpp \
		$${PWD}/page_mouse.cpp \
    $$PWD/page_mouse_trueos.cpp

FORMS	+=	$${PWD}/page_main.ui \
		$${PWD}/page_wallpaper.ui \
		$${PWD}/page_theme.ui \
		$${PWD}/page_autostart.ui \
		$${PWD}/page_defaultapps.ui \
		$${PWD}/page_fluxbox_keys.ui \
		$${PWD}/page_fluxbox_settings.ui \
		$${PWD}/page_interface_desktop.ui \
		$${PWD}/page_interface_menu.ui \
		$${PWD}/page_interface_panels.ui \
		$${PWD}/page_session_locale.ui \
		$${PWD}/page_session_options.ui \
		$${PWD}/page_compton.ui \
		$${PWD}/page_mouse.ui \
    $$PWD/page_mouse_trueos.ui


Updated build script for QT

Updated build script for QT

MEGASDK_BASE_PATH = $$PWD/../../

VPATH += $$MEGASDK_BASE_PATH
SOURCES += src/attrmap.cpp \
    src/backofftimer.cpp \
    src/base64.cpp \
    src/command.cpp \
    src/commands.cpp \
    src/db.cpp \
    src/gfx.cpp \
    src/file.cpp \
    src/fileattributefetch.cpp \
    src/filefingerprint.cpp \
    src/filesystem.cpp \
    src/http.cpp \
    src/json.cpp \
    src/megaclient.cpp \
    src/node.cpp \
    src/pubkeyaction.cpp \
    src/request.cpp \
    src/serialize64.cpp \
    src/share.cpp \
    src/sharenodekeys.cpp \
    src/sync.cpp \
    src/transfer.cpp \
    src/transferslot.cpp \
    src/treeproc.cpp \
    src/user.cpp \
    src/utils.cpp \
    src/logging.cpp \
    src/waiterbase.cpp  \
    src/proxy.cpp \
    src/pendingcontactrequest.cpp \
    src/crypto/cryptopp.cpp  \
    src/crypto/sodium.cpp  \
    src/db/sqlite.cpp  \
    src/gfx/qt.cpp \
    src/gfx/external.cpp \
    src/thread/qtthread.cpp \
    src/mega_utf8proc.cpp \
    src/mega_zxcvbn.cpp \
    src/mediafileattribute.cpp

CONFIG(USE_MEGAAPI) {
    SOURCES += src/megaapi.cpp src/megaapi_impl.cpp \
        bindings/qt/QTMegaRequestListener.cpp \
        bindings/qt/QTMegaTransferListener.cpp \
        bindings/qt/QTMegaGlobalListener.cpp \
        bindings/qt/QTMegaSyncListener.cpp \
        bindings/qt/QTMegaListener.cpp \
        bindings/qt/QTMegaEvent.cpp
}

# CONFIG += USE_LIBUV
CONFIG(USE_LIBUV) {
    SOURCES += src/mega_http_parser.cpp
    DEFINES += HAVE_LIBUV
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/libuv
    win32 {
        LIBS += -llibuv -lIphlpapi -lUserenv
    }

    unix:!macx {
       exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libuv.a) {
        LIBS += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libuv.a
       }
       else {
        LIBS += -luv
       }
    }

    macx {
        LIBS += -luv
    }
}

CONFIG(USE_MEDIAINFO) {
    DEFINES += USE_MEDIAINFO
    LIBS += -lMediaInfo -lZenLib -lzlibstat
}

win32 {
    # comment this line to use WinHTTP on Windows
    CONFIG += USE_CURL

    CONFIG(USE_CURL) {
        SOURCES += src/wincurl/net.cpp  \
            src/wincurl/fs.cpp  \
            src/wincurl/waiter.cpp
        HEADERS += include/mega/wincurl/meganet.h
        DEFINES += USE_CURL USE_OPENSSL
        LIBS +=  -llibcurl -lcares -llibeay32 -lssleay32
    }
    else {
        SOURCES += src/win32/net.cpp \
            src/win32/fs.cpp \
            src/win32/waiter.cpp
        HEADERS += include/mega/win32/meganet.h
    }

    # link winhttp anyway (required for automatic proxy detection)
    LIBS += -lwinhttp -ladvapi32
    DEFINES += _CRT_SECURE_NO_WARNINGS
}

unix {
SOURCES += src/posix/net.cpp  \
    src/posix/fs.cpp  \
    src/posix/waiter.cpp
}

HEADERS  += include/mega.h \
            include/mega/account.h \
            include/mega/attrmap.h \
            include/mega/backofftimer.h \
            include/mega/base64.h \
            include/mega/command.h \
            include/mega/console.h \
            include/mega/db.h \
            include/mega/gfx.h \
            include/mega/file.h \
            include/mega/fileattributefetch.h \
            include/mega/filefingerprint.h \
            include/mega/filesystem.h \
            include/mega/http.h \
            include/mega/json.h \
            include/mega/megaapp.h \
            include/mega/megaclient.h \
            include/mega/node.h \
            include/mega/pubkeyaction.h \
            include/mega/request.h \
            include/mega/serialize64.h \
            include/mega/share.h \
            include/mega/sharenodekeys.h \
            include/mega/sync.h \
            include/mega/transfer.h \
            include/mega/transferslot.h \
            include/mega/treeproc.h \
            include/mega/types.h \
            include/mega/user.h \
            include/mega/utils.h \
            include/mega/logging.h \
            include/mega/waiter.h \
            include/mega/proxy.h \
            include/mega/pendingcontactrequest.h \
            include/mega/crypto/cryptopp.h  \
            include/mega/crypto/sodium.h  \
            include/mega/db/sqlite.h  \
            include/mega/gfx/qt.h \
            include/mega/gfx/external.h \
            include/mega/thread.h \
            include/mega/thread/cppthread.h \
            include/mega/thread/qtthread.h \
            include/megaapi.h \
            include/megaapi_impl.h \
            include/mega/mega_utf8proc.h \
            include/mega/thread/posixthread.h \
            include/mega/mega_zxcvbn.h \
            include/mega/mediafileattribute.h

CONFIG(USE_MEGAAPI) {
    HEADERS += bindings/qt/QTMegaRequestListener.h \
            bindings/qt/QTMegaTransferListener.h \
            bindings/qt//QTMegaGlobalListener.h \
            bindings/qt/QTMegaSyncListener.h \
            bindings/qt/QTMegaListener.h \
            bindings/qt/QTMegaEvent.h
}

win32 {
    HEADERS  += include/mega/win32/megasys.h  \
            include/mega/win32/megafs.h  \
            include/mega/win32/megawaiter.h

    SOURCES += bindings/qt/3rdparty/libs/sqlite3.c
}

unix {
    !exists($$MEGASDK_BASE_PATH/include/mega/config.h) {
        error("Configuration file not found! Please re-run configure script located in the project's root directory!")
    }
    HEADERS  += include/mega/posix/meganet.h  \
            include/mega/posix/megasys.h  \
            include/mega/posix/megafs.h  \
            include/mega/posix/megawaiter.h \
            include/mega/config.h
}

CONFIG(USE_PCRE) {
 DEFINES += USE_PCRE
}

DEFINES += USE_SQLITE USE_CRYPTOPP USE_QT MEGA_QT_LOGGING ENABLE_SYNC ENABLE_CHAT
INCLUDEPATH += $$MEGASDK_BASE_PATH/include
INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt
INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include

!release {
    DEFINES += SQLITE_DEBUG DEBUG
}
else {
    DEFINES += NDEBUG
}

win32 {
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/zlib
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/libsodium

    CONFIG(USE_CURL) {
        INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/wincurl
        INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/openssl
        INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/cares
    }
    else {
        INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/win32
    }

    contains(CONFIG, BUILDX64) {
       release {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x64"
        }
        else {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x64d"
        }
    }

    !contains(CONFIG, BUILDX64) {
        release {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x32"
        }
        else {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x32d"
        }
    }

    CONFIG(USE_PCRE) {
     INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/pcre
     DEFINES += PCRE_STATIC
     LIBS += -lpcre
    }

    LIBS += -lshlwapi -lws2_32 -luser32 -lsodium -lcryptopp -lzlibstat
}

unix:!macx {
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix
   LIBS += -lsqlite3 -lrt

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a) {
    LIBS += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a
   }
   else {
    LIBS += -lcurl
   }

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libz.a) {
    LIBS += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libz.a
   }
   else {
    LIBS += -lz
   }

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libssl.a) {
    LIBS +=  $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libssl.a
   }
   else {
    LIBS += -lssl
   }

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcrypto.a) {
    LIBS +=  $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcrypto.a
   }
   else {
    LIBS += -lcrypto
   }

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcryptopp.a) {
    LIBS +=  $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcryptopp.a
   }
   else {
    LIBS += -lcryptopp
   }

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcares.a) {
    LIBS +=  $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcares.a
   }
   else {
    LIBS += -lcares
   }

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libsodium.a) {
    LIBS +=  $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libsodium.a
   }
   else {
    LIBS += -lsodium
   }

   CONFIG(USE_PCRE) {
    DEFINES += PCRE_STATIC
    exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libpcre.a) {
     LIBS +=  $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libpcre.a
    }
    else {
     LIBS += -lpcre
    }
   }
}

macx {
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/osx

   OBJECTIVE_SOURCES += $$MEGASDK_BASE_PATH/src/osx/osxutils.mm

   SOURCES += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/sqlite3.c

   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/curl
   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/libsodium
   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/openssl
   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/cares

   CONFIG(USE_PCRE) {
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/pcre
    DEFINES += PCRE_STATIC
    LIBS += -lpcre
   }

   DEFINES += _DARWIN_FEATURE_64_BIT_INODE USE_OPENSSL CRYPTOPP_DISABLE_ASM

   LIBS += -L$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/ $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcares.a $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libsodium.a \
            -lz -lssl -lcrypto -lcryptopp
   LIBS += -framework SystemConfiguration
}

MEGASDK_BASE_PATH = $$PWD/../../

VPATH += $$MEGASDK_BASE_PATH
SOURCES += src/attrmap.cpp \
    src/backofftimer.cpp \
    src/base64.cpp \
    src/command.cpp \
    src/commands.cpp \
    src/db.cpp \
    src/gfx.cpp \
    src/file.cpp \
    src/fileattributefetch.cpp \
    src/filefingerprint.cpp \
    src/filesystem.cpp \
    src/http.cpp \
    src/json.cpp \
    src/megaclient.cpp \
    src/node.cpp \
    src/pubkeyaction.cpp \
    src/request.cpp \
    src/serialize64.cpp \
    src/share.cpp \
    src/sharenodekeys.cpp \
    src/sync.cpp \
    src/transfer.cpp \
    src/transferslot.cpp \
    src/treeproc.cpp \
    src/user.cpp \
    src/utils.cpp \
    src/logging.cpp \
    src/waiterbase.cpp  \
    src/proxy.cpp \
    src/pendingcontactrequest.cpp \
    src/crypto/cryptopp.cpp  \
    src/crypto/sodium.cpp  \
    src/db/sqlite.cpp  \
    src/gfx/qt.cpp \
    src/gfx/external.cpp \
    src/thread/qtthread.cpp \
    src/mega_utf8proc.cpp \
    src/mega_zxcvbn.cpp

CONFIG(USE_MEGAAPI) {
    SOURCES += src/megaapi.cpp src/megaapi_impl.cpp \
        bindings/qt/QTMegaRequestListener.cpp \
        bindings/qt/QTMegaTransferListener.cpp \
        bindings/qt/QTMegaGlobalListener.cpp \
        bindings/qt/QTMegaSyncListener.cpp \
        bindings/qt/QTMegaListener.cpp \
        bindings/qt/QTMegaEvent.cpp
}

# CONFIG += USE_LIBUV
CONFIG(USE_LIBUV) {
    SOURCES += src/mega_http_parser.cpp
    DEFINES += HAVE_LIBUV
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/libuv
    win32 {
        LIBS += -llibuv -lIphlpapi -lUserenv
    }

    unix:!macx {
       exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libuv.a) {
        LIBS += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libuv.a
       }
       else {
        LIBS += -luv
       }
    }

    macx {
        LIBS += -luv
    }
}

win32 {
    # comment this line to use WinHTTP on Windows
    CONFIG += USE_CURL

    CONFIG(USE_CURL) {
        SOURCES += src/wincurl/net.cpp  \
            src/wincurl/fs.cpp  \
            src/wincurl/waiter.cpp
        HEADERS += include/mega/wincurl/meganet.h
        DEFINES += USE_CURL USE_OPENSSL
        LIBS +=  -llibcurl -lcares -llibeay32 -lssleay32
    }
    else {
        SOURCES += src/win32/net.cpp \
            src/win32/fs.cpp \
            src/win32/waiter.cpp
        HEADERS += include/mega/win32/meganet.h
    }

    # link winhttp anyway (required for automatic proxy detection)
    LIBS += -lwinhttp -ladvapi32
    DEFINES += _CRT_SECURE_NO_WARNINGS
}

unix {
SOURCES += src/posix/net.cpp  \
    src/posix/fs.cpp  \
    src/posix/waiter.cpp
}

HEADERS  += include/mega.h \
            include/mega/account.h \
            include/mega/attrmap.h \
            include/mega/backofftimer.h \
            include/mega/base64.h \
            include/mega/command.h \
            include/mega/console.h \
            include/mega/db.h \
            include/mega/gfx.h \
            include/mega/file.h \
            include/mega/fileattributefetch.h \
            include/mega/filefingerprint.h \
            include/mega/filesystem.h \
            include/mega/http.h \
            include/mega/json.h \
            include/mega/megaapp.h \
            include/mega/megaclient.h \
            include/mega/node.h \
            include/mega/pubkeyaction.h \
            include/mega/request.h \
            include/mega/serialize64.h \
            include/mega/share.h \
            include/mega/sharenodekeys.h \
            include/mega/sync.h \
            include/mega/transfer.h \
            include/mega/transferslot.h \
            include/mega/treeproc.h \
            include/mega/types.h \
            include/mega/user.h \
            include/mega/utils.h \
            include/mega/logging.h \
            include/mega/waiter.h \
            include/mega/proxy.h \
            include/mega/pendingcontactrequest.h \
            include/mega/crypto/cryptopp.h  \
            include/mega/crypto/sodium.h  \
            include/mega/db/sqlite.h  \
            include/mega/gfx/qt.h \
            include/mega/gfx/external.h \
            include/mega/thread.h \
            include/mega/thread/cppthread.h \
            include/mega/thread/qtthread.h \
            include/megaapi.h \
            include/megaapi_impl.h \
            include/mega/mega_utf8proc.h \
            include/mega/thread/posixthread.h \
            include/mega/mega_zxcvbn.h

CONFIG(USE_MEGAAPI) {
    HEADERS += bindings/qt/QTMegaRequestListener.h \
            bindings/qt/QTMegaTransferListener.h \
            bindings/qt//QTMegaGlobalListener.h \
            bindings/qt/QTMegaSyncListener.h \
            bindings/qt/QTMegaListener.h \
            bindings/qt/QTMegaEvent.h
}

win32 {
    HEADERS  += include/mega/win32/megasys.h  \
            include/mega/win32/megafs.h  \
            include/mega/win32/megawaiter.h

    SOURCES += bindings/qt/3rdparty/libs/sqlite3.c
}

unix {
    !exists($$MEGASDK_BASE_PATH/include/mega/config.h) {
        error("Configuration file not found! Please re-run configure script located in the project's root directory!")
    }
    HEADERS  += include/mega/posix/meganet.h  \
            include/mega/posix/megasys.h  \
            include/mega/posix/megafs.h  \
            include/mega/posix/megawaiter.h \
            include/mega/config.h
}

CONFIG(USE_PCRE) {
 DEFINES += USE_PCRE
}

DEFINES += USE_SQLITE USE_CRYPTOPP USE_QT MEGA_QT_LOGGING ENABLE_SYNC ENABLE_CHAT
INCLUDEPATH += $$MEGASDK_BASE_PATH/include
INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt
INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include

!release {
    DEFINES += SQLITE_DEBUG DEBUG
}
else {
    DEFINES += NDEBUG
}

win32 {
    INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/zlib
    INCLUDEPATH += $$[QT_INSTALL_PREFIX]/../src/qtbase/src/3rdparty/zlib
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/libsodium

    CONFIG(USE_CURL) {
        INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/wincurl
        INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/openssl
        INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/cares
    }
    else {
        INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/win32
    }

    contains(CONFIG, BUILDX64) {
       release {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x64"
        }
        else {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x64d"
        }
    }

    !contains(CONFIG, BUILDX64) {
        release {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x32"
        }
        else {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x32d"
        }
    }

    CONFIG(USE_PCRE) {
     INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/pcre
     DEFINES += PCRE_STATIC
     LIBS += -lpcre
    }

    LIBS += -lshlwapi -lws2_32 -luser32 -lsodium -lcryptopp
}

unix:!macx {
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix
   LIBS += -lsqlite3 -lrt

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a) {
    LIBS += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a
   }
   else {
    LIBS += -lcurl
   }

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libz.a) {
    LIBS += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libz.a
   }
   else {
    LIBS += -lz
   }

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libssl.a) {
    LIBS +=  $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libssl.a
   }
   else {
    LIBS += -lssl
   }

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcrypto.a) {
    LIBS +=  $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcrypto.a
   }
   else {
    LIBS += -lcrypto
   }

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcryptopp.a) {
    LIBS +=  $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcryptopp.a
   }
   else {
    LIBS += -lcryptopp
   }

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcares.a) {
    LIBS +=  $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcares.a
   }
   else {
    LIBS += -lcares
   }

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libsodium.a) {
    LIBS +=  $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libsodium.a
   }
   else {
    LIBS += -lsodium
   }

   CONFIG(USE_PCRE) {
    DEFINES += PCRE_STATIC
    exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libpcre.a) {
     LIBS +=  $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libpcre.a
    }
    else {
     LIBS += -lpcre
    }
   }
}

macx {
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/osx

   OBJECTIVE_SOURCES += $$MEGASDK_BASE_PATH/src/osx/osxutils.mm

   SOURCES += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/sqlite3.c

   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/curl
   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/libsodium
   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/openssl
   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/cares

   CONFIG(USE_PCRE) {
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/pcre
    DEFINES += PCRE_STATIC
    LIBS += -lpcre
   }

   DEFINES += _DARWIN_FEATURE_64_BIT_INODE USE_OPENSSL CRYPTOPP_DISABLE_ASM

   LIBS += -L$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/ $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcares.a $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libsodium.a \
            -lz -lssl -lcrypto -lcryptopp
   LIBS += -framework SystemConfiguration
}


Fix a wrong include in cppeditor_dependencies.pri


Fix the project file to reference the quazip source in the correct location.  Use $${PWD} for all quazip lines to match the rest of the source.

################################################################################
#  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.3

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 \
	$${PWD}/vendor/quazip/crypt.h \
	$${PWD}/vendor/quazip/ioapi.h \
	$${PWD}/vendor/quazip/JlCompress.h \
	$${PWD}/vendor/quazip/quaadler32.h \
	$${PWD}/vendor/quazip/quachecksum32.h \
	$${PWD}/vendor/quazip/quacrc32.h \
	$${PWD}/vendor/quazip/quagzipfile.h \
	$${PWD}/vendor/quazip/quaziodevice.h \
	$${PWD}/vendor/quazip/quazipdir.h \
	$${PWD}/vendor/quazip/quazipfile.h \
	$${PWD}/vendor/quazip/quazipfileinfo.h \
	$${PWD}/vendor/quazip/quazipnewinfo.h \
	$${PWD}/vendor/quazip/quazip_global.h \
	$${PWD}/vendor/quazip/quazip.h \
	$${PWD}/vendor/quazip/unzip.h \
	$${PWD}/vendor/quazip/zip.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 \
	$${PWD}/vendor/quazip/JlCompress.cpp \
	$${PWD}/vendor/quazip/qioapi.cpp \
	$${PWD}/vendor/quazip/quaadler32.cpp \
	$${PWD}/vendor/quazip/quacrc32.cpp \
	$${PWD}/vendor/quazip/quagzipfile.cpp \
	$${PWD}/vendor/quazip/quaziodevice.cpp \
	$${PWD}/vendor/quazip/quazipdir.cpp \
	$${PWD}/vendor/quazip/quazipfile.cpp \
	$${PWD}/vendor/quazip/quazipfileinfo.cpp \
	$${PWD}/vendor/quazip/quazipnewinfo.cpp \
	$${PWD}/vendor/quazip/quazip.cpp \
	$${PWD}/vendor/quazip/unzip.c \
	$${PWD}/vendor/quazip/zip.c

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 -lz
}

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 = 1.1.3

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 \
	vendor/quazip/crypt.h \
	vendor/quazip/ioapi.h \
	vendor/quazip/JlCompress.h \
	vendor/quazip/quaadler32.h \
	vendor/quazip/quachecksum32.h \
	vendor/quazip/quacrc32.h \
	vendor/quazip/quagzipfile.h \
	vendor/quazip/quaziodevice.h \
	vendor/quazip/quazipdir.h \
	vendor/quazip/quazipfile.h \
	vendor/quazip/quazipfileinfo.h \
	vendor/quazip/quazipnewinfo.h \
	vendor/quazip/quazip_global.h \
	vendor/quazip/quazip.h \
	vendor/quazip/unzip.h \
	vendor/quazip/zip.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 \
	src/vendor/quazip/JlCompress.cpp \
	src/vendor/quazip/qioapi.cpp \
	src/vendor/quazip/quaadler32.cpp \
	src/vendor/quazip/quacrc32.cpp \
	src/vendor/quazip/quagzipfile.cpp \
	src/vendor/quazip/quaziodevice.cpp \
	src/vendor/quazip/quazipdir.cpp \
	src/vendor/quazip/quazipfile.cpp \
	src/vendor/quazip/quazipfileinfo.cpp \
	src/vendor/quazip/quazipnewinfo.cpp \
	src/vendor/quazip/quazip.cpp \
	src/vendor/quazip/unzip.c \
	src/vendor/quazip/zip.c

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 -lz
}

gcc: QMAKE_CXXFLAGS += -Werror


Use forward, not back slashes in file paths.

Reviewed-by: Dmytro Poplavskiy

INCLUDEPATH += $$PWD

DEFINES += QMEDIA_DIRECTSHOW_PLAYER

HEADERS += \
        $$PWD/directshowaudioendpointcontrol.h \
        $$PWD/directshoweventloop.h \
        $$PWD/directshowglobal.h \
        $$PWD/directshowioreader.h \
        $$PWD/directshowiosource.h \
        $$PWD/directshowmediatype.h \
        $$PWD/directshowmediatypelist.h \
        $$PWD/directshowmetadatacontrol.h \
        $$PWD/directshowpinenum.h \
        $$PWD/directshowplayercontrol.h \
        $$PWD/directshowplayerservice.h \
        $$PWD/directshowsamplescheduler.h \
        $$PWD/directshowvideorenderercontrol.h \
        $$PWD/mediasamplevideobuffer.h \
        $$PWD/videosurfacefilter.h \
        $$PWD/vmr9videowindowcontrol.h

SOURCES += \
        $$PWD/directshowaudioendpointcontrol.cpp \
        $$PWD/directshoweventloop.cpp \
        $$PWD/directshowioreader.cpp \
        $$PWD/directshowiosource.cpp \
        $$PWD/directshowmediatype.cpp \
        $$PWD/directshowmediatypelist.cpp \
        $$PWD/directshowmetadatacontrol.cpp \
        $$PWD/directshowpinenum.cpp \
        $$PWD/directshowplayercontrol.cpp \
        $$PWD/directshowplayerservice.cpp \
        $$PWD/directshowsamplescheduler.cpp \
        $$PWD/directshowvideorenderercontrol.cpp \
        $$PWD/mediasamplevideobuffer.cpp \
        $$PWD/videosurfacefilter.cpp \
        $$PWD/vmr9videowindowcontrol.cpp

LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32

INCLUDEPATH += $$PWD

DEFINES += QMEDIA_DIRECTSHOW_PLAYER

HEADERS += \
        $$PWD\directshowaudioendpointcontrol.h \
        $$PWD\directshoweventloop.h \
        $$PWD\directshowglobal.h \
        $$PWD\directshowioreader.h \
        $$PWD\directshowiosource.h \
        $$PWD\directshowmediatype.h \
        $$PWD\directshowmediatypelist.h \
        $$PWD\directshowmetadatacontrol.h \
        $$PWD\directshowpinenum.h \
        $$PWD\directshowplayercontrol.h \
        $$PWD\directshowplayerservice.h \
        $$PWD\directshowsamplescheduler.h \
        $$PWD\directshowvideorenderercontrol.h \
        $$PWD\mediasamplevideobuffer.h \
        $$PWD\videosurfacefilter.h \
        $$PWD\vmr9videowindowcontrol.h

SOURCES += \
        $$PWD\directshowaudioendpointcontrol.cpp \
        $$PWD\directshoweventloop.cpp \
        $$PWD\directshowioreader.cpp \
        $$PWD\directshowiosource.cpp \
        $$PWD\directshowmediatype.cpp \
        $$PWD\directshowmediatypelist.cpp \
        $$PWD\directshowmetadatacontrol.cpp \
        $$PWD\directshowpinenum.cpp \
        $$PWD\directshowplayercontrol.cpp \
        $$PWD\directshowplayerservice.cpp \
        $$PWD\directshowsamplescheduler.cpp \
        $$PWD\directshowvideorenderercontrol.cpp \
        $$PWD\mediasamplevideobuffer.cpp \
        $$PWD\videosurfacefilter.cpp \
        $$PWD\vmr9videowindowcontrol.cpp

LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32


Fixed OPENSSL_PATH: As it should be processed during build time, ${...} syntax is used instead of $${...}

# 1. Before using autotools & make, make sure to set the macOS target platform in the shell:
# export MACOSX_DEPLOYMENT_TARGET=10.10

# 2. Install all libraries with homebrew:
# brew install autoconf automake libtool pkg-config openssl@1.1 libevent boost gcc wget

# (2a optional) Fix for xCode to stop complaining about not finding the string.h file
# https://stackoverflow.com/questions/48839127/qmake-derived-clang-in-osx-10-13-cannot-find-string-h
# INCLUDEPATH += /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include

ICON = $$PWD/qt/res/assets/icons/spectre.icns

    # to build tor with autotools, call in subfolder tor:
    # ./autogen.sh && ./configure --with-ssl-dir=/usr/local/Cellar/openssl@1.1/1.1.1 --disable-asciidoc --disable-lzma
#    LIBS += -L$$PWD/../tor/src/or -ltor \
#    -L$$PWD/../tor/src/common -lor \
#    -L$$PWD/../tor/src/common -lor-ctime \
#    -L$$PWD/../tor/src/common -lor-crypto \
#    -L$$PWD/../tor/src/common -lor-event \
#    -L$$PWD/../tor/src/trunnel -lor-trunnel \
#    -L$$PWD/../tor/src/common -lcurve25519_donna \
#    -L$$PWD/../tor/src/ext/ed25519/donna -led25519_donna \
#    -L$$PWD/../tor/src/ext/ed25519/ref10 -led25519_ref10 \
#    -L$$PWD/../tor/src/ext/keccak-tiny -lkeccak-tiny \

#    INCLUDEPATH += $$PWD/../tor/src/or $$PWD/../tor/src/common $$PWD/../tor/src/trunnel $$PWD/../tor/src/ext/ed25519/donna $$PWD/../tor/src/ext/ed25519/ref10 $$PWD/../tor/src/ext/keccak-tiny
#    DEPENDPATH += $$PWD/../tor/src/or $$PWD/../tor/src/common $$PWD/../tor/src/trunnel $$PWD/../tor/src/ext/ed25519/donna $$PWD/../tor/src/ext/ed25519/ref10 $$PWD/../tor/src/ext/keccak-tiny

#    PRE_TARGETDEPS += $$PWD/../tor/src/or/libtor.a \
#    $$PWD/../tor/src/common/libor.a \
#    $$PWD/../tor/src/common/libor-ctime.a \
#    $$PWD/../tor/src/common/libor-crypto.a \
#    $$PWD/../tor/src/common/libor-event.a \
#    $$PWD/../tor/src/trunnel/libor-trunnel.a \
#    $$PWD/../tor/src/common/libcurve25519_donna.a \
#    $$PWD/../tor/src/ext/ed25519/donna/libed25519_donna.a \
#    $$PWD/../tor/src/ext/ed25519/ref10/libed25519_ref10.a \
#    $$PWD/../tor/src/ext/keccak-tiny/libkeccak-tiny.a \

    # brew install zlib
    _ZLIB_PATH = /usr/local/opt/zlib
    INCLUDEPATH += "$${_ZLIB_PATH}/include/"
    LIBS += -L$${_ZLIB_PATH}/lib
    #Shblis-MacBook-Pro:src Shbli$ find /usr/local/Cellar/libevent/2.1.8/lib/ -name *a
    LIBS += -lz

    # to build BerkeleyDB with autotools, call in subfolder db4.8:
    # ./configure --enable-cxx --disable-shared --disable-replication --with-pic && make
    _BERKELEY_PATH = $$PWD/../db4.8/build_unix
    LIBS += $${_BERKELEY_PATH}/libdb_cxx.a \ # link static
    $${_BERKELEY_PATH}/libdb.a

    DEPENDPATH += $${_BERKELEY_PATH}
    INCLUDEPATH += $${_BERKELEY_PATH}

    # to build leveldb call in subfolder leveldb:
    # ./build_detect_platform build_config.mk ./ && make
    LIBS += -L$$PWD/../leveldb/out-static -lleveldb \
    -L$$PWD/../leveldb/out-static -lmemenv

    INCLUDEPATH += $$PWD/../leveldb/out-static
    DEPENDPATH += $$PWD/../leveldb/out-static
    INCLUDEPATH += $$PWD/../leveldb/include
    DEPENDPATH += $$PWD/../leveldb/include
    INCLUDEPATH += $$PWD/../leveldb/helpers
    DEPENDPATH += $$PWD/../leveldb/helpers

    PRE_TARGETDEPS += $$PWD/../leveldb/out-static/libleveldb.a \
    $$PWD/../leveldb/out-static/libmemenv.a

HEADERS +=              $$PWD/qt/macdockiconhandler.h \
                        $$PWD/qt/macnotificationhandler.h \

OBJECTIVE_SOURCES +=    $$PWD/qt/macdockiconhandler.mm \
                        $$PWD/qt/macnotificationhandler.mm \

DEFINES += FORTIFY_SOURCE=1

QMAKE_LFLAGS += -fstack-protector
QMAKE_CXXFLAGS += -pthread -fPIC -fstack-protector -O2 -D_FORTIFY_SOURCE=1 -Wall -Wextra -Wno-ignored-qualifiers -Woverloaded-virtual -Wformat -Wformat-security -Wno-unused-parameter

DEFINES += MAC_OSX
DEFINES += HAVE_BUILD_INFO
# Mac: compile for maximum compatibility (10.0 Yosemite, 32-bit)
QMAKE_CXXFLAGS += -std=c++14 -mmacosx-version-min=10.10 -isysroot

    # https://www.reddit.com/r/cpp/comments/334s4r/how_to_enable_c14_in_qt_creator_on_a_mac/
    # Turns out, there's a glitch in the Mac version where the standard library isn't correctly included when using the C++14 config flag. Adding this additional line to the .pro file fixes the problem:
    QMAKE_CXXFLAGS += -stdlib=libc++

    #add in core foundation framework
    QMAKE_LFLAGS += -F /System/Library/Frameworks/CoreFoundation.framework/
    LIBS += -framework CoreFoundation

    QMAKE_LFLAGS += -F /System/Library/Frameworks/AppKit.framework/
    LIBS += -framework AppKit

    QMAKE_LFLAGS += -F /System/Library/Frameworks/ApplicationServices.framework/
    LIBS += -framework ApplicationServices

    #brew install boost
    _BOOST_PATH = /usr/local/Cellar/boost/1.67.0_1
    INCLUDEPATH += "$${_BOOST_PATH}/include/"
    LIBS += -L$${_BOOST_PATH}/lib
    LIBS += -lboost_system-mt -lboost_chrono-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt -lboost_unit_test_framework-mt -lboost_timer-mt # using dynamic lib (not sure if you need that "-mt" at the end or not)
    DEFINES += BOOST_ASIO_ENABLE_OLD_SERVICES BOOST_SPIRIT_THREADSAFE BOOST_THREAD_USE_LIB BOOST_THREAD_POSIX BOOST_HAS_THREADS
    #LIBS += $${_BOOST_PATH}/lib/libboost_chrono-mt.a # using static lib

    #brew install openssl@1.1
    # $OPENSSL_PATH is set via environment
#    _OPENSSL_PATH = /usr/local/Cellar/openssl@1.1/1.1.1
#    OPENSSL_PATH = /usr/local/Cellar/openssl@1.1/1.1.0h
    # See http://doc.qt.io/archives/qt-4.8/qmake-advanced-usage.html#variables
    INCLUDEPATH += "${OPENSSL_PATH}/include/"
    LIBS += -L${OPENSSL_PATH}/lib
    LIBS += -lssl -lcrypto # using dynamic lib (not sure if you need that "-mt" at the end or not)

    #libevent-2.1.6.dylib
    #brew install libevent
    _LIBEVENT_PATH = /usr/local/Cellar/libevent/2.1.8
    INCLUDEPATH += "$${_LIBEVENT_PATH}/include/"
    LIBS += -L$${_LIBEVENT_PATH}/lib
    #Shblis-MacBook-Pro:src Shbli$ find /usr/local/Cellar/libevent/2.1.8/lib/ -name *a
    LIBS += -levent_extra -levent -levent_core -levent_openssl -levent_pthreads

# 1. Before using autotools & make, make sure to set the macOS target platform in the shell:
# export MACOSX_DEPLOYMENT_TARGET=10.10

# 2. Install all libraries with homebrew:
# brew install autoconf automake libtool pkg-config openssl@1.1 libevent boost gcc wget

# (2a optional) Fix for xCode to stop complaining about not finding the string.h file
# https://stackoverflow.com/questions/48839127/qmake-derived-clang-in-osx-10-13-cannot-find-string-h
# INCLUDEPATH += /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include

ICON = $$PWD/qt/res/assets/icons/spectre.icns

    # to build tor with autotools, call in subfolder tor:
    # ./autogen.sh && ./configure --with-ssl-dir=/usr/local/Cellar/openssl@1.1/1.1.1 --disable-asciidoc --disable-lzma
#    LIBS += -L$$PWD/../tor/src/or -ltor \
#    -L$$PWD/../tor/src/common -lor \
#    -L$$PWD/../tor/src/common -lor-ctime \
#    -L$$PWD/../tor/src/common -lor-crypto \
#    -L$$PWD/../tor/src/common -lor-event \
#    -L$$PWD/../tor/src/trunnel -lor-trunnel \
#    -L$$PWD/../tor/src/common -lcurve25519_donna \
#    -L$$PWD/../tor/src/ext/ed25519/donna -led25519_donna \
#    -L$$PWD/../tor/src/ext/ed25519/ref10 -led25519_ref10 \
#    -L$$PWD/../tor/src/ext/keccak-tiny -lkeccak-tiny \

#    INCLUDEPATH += $$PWD/../tor/src/or $$PWD/../tor/src/common $$PWD/../tor/src/trunnel $$PWD/../tor/src/ext/ed25519/donna $$PWD/../tor/src/ext/ed25519/ref10 $$PWD/../tor/src/ext/keccak-tiny
#    DEPENDPATH += $$PWD/../tor/src/or $$PWD/../tor/src/common $$PWD/../tor/src/trunnel $$PWD/../tor/src/ext/ed25519/donna $$PWD/../tor/src/ext/ed25519/ref10 $$PWD/../tor/src/ext/keccak-tiny

#    PRE_TARGETDEPS += $$PWD/../tor/src/or/libtor.a \
#    $$PWD/../tor/src/common/libor.a \
#    $$PWD/../tor/src/common/libor-ctime.a \
#    $$PWD/../tor/src/common/libor-crypto.a \
#    $$PWD/../tor/src/common/libor-event.a \
#    $$PWD/../tor/src/trunnel/libor-trunnel.a \
#    $$PWD/../tor/src/common/libcurve25519_donna.a \
#    $$PWD/../tor/src/ext/ed25519/donna/libed25519_donna.a \
#    $$PWD/../tor/src/ext/ed25519/ref10/libed25519_ref10.a \
#    $$PWD/../tor/src/ext/keccak-tiny/libkeccak-tiny.a \

    # brew install zlib
    _ZLIB_PATH = /usr/local/opt/zlib
    INCLUDEPATH += "$${_ZLIB_PATH}/include/"
    LIBS += -L$${_ZLIB_PATH}/lib
    #Shblis-MacBook-Pro:src Shbli$ find /usr/local/Cellar/libevent/2.1.8/lib/ -name *a
    LIBS += -lz

    # to build BerkeleyDB with autotools, call in subfolder db4.8:
    # ./configure --enable-cxx --disable-shared --disable-replication --with-pic && make
    _BERKELEY_PATH = $$PWD/../db4.8/build_unix
    LIBS += $${_BERKELEY_PATH}/libdb_cxx.a \ # link static
    $${_BERKELEY_PATH}/libdb.a

    DEPENDPATH += $${_BERKELEY_PATH}
    INCLUDEPATH += $${_BERKELEY_PATH}

    # to build leveldb call in subfolder leveldb:
    # ./build_detect_platform build_config.mk ./ && make
    LIBS += -L$$PWD/../leveldb/out-static -lleveldb \
    -L$$PWD/../leveldb/out-static -lmemenv

    INCLUDEPATH += $$PWD/../leveldb/out-static
    DEPENDPATH += $$PWD/../leveldb/out-static
    INCLUDEPATH += $$PWD/../leveldb/include
    DEPENDPATH += $$PWD/../leveldb/include
    INCLUDEPATH += $$PWD/../leveldb/helpers
    DEPENDPATH += $$PWD/../leveldb/helpers

    PRE_TARGETDEPS += $$PWD/../leveldb/out-static/libleveldb.a \
    $$PWD/../leveldb/out-static/libmemenv.a

HEADERS +=              $$PWD/qt/macdockiconhandler.h \
                        $$PWD/qt/macnotificationhandler.h \

OBJECTIVE_SOURCES +=    $$PWD/qt/macdockiconhandler.mm \
                        $$PWD/qt/macnotificationhandler.mm \

DEFINES += FORTIFY_SOURCE=1

QMAKE_LFLAGS += -fstack-protector
QMAKE_CXXFLAGS += -pthread -fPIC -fstack-protector -O2 -D_FORTIFY_SOURCE=1 -Wall -Wextra -Wno-ignored-qualifiers -Woverloaded-virtual -Wformat -Wformat-security -Wno-unused-parameter

DEFINES += MAC_OSX
DEFINES += HAVE_BUILD_INFO
# Mac: compile for maximum compatibility (10.0 Yosemite, 32-bit)
QMAKE_CXXFLAGS += -std=c++14 -mmacosx-version-min=10.10 -isysroot

    # https://www.reddit.com/r/cpp/comments/334s4r/how_to_enable_c14_in_qt_creator_on_a_mac/
    # Turns out, there's a glitch in the Mac version where the standard library isn't correctly included when using the C++14 config flag. Adding this additional line to the .pro file fixes the problem:
    QMAKE_CXXFLAGS += -stdlib=libc++

    #add in core foundation framework
    QMAKE_LFLAGS += -F /System/Library/Frameworks/CoreFoundation.framework/
    LIBS += -framework CoreFoundation

    QMAKE_LFLAGS += -F /System/Library/Frameworks/AppKit.framework/
    LIBS += -framework AppKit

    QMAKE_LFLAGS += -F /System/Library/Frameworks/ApplicationServices.framework/
    LIBS += -framework ApplicationServices

    #brew install boost
    _BOOST_PATH = /usr/local/Cellar/boost/1.67.0_1
    INCLUDEPATH += "$${_BOOST_PATH}/include/"
    LIBS += -L$${_BOOST_PATH}/lib
    LIBS += -lboost_system-mt -lboost_chrono-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt -lboost_unit_test_framework-mt -lboost_timer-mt # using dynamic lib (not sure if you need that "-mt" at the end or not)
    DEFINES += BOOST_ASIO_ENABLE_OLD_SERVICES BOOST_SPIRIT_THREADSAFE BOOST_THREAD_USE_LIB BOOST_THREAD_POSIX BOOST_HAS_THREADS
    #LIBS += $${_BOOST_PATH}/lib/libboost_chrono-mt.a # using static lib

    #brew install openssl@1.1
    # $OPENSSL_PATH is set via environment
#    _OPENSSL_PATH = /usr/local/Cellar/openssl@1.1/1.1.1
    OPENSSL_PATH = /usr/local/Cellar/openssl@1.1/1.1.0h
    INCLUDEPATH += "$${OPENSSL_PATH}/include/"
    LIBS += -L$${OPENSSL_PATH}/lib
    LIBS += -lssl -lcrypto # using dynamic lib (not sure if you need that "-mt" at the end or not)

    #libevent-2.1.6.dylib
    #brew install libevent
    _LIBEVENT_PATH = /usr/local/Cellar/libevent/2.1.8
    INCLUDEPATH += "$${_LIBEVENT_PATH}/include/"
    LIBS += -L$${_LIBEVENT_PATH}/lib
    #Shblis-MacBook-Pro:src Shbli$ find /usr/local/Cellar/libevent/2.1.8/lib/ -name *a
    LIBS += -levent_extra -levent -levent_core -levent_openssl -levent_pthreads


Revert "Add module webengine"

Revert "Add module webengine"

This reverts commit d7d699b52fcf106bfefbf421f3574eb0dc18a977.

#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

#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