improve GIT_HASH definition for linux

improve GIT_HASH definition for linux

############################################## 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 +=

# 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)
}

unix|macx {
    DEFINES += "GIT_HASH=$$system(git log -1 --format=%h)"
    DEFINES += "GIT_HASH_SHORT=$$system(git log -1 --format=%h)"
    DEFINES += "GIT_HASH_LONG=$$system(git log -1 --format=%H)"
}

win32 {
    DEFINES += "GIT_HASH=$$system(git log -1 --format=%h)"
    DEFINES += "GIT_SHORT_HASH=$$system(git log -1 --format=%h)"
    DEFINES += "GIT_LONG_HASH=$$system(git log -1 --format=%H)"
}

message(Hello this is a test! - $$DEFINES )

############################################## 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 +=

# 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)
}

unix|macx {
    DEFINES += GIT_HASH="\\\"$(shell git -C \""$$_PRO_FILE_PWD_"\" describe)\\\""
}

win32 {
    DEFINES += "GIT_SHORT_HASH=$$system(git log -1 --format=%h)"
    DEFINES += "GIT_LONG_HASH=$$system(git log -1 --format=%H)"
#     DEFINES += "GIT_HASH="
}

message(Hello this is a test! - $$DEFINES )


Fix AudioStreamingLib.pri

Fix AudioStreamingLib.pri

include (AudioStreamingLibSettings.pri)

QT += core network multimedia
CONFIG += c++11

if (contains(OPUS_ENABLED, TRUE)) CONFIG += WITH_OPUS

if (contains(OPENSSL_ENABLED, TRUE)) CONFIG += WITH_OPENSSL

if (contains(DEBUG_LEVEL, 1)) DEFINES += IS_TO_DEBUG_VERBOSE_1
if (contains(DEBUG_LEVEL, 2)) DEFINES += IS_TO_DEBUG_VERBOSE_2

WITH_OPUS:DEFINES += OPUS
WITH_OPENSSL:DEFINES += OPENSSL

#Include opus headers
WITH_OPUS {
win32:INCLUDEPATH += $$WIN_OPUS_INCLUDE
android:INCLUDEPATH += $$ANDROID_OPUS_INCLUDE
unix:!macx:!android:INCLUDEPATH += $$LINUX_OPUS_INCLUDE
macx:INCLUDEPATH += $$MACOS_OPUS_INCLUDE
}

INCLUDEPATH += $$PWD/AudioStreamingLib

contains(QT_ARCH, i386):win32-g++ { #MINGW 32 bits
message("Using settings for Windows MinGW 32 bits")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x86/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x86/Release/" -lAudioStreamingLibCore

WITH_OPUS:LIBS += $$MINGW_32BITS_OPUS_LIB

WITH_OPENSSL {
LIBS += $$MINGW_32BITS_OPENSSL_SSL_LIB
LIBS += $$MINGW_32BITS_OPENSSL_CRYPTO_LIB
LIBS += -lGdi32
}
} #MINGW 32 bits

contains(QT_ARCH, x86_64):win32-g++ { #MINGW 64 bits
message("Using settings for Windows MinGW 64 bits")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Release/" -lAudioStreamingLibCore

WITH_OPUS:LIBS += $$MINGW_64BITS_OPUS_LIB

WITH_OPENSSL {
LIBS += $$MINGW_64BITS_OPENSSL_SSL_LIB
LIBS += $$MINGW_64BITS_OPENSSL_CRYPTO_LIB
LIBS += -lGdi32
}
} #MINGW 64 bits

contains(QT_ARCH, i386):win32-msvc* { #VISUAL STUDIO 32 bits
message("Using settings for Windows Visual Studio 32 bits")

CONFIG += KNOWNDEVICE

QMAKE_CXXFLAGS += /wd4482 #Supress typedef enum error
QMAKE_CFLAGS += /wd4482 #Supress typedef enum error
QMAKE_CXXFLAGS += /wd4267 #Supress loss of data error
QMAKE_CFLAGS += /wd4267 #Supress loss of data error
QMAKE_CXXFLAGS += /wd4244 #Supress loss of data error
QMAKE_CFLAGS += /wd4244 #Supress loss of data error

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB {
LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x86/Debug/" -lAudioStreamingLibCore

WITH_OPUS {
LIBS += $$MSVC_32BITS_DEBUG_OPUS_LIB
LIBS += $$MSVC_32BITS_DEBUG_CELT_LIB
LIBS += $$MSVC_32BITS_DEBUG_SILK_COMMON_LIB
LIBS += $$MSVC_32BITS_DEBUG_SILK_FLOAT_LIB
}
}

CONFIG(release, debug|release):!AUDIOSTREAMINGLIB {
LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x86/Release/" -lAudioStreamingLibCore

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

WITH_OPUS {
LIBS += $$MSVC_32BITS_RELEASE_OPUS_LIB
LIBS += $$MSVC_32BITS_RELEASE_CELT_LIB
LIBS += $$MSVC_32BITS_RELEASE_SILK_COMMON_LIB
LIBS += $$MSVC_32BITS_RELEASE_SILK_FLOAT_LIB
}
}

WITH_OPENSSL {
LIBS += $$MSVC_32BITS_OPENSSL_SSL_LIB
LIBS += $$MSVC_32BITS_OPENSSL_CRYPTO_LIB
LIBS += -lGdi32
}
} #VISUAL STUDIO 32 bits

contains(QT_ARCH, x86_64):win32-msvc* { #VISUAL STUDIO 64 bits
message("Using settings for Windows Visual Studio 64 bits")

CONFIG += KNOWNDEVICE

QMAKE_CXXFLAGS += /wd4482 #Supress typedef enum error
QMAKE_CFLAGS += /wd4482 #Supress typedef enum error
QMAKE_CXXFLAGS += /wd4267 #Supress loss of data error
QMAKE_CFLAGS += /wd4267 #Supress loss of data error
QMAKE_CXXFLAGS += /wd4244 #Supress loss of data error
QMAKE_CFLAGS += /wd4244 #Supress loss of data error

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB {
LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Debug/" -lAudioStreamingLibCore

WITH_OPUS {
LIBS += $$MSVC_64BITS_DEBUG_OPUS_LIB
LIBS += $$MSVC_64BITS_DEBUG_CELT_LIB
LIBS += $$MSVC_64BITS_DEBUG_SILK_COMMON_LIB
LIBS += $$MSVC_64BITS_DEBUG_SILK_FLOAT_LIB
}
}

CONFIG(release, debug|release):!AUDIOSTREAMINGLIB {
LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Release/" -lAudioStreamingLibCore

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

WITH_OPUS {
LIBS += $$MSVC_64BITS_RELEASE_OPUS_LIB
LIBS += $$MSVC_64BITS_RELEASE_CELT_LIB
LIBS += $$MSVC_64BITS_RELEASE_SILK_COMMON_LIB
LIBS += $$MSVC_64BITS_RELEASE_SILK_FLOAT_LIB
}
}

WITH_OPENSSL {
LIBS += $$MSVC_64BITS_OPENSSL_SSL_LIB
LIBS += $$MSVC_64BITS_OPENSSL_CRYPTO_LIB
LIBS += -lGdi32
}
} #VISUAL STUDIO 64 bits

contains(QT_ARCH, i386):unix:!macx:!android { #LINUX 32 bits
message("Using settings for Linux 32 bits")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x86/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x86/Release/" -lAudioStreamingLibCore

WITH_OPUS:LIBS += $$LINUX_32BITS_OPUS_LIB
WITH_OPENSSL {
LIBS += $$LLINUX_32BITS_OPENSSL_SSL_LIB
LIBS += $$LINUX_32BITS_OPENSSL_CRYPTO_LIB
LIBS += -ldl
}
} #LINUX 32 bits

contains(QT_ARCH, x86_64):unix:!macx:!android { #LINUX 64 bits
message("Using settings for Linux 64 bits")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Release/" -lAudioStreamingLibCore

WITH_OPUS:LIBS += $$LINUX_64BITS_OPUS_LIB
WITH_OPENSSL {
LIBS += $$LINUX_64BITS_OPENSSL_SSL_LIB
LIBS += $$LINUX_64BITS_OPENSSL_CRYPTO_LIB
LIBS += -ldl
}
} #LINUX 64 bits

contains(QT_ARCH, x86_64):macx { #MACOS
message("Using settings for macOS 64 bits")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Release/" -lAudioStreamingLibCore

WITH_OPUS:LIBS += $$MACOS_OPUS_LIB

WITH_OPENSSL {
LIBS += $$MACOS_OPENSSL_SSL_LIB
LIBS += $$MACOS_OPENSSL_CRYPTO_LIB
}
} #MACOS

contains(ANDROID_TARGET_ARCH, armeabi):android { #ANDROID ARM
message("Using settings for Android ARM")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/android-lib/armeabi/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/android-lib/armeabi/Release/" -lAudioStreamingLibCore

deployment.path = /libs/armeabi

WITH_OPUS {
deployment.files += $$ANDROID_ARM_OPUS_LIB
LIBS += $$ANDROID_ARM_OPUS_LIB
}
WITH_OPENSSL {
deployment.files += $$ANDROID_ARM_OPENSSL_SSL_LIB
deployment.files += $$ANDROID_ARM_OPENSSL_CRYPTO_LIB
LIBS += $$ANDROID_ARM_OPENSSL_SSL_LIB
LIBS += $$ANDROID_ARM_OPENSSL_CRYPTO_LIB
}
INSTALLS += deployment
} #ANDROID ARM

contains(ANDROID_TARGET_ARCH, armeabi-v7a):android { #ANDROID ARMV7A
message("Using settings for Android ARMV7A")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/android-lib/armeabi-v7a/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/android-lib/armeabi-v7a/Release/" -lAudioStreamingLibCore

deployment.path = /libs/armeabi-v7a

WITH_OPUS {
deployment.files += $$ANDROID_ARMV7A_OPUS_LIB
LIBS += $$ANDROID_ARMV7A_OPUS_LIB
}
WITH_OPENSSL {
deployment.files += $$ANDROID_ARMV7A_OPENSSL_SSL_LIB
deployment.files += $$ANDROID_ARMV7A_OPENSSL_CRYPTO_LIB
LIBS += $$ANDROID_ARMV7A_OPENSSL_SSL_LIB
LIBS += $$ANDROID_ARMV7A_OPENSSL_CRYPTO_LIB
}
INSTALLS += deployment
} #ANDROID ARMV7A

contains(ANDROID_TARGET_ARCH, x86):android { #ANDROID x86
message("Using settings for Android x86")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/android-lib/x86/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/android-lib/x86/Release/" -lAudioStreamingLibCore

deployment.path = /libs/x86

WITH_OPUS {
deployment.files += $$ANDROID_X86_OPUS_LIB
LIBS += $$ANDROID_X86_OPUS_LIB
}
WITH_OPENSSL {
deployment.files += $$ANDROID_X86_OPENSSL_SSL_LIB
deployment.files += $$ANDROID_X86_OPENSSL_CRYPTO_LIB
LIBS += $$ANDROID_X86_OPENSSL_SSL_LIB
LIBS += $$ANDROID_X86_OPENSSL_CRYPTO_LIB
}
} #ANDROID x86

!KNOWNDEVICE { #Unknown device
message("Using settings for Unknown Device. OpenSsl and Opus codec not supported!")

WITH_OPUS:DEFINES -= OPUS
WITH_OPENSSL:DEFINES -= OPENSSL

CONFIG -= WITH_OPUS
CONFIG -= WITH_OPENSSL

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/unknown_device/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/unknown_device/Release/" -lAudioStreamingLibCore
} #Unknown device

include (AudioStreamingLibSettings.pri)

QT += core network multimedia
CONFIG += c++11

if (contains(OPUS_ENABLED, TRUE)) CONFIG += WITH_OPUS

if (contains(OPENSSL_ENABLED, TRUE)) CONFIG += WITH_OPENSSL

if (contains(DEBUG_LEVEL, 1)) DEFINES += IS_TO_DEBUG_VERBOSE_1
if (contains(DEBUG_LEVEL, 2)) DEFINES += IS_TO_DEBUG_VERBOSE_2

WITH_OPUS:DEFINES += OPUS
WITH_OPENSSL:DEFINES += OPENSSL

#Include opus headers
WITH_OPUS {
win32:INCLUDEPATH += $$WIN_OPUS_INCLUDE
android:INCLUDEPATH += $$ANDROID_OPUS_INCLUDE
unix:!macx:!android:INCLUDEPATH += $$LINUX_OPUS_INCLUDE
macx:INCLUDEPATH += $$MACOS_OPUS_INCLUDE
}

INCLUDEPATH += $$PWD/AudioStreamingLib

<<<<<<< HEAD

=======
>>>>>>> 989812a15fd868013e2d54ad8ee6e4449f378b62
contains(QT_ARCH, i386):win32-g++ { #MINGW 32 bits
message("Using settings for Windows MinGW 32 bits")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x86/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x86/Release/" -lAudioStreamingLibCore

WITH_OPUS:LIBS += $$MINGW_32BITS_OPUS_LIB

WITH_OPENSSL {
LIBS += $$MINGW_32BITS_OPENSSL_SSL_LIB
LIBS += $$MINGW_32BITS_OPENSSL_CRYPTO_LIB
LIBS += -lGdi32
}
} #MINGW 32 bits

contains(QT_ARCH, x86_64):win32-g++ { #MINGW 64 bits
message("Using settings for Windows MinGW 64 bits")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Release/" -lAudioStreamingLibCore

WITH_OPUS:LIBS += $$MINGW_64BITS_OPUS_LIB

WITH_OPENSSL {
LIBS += $$MINGW_64BITS_OPENSSL_SSL_LIB
LIBS += $$MINGW_64BITS_OPENSSL_CRYPTO_LIB
LIBS += -lGdi32
}
<<<<<<< HEAD
} #MINGW 64 bits
=======
} #MINGW 32 bits

contains(QT_ARCH, x86_64):win32-g++ { #MINGW 64 bits
message("Using settings for Windows MinGW 64 bits")

CONFIG += KNOWNDEVICE
>>>>>>> 989812a15fd868013e2d54ad8ee6e4449f378b62

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Release/" -lAudioStreamingLibCore

WITH_OPUS:LIBS += $$MINGW_OPUS_LIB

WITH_OPENSSL {
LIBS += $$MINGW_OPENSSL_SSL_LIB
LIBS += $$MINGW_OPENSSL_CRYPTO_LIB
LIBS += -lGdi32
}
} #MINGW 64 bits

contains(QT_ARCH, i386):win32-msvc* { #VISUAL STUDIO 32 bits
message("Using settings for Windows Visual Studio 32 bits")

CONFIG += KNOWNDEVICE

QMAKE_CXXFLAGS += /wd4482 #Supress typedef enum error
QMAKE_CFLAGS += /wd4482 #Supress typedef enum error
QMAKE_CXXFLAGS += /wd4267 #Supress loss of data error
QMAKE_CFLAGS += /wd4267 #Supress loss of data error
QMAKE_CXXFLAGS += /wd4244 #Supress loss of data error
QMAKE_CFLAGS += /wd4244 #Supress loss of data error

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB {
LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x86/Debug/" -lAudioStreamingLibCore

WITH_OPUS {
LIBS += $$MSVC_32BITS_DEBUG_OPUS_LIB
LIBS += $$MSVC_32BITS_DEBUG_CELT_LIB
LIBS += $$MSVC_32BITS_DEBUG_SILK_COMMON_LIB
LIBS += $$MSVC_32BITS_DEBUG_SILK_FLOAT_LIB
}
}

CONFIG(release, debug|release):!AUDIOSTREAMINGLIB {
LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x86/Release/" -lAudioStreamingLibCore

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

WITH_OPUS {
LIBS += $$MSVC_32BITS_RELEASE_OPUS_LIB
LIBS += $$MSVC_32BITS_RELEASE_CELT_LIB
LIBS += $$MSVC_32BITS_RELEASE_SILK_COMMON_LIB
LIBS += $$MSVC_32BITS_RELEASE_SILK_FLOAT_LIB
}
}

WITH_OPENSSL {
LIBS += $$MSVC_32BITS_OPENSSL_SSL_LIB
LIBS += $$MSVC_32BITS_OPENSSL_CRYPTO_LIB
LIBS += -lGdi32
}
} #VISUAL STUDIO 32 bits

contains(QT_ARCH, x86_64):win32-msvc* { #VISUAL STUDIO 64 bits
message("Using settings for Windows Visual Studio 64 bits")

CONFIG += KNOWNDEVICE

QMAKE_CXXFLAGS += /wd4482 #Supress typedef enum error
QMAKE_CFLAGS += /wd4482 #Supress typedef enum error
QMAKE_CXXFLAGS += /wd4267 #Supress loss of data error
QMAKE_CFLAGS += /wd4267 #Supress loss of data error
QMAKE_CXXFLAGS += /wd4244 #Supress loss of data error
QMAKE_CFLAGS += /wd4244 #Supress loss of data error

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB {
LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Debug/" -lAudioStreamingLibCore

WITH_OPUS {
LIBS += $$MSVC_64BITS_DEBUG_OPUS_LIB
LIBS += $$MSVC_64BITS_DEBUG_CELT_LIB
LIBS += $$MSVC_64BITS_DEBUG_SILK_COMMON_LIB
LIBS += $$MSVC_64BITS_DEBUG_SILK_FLOAT_LIB
}
}

CONFIG(release, debug|release):!AUDIOSTREAMINGLIB {
LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Release/" -lAudioStreamingLibCore

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

WITH_OPUS {
LIBS += $$MSVC_64BITS_RELEASE_OPUS_LIB
LIBS += $$MSVC_64BITS_RELEASE_CELT_LIB
LIBS += $$MSVC_64BITS_RELEASE_SILK_COMMON_LIB
LIBS += $$MSVC_64BITS_RELEASE_SILK_FLOAT_LIB
}
}

WITH_OPENSSL {
LIBS += $$MSVC_64BITS_OPENSSL_SSL_LIB
LIBS += $$MSVC_64BITS_OPENSSL_CRYPTO_LIB
LIBS += -lGdi32
}
} #VISUAL STUDIO 64 bits

contains(QT_ARCH, i386):unix:!macx:!android { #LINUX 32 bits
message("Using settings for Linux 32 bits")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x86/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x86/Release/" -lAudioStreamingLibCore

WITH_OPUS:LIBS += $$LINUX_32BITS_OPUS_LIB
WITH_OPENSSL {
LIBS += $$LLINUX_32BITS_OPENSSL_SSL_LIB
LIBS += $$LINUX_32BITS_OPENSSL_CRYPTO_LIB
LIBS += -ldl
}
} #LINUX 32 bits

contains(QT_ARCH, x86_64):unix:!macx:!android { #LINUX 64 bits
message("Using settings for Linux 64 bits")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Release/" -lAudioStreamingLibCore

WITH_OPUS:LIBS += $$LINUX_64BITS_OPUS_LIB
WITH_OPENSSL {
LIBS += $$LINUX_64BITS_OPENSSL_SSL_LIB
LIBS += $$LINUX_64BITS_OPENSSL_CRYPTO_LIB
LIBS += -ldl
}
} #LINUX 64 bits

contains(QT_ARCH, x86_64):macx { #MACOS
message("Using settings for macOS 64 bits")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/lib/x64/Release/" -lAudioStreamingLibCore

WITH_OPUS:LIBS += $$MACOS_OPUS_LIB

WITH_OPENSSL {
LIBS += $$MACOS_OPENSSL_SSL_LIB
LIBS += $$MACOS_OPENSSL_CRYPTO_LIB
}
} #MACOS

contains(ANDROID_TARGET_ARCH, armeabi):android { #ANDROID ARM
message("Using settings for Android ARM")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/android-lib/armeabi/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/android-lib/armeabi/Release/" -lAudioStreamingLibCore

deployment.path = /libs/armeabi

WITH_OPUS {
deployment.files += $$ANDROID_ARM_OPUS_LIB
LIBS += $$ANDROID_ARM_OPUS_LIB
}
WITH_OPENSSL {
deployment.files += $$ANDROID_ARM_OPENSSL_SSL_LIB
deployment.files += $$ANDROID_ARM_OPENSSL_CRYPTO_LIB
LIBS += $$ANDROID_ARM_OPENSSL_SSL_LIB
LIBS += $$ANDROID_ARM_OPENSSL_CRYPTO_LIB
}
INSTALLS += deployment
} #ANDROID ARM

contains(ANDROID_TARGET_ARCH, armeabi-v7a):android { #ANDROID ARMV7A
message("Using settings for Android ARMV7A")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/android-lib/armeabi-v7a/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/android-lib/armeabi-v7a/Release/" -lAudioStreamingLibCore

deployment.path = /libs/armeabi-v7a

WITH_OPUS {
deployment.files += $$ANDROID_ARMV7A_OPUS_LIB
LIBS += $$ANDROID_ARMV7A_OPUS_LIB
}
WITH_OPENSSL {
deployment.files += $$ANDROID_ARMV7A_OPENSSL_SSL_LIB
deployment.files += $$ANDROID_ARMV7A_OPENSSL_CRYPTO_LIB
LIBS += $$ANDROID_ARMV7A_OPENSSL_SSL_LIB
LIBS += $$ANDROID_ARMV7A_OPENSSL_CRYPTO_LIB
}
INSTALLS += deployment
} #ANDROID ARMV7A

contains(ANDROID_TARGET_ARCH, x86):android { #ANDROID x86
message("Using settings for Android x86")

CONFIG += KNOWNDEVICE

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/android-lib/x86/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/android-lib/x86/Release/" -lAudioStreamingLibCore

deployment.path = /libs/x86

WITH_OPUS {
deployment.files += $$ANDROID_X86_OPUS_LIB
LIBS += $$ANDROID_X86_OPUS_LIB
}
WITH_OPENSSL {
deployment.files += $$ANDROID_X86_OPENSSL_SSL_LIB
deployment.files += $$ANDROID_X86_OPENSSL_CRYPTO_LIB
LIBS += $$ANDROID_X86_OPENSSL_SSL_LIB
LIBS += $$ANDROID_X86_OPENSSL_CRYPTO_LIB
}
} #ANDROID x86

!KNOWNDEVICE { #Unknown device
message("Using settings for Unknown Device. OpenSsl and Opus codec not supported!")

WITH_OPUS:DEFINES -= OPUS
WITH_OPENSSL:DEFINES -= OPENSSL

CONFIG -= WITH_OPUS
CONFIG -= WITH_OPENSSL

!AUDIOSTREAMINGLIB:INCLUDEPATH += $$PWD/AudioStreamingLibCore/include

CONFIG(debug, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/unknown_device/Debug/" -lAudioStreamingLibCore
CONFIG(release, debug|release):!AUDIOSTREAMINGLIB:LIBS += -L"$$PWD/AudioStreamingLibCore/unknown_device/Release/" -lAudioStreamingLibCore
} #Unknown device


protect for dcpconfig.pri not include more times

!dcpconfig {
    CONFIG += dcpconfig
# some hack for some problems experienced before
{
	QMAKE_CXXFLAGS_RELEASE += -g
	QMAKE_RPATH = -Wl
}

# Directories
{
	DCP_PREFIX = /usr
	DCP_INSTALL_LIB = $$DCP_PREFIX/lib
	DCP_INSTALL_HEADERS = $$DCP_PREFIX/include/duicontrolpanel
	DCP_THEME_DIR = $$DCP_PREFIX/share/themes/base/dui/duicontrolpanel
	DCP_CSS_DIR = $$DCP_THEME_DIR/style/
	DCP_DESKTOP_DIR = $$DCP_PREFIX/lib/duicontrolpanel
	DCP_APPLET_DIR = $$DCP_PREFIX/lib/duicontrolpanel/applets
	DCP_UIDESC_DIR = $$DCP_PREFIX/lib/duicontrolpanel/uidescriptions
	DCP_TRANSLATIONS_DIR = $$DCP_PREFIX/share/l10n/dui
}

# Gconf keys
{
	DCP_MOSTUSEDCOUNTER_GCONFKEY = /apps/duicontrolpanel/usagecount
}

# defines for directories, they work cross-platform like this
{
	DEFINES += PREFIX=\\\"\"$$DCP_PREFIX\"\\\"
	# THEMEDIR determines the location of the theme
	DEFINES += THEMEDIR=\\\"\"$$DCP_THEME_DIR\"\\\"

	DEFINES += CSSDIR=\\\"\"$$DCP_CSS_DIR\"\\\"

	# APPLET_LIBS determines the location where all applet binaries are
	DEFINES += APPLET_LIBS=\\\"\"$$DCP_APPLET_DIR\"\\\"

	# APPLET_DATA determines where the .desktop files are located
	DEFINES += DESKTOP_DIR=\\\"\"$$DCP_DESKTOP_DIR\"\\\"

	DEFINES += TRANSLATIONS_DIR=\\\"\"$$DCP_TRANSLATIONS_DIR\"\\\"

	DEFINES += MOSTUSEDCOUNTER_GCONFKEY=\\\"\"$$DCP_MOSTUSEDCOUNTER_GCONFKEY\"\\\"
}
}


Harmattan: Adds missing static platform-config entries to harmattan_common.pri

Reviewed-by: Alex

#Harmattan specific options common to both x86 and arm go here
#A not existing option is interpreted as opt-out/no.
#for example: bluez_enabled = yes|no

QMAKE_CFLAGS += -g1 -O2

# Specify the config test that needs to be enabled/disabled
qmf_enabled = yes
networkmanager_enabled = no
corewlan_enabled = no
maemo-icd_enabled = yes
maemo-icd-network-wlan_enabled = yes
maemo5-contacts_enabled = no
maemo5-calendar_enabled = no
maemo6-landmarks_enabled = yes
bluez_enabled = yes
proj_enabled = no
gstreamer-photography_enabled = yes
blkid_enabled = yes
pulseaudio_enabled = yes
udev_enabled = yes
iphb_enabled = yes
nfc_enabled = no
sensord_enabled = yes

#Harmattan specific options common to both x86 and arm go here
#A not existing option is interpreted as opt-out/no.
#for example: bluez_enabled = yes|no

QMAKE_CFLAGS += -g1 -O2

# Specify the config test that needs to be enabled/disabled
qmf_enabled = yes
networkmanager_enabled = no
corewlan_enabled = no
maemo-icd_enabled = yes
maemo-icd-network-wlan_enabled = yes
maemo5-contacts_enabled = no
maemo5-calendar_enabled = no
maemo6-landmarks_enabled = yes
bluez_enabled = yes
gstreamer-photography_enabled = yes
pulseaudio_enabled = yes
sensord_enabled = yes


fix doc install target, attempt 98

fix doc install target, attempt 98

Change-Id: I0d9f63c23120bf49e2c485c0a6e9d219435a6bb2
Reviewed-by: Christian Kandeler <3aa99dcdd3f0cac61fb81c2a11771c0cc2497607@digia.com>

defineReplace(targetPath) {
    return($$replace(1, /, $$QMAKE_DIR_SEP))
}

qt:greaterThan(QT_MAJOR_VERSION, 4) {
    QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc)
    QDOC_MAINFILE = $$PWD/qbs.qdocconf
} else {
    QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc3)
    QDOC_MAINFILE = $$PWD/qbs-qt4.qdocconf

    # cheap replacement of the Qt5 shell_quote function
    defineReplace(shell_quote) {
        return("\"$$1\"")
    }
}

HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator)

VERSION_TAG = $$replace(QBS_VERSION, "[-.]", )

HTML_DOC_PATH=$$OUT_PWD/doc/html
equals(QMAKE_DIR_SEP, /) {   # unix, mingw+msys
    QDOC = SRCDIR=$$PWD OUTDIR=$$HTML_DOC_PATH QBS_VERSION=$$QBS_VERSION QBS_VERSION_TAG=$$VERSION_TAG QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS] $$QDOC_BIN
} else:win32-g++* {   # just mingw
    # The lack of spaces in front of the && is necessary!
    QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$HTML_DOC_PATH&& set QBS_VERSION=$$QBS_VERSION&& set QBS_VERSION_TAG=$$VERSION_TAG&& set QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS]&& $$QDOC_BIN
} else {   # nmake
    QDOC = set SRCDIR=$$PWD $$escape_expand(\\n\\t) \
           set OUTDIR=$$HTML_DOC_PATH $$escape_expand(\\n\\t) \
           set QBS_VERSION=$$QBS_VERSION $$escape_expand(\\n\\t) \
           set QBS_VERSION_TAG=$$VERSION_TAG $$escape_expand(\\n\\t) \
           set QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS] $$escape_expand(\\n\\t) \
           $$QDOC_BIN
}

QHP_FILE = $$HTML_DOC_PATH/qbs.qhp
QCH_FILE = $$OUT_PWD/doc/qbs.qch

HELP_DEP_FILES = $$PWD/qbs.qdoc \
                 $$PWD/config/compat-qt4.qdocconf \
                 $$PWD/config/macros.qdocconf \
                 $$PWD/config/qt-cpp-ignore.qdocconf \
                 $$PWD/config/qt-html-templates.qdocconf \
                 $$PWD/config/qt-html-default-styles.qdocconf \
                 $$QDOC_MAINFILE

html_docs.commands = $$QDOC $$QDOC_MAINFILE
html_docs.depends += $$HELP_DEP_FILES
html_docs.files = $$QHP_FILE

qch_docs.commands = $$HELPGENERATOR -o $$shell_quote($$QCH_FILE) $$QHP_FILE
qch_docs.depends += html_docs
qch_docs.files = $$QCH_FILE

qch_docs.path = $${QBS_INSTALL_PREFIX}/share/doc/qbs
qch_docs.CONFIG += no_check_exist

html_files.depends += html_docs
html_files.files = $$HTML_DOC_PATH
html_files.path = $$qch_docs.path
html_files.CONFIG += no_check_exist no_default_install directory

INSTALLS += qch_docs html_files

docs.depends = qch_docs
QMAKE_EXTRA_TARGETS += html_docs qch_docs docs

fixnavi.commands = \
    cd $$targetPath($$PWD) && \
    perl fixnavi.pl -Dqcmanual -Dqtquick \
        qbs.qdoc
QMAKE_EXTRA_TARGETS += fixnavi

defineReplace(targetPath) {
    return($$replace(1, /, $$QMAKE_DIR_SEP))
}

qt:greaterThan(QT_MAJOR_VERSION, 4) {
    QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc)
    QDOC_MAINFILE = $$PWD/qbs.qdocconf
} else {
    QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc3)
    QDOC_MAINFILE = $$PWD/qbs-qt4.qdocconf

    # cheap replacement of the Qt5 shell_quote function
    defineReplace(shell_quote) {
        return("\"$$1\"")
    }
}

HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator)

VERSION_TAG = $$replace(QBS_VERSION, "[-.]", )

HTML_DOC_PATH=$$OUT_PWD/doc/html
equals(QMAKE_DIR_SEP, /) {   # unix, mingw+msys
    QDOC = SRCDIR=$$PWD OUTDIR=$$HTML_DOC_PATH QBS_VERSION=$$QBS_VERSION QBS_VERSION_TAG=$$VERSION_TAG QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS] $$QDOC_BIN
} else:win32-g++* {   # just mingw
    # The lack of spaces in front of the && is necessary!
    QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$HTML_DOC_PATH&& set QBS_VERSION=$$QBS_VERSION&& set QBS_VERSION_TAG=$$VERSION_TAG&& set QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS]&& $$QDOC_BIN
} else {   # nmake
    QDOC = set SRCDIR=$$PWD $$escape_expand(\\n\\t) \
           set OUTDIR=$$HTML_DOC_PATH $$escape_expand(\\n\\t) \
           set QBS_VERSION=$$QBS_VERSION $$escape_expand(\\n\\t) \
           set QBS_VERSION_TAG=$$VERSION_TAG $$escape_expand(\\n\\t) \
           set QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS] $$escape_expand(\\n\\t) \
           $$QDOC_BIN
}

QHP_FILE = $$HTML_DOC_PATH/qbs.qhp
QCH_FILE = $$OUT_PWD/doc/qbs.qch

HELP_DEP_FILES = $$PWD/qbs.qdoc \
                 $$PWD/config/compat-qt4.qdocconf \
                 $$PWD/config/macros.qdocconf \
                 $$PWD/config/qt-cpp-ignore.qdocconf \
                 $$PWD/config/qt-html-templates.qdocconf \
                 $$PWD/config/qt-html-default-styles.qdocconf \
                 $$QDOC_MAINFILE

html_docs.commands = $$QDOC $$QDOC_MAINFILE
html_docs.depends += $$HELP_DEP_FILES
html_docs.files = $$QHP_FILE

qch_docs.commands = $$HELPGENERATOR -o $$shell_quote($$QCH_FILE) $$QHP_FILE
qch_docs.depends += html_docs
qch_docs.files = $$QCH_FILE

qch_docs.path = $${QBS_INSTALL_PREFIX}/share/doc/qbs
qch_docs.CONFIG += no_check_exist

html_files.files = $$HTML_DOC_PATH
html_files.path = $$qch_docs.path
html_files.CONFIG += no_check_exist

INSTALLS += qch_docs html_files

docs.depends = qch_docs
QMAKE_EXTRA_TARGETS += html_docs qch_docs docs

fixnavi.commands = \
    cd $$targetPath($$PWD) && \
    perl fixnavi.pl -Dqcmanual -Dqtquick \
        qbs.qdoc
QMAKE_EXTRA_TARGETS += fixnavi


build dev docs in doc/html-dev instead of doc/api/html

Change-Id: I42c13004e6a80b27c0f1690c76b35a0d40cee6ad
Reviewed-on: http://codereview.qt.nokia.com/289
Reviewed-by: Oswald Buddenhagen <6a8868beda3e139b5ac22b2534a23d3e6ba81819@nokia.com>

QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc3)
HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator)

VERSION_TAG = $$replace(QTCREATOR_VERSION, "[-.]", )

defineReplace(qdoc) {
    equals(QMAKE_DIR_SEP, /) {   # unix, mingw+msys
        QDOC = SRCDIR=$$PWD OUTDIR=$$1 QTC_VERSION=$$QTCREATOR_VERSION QTC_VERSION_TAG=$$VERSION_TAG $$QDOC_BIN
    } else:win32-g++* {   # just mingw
        # The lack of spaces in front of the && is necessary!
        QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$1&& set QTC_VERSION=$$QTCREATOR_VERSION&& set QTC_VERSION_TAG=$$VERSION_TAG&& $$QDOC_BIN
    } else {   # nmake
        QDOC = set SRCDIR=$$PWD $$escape_expand(\\n\\t) \
               set OUTDIR=$$1 $$escape_expand(\\n\\t) \
               set QTC_VERSION=$$QTCREATOR_VERSION $$escape_expand(\\n\\t) \
               set QTC_VERSION_TAG=$$VERSION_TAG $$escape_expand(\\n\\t) \
               $$QDOC_BIN
    }
    return($$QDOC)
}

QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
QCH_FILE = $$IDE_DOC_PATH/qtcreator.qch

HELP_DEP_FILES = $$PWD/qtcreator.qdoc \
                 $$PWD/addressbook-sdk.qdoc \
                 $$PWD/config/compat.qdocconf \
                 $$PWD/config/macros.qdocconf \
                 $$PWD/config/qt-cpp-ignore.qdocconf \
                 $$PWD/config/qt-defines.qdocconf \
                 $$PWD/config/qt-html-templates.qdocconf \
                 $$PWD/config/qt-html-default-styles.qdocconf \
                 $$PWD/qtcreator.qdocconf

html_docs.commands = $$qdoc($$OUT_PWD/doc/html) $$PWD/qtcreator.qdocconf
html_docs.depends += $$HELP_DEP_FILES
html_docs.files = $$QHP_FILE

html_docs_online.commands = $$qdoc($$OUT_PWD/doc/html) $$PWD/qtcreator-online.qdocconf
html_docs_online.depends += $$HELP_DEP_FILES

qch_docs.commands = $$HELPGENERATOR -o \"$$QCH_FILE\" $$QHP_FILE
qch_docs.depends += html_docs

DEV_QHP_FILE = $$OUT_PWD/doc/html-dev/qtcreator-dev.qhp
DEV_QCH_FILE = $$IDE_DOC_PATH/qtcreator-dev.qch

DEV_HELP_DEP_FILES = \
    $$PWD/api/qtcreator-api.qdoc \
    $$PWD/api/coding-style.qdoc \
    $$PWD/api/external-tool-spec.qdoc \
    $$PWD/api/qtcreator-dev.qdoc \
    $$PWD/api/qtcreator-dev-wizards.qdoc \
    $$PWD/api/qtcreator-dev.qdocconf

dev_html_docs.commands = $$qdoc($$OUT_PWD/doc/html-dev) $$PWD/api/qtcreator-dev.qdocconf
dev_html_docs.depends += $$DEV_HELP_DEP_FILES

dev_html_docs_online.commands = $$qdoc($$OUT_PWD/doc/html-dev) $$PWD/api/qtcreator-dev-online.qdocconf
dev_html_docs_online.depends += $$DEV_HELP_DEP_FILES

dev_qch_docs.commands = $$HELPGENERATOR -o \"$$DEV_QCH_FILE\" $$DEV_QHP_FILE
dev_qch_docs.depends += dev_html_docs

unix:!macx {
    inst_qch_docs.files = $$QCH_FILE
    inst_qch_docs.path = /share/doc/qtcreator
    inst_qch_docs.CONFIG += no_check_exist
    INSTALLS += inst_qch_docs

    inst_dev_qch_docs.files = $$DEV_QCH_FILE
    inst_dev_qch_docs.path = /share/doc/qtcreator
    inst_dev_qch_docs.CONFIG += no_check_exist
    INSTALLS += inst_dev_qch_docs
}

docs_online.depends = html_docs_online dev_html_docs_online
docs.depends = qch_docs dev_qch_docs
QMAKE_EXTRA_TARGETS += html_docs dev_html_docs html_docs_online dev_html_docs_online qch_docs dev_qch_docs docs docs_online

OTHER_FILES = $$HELP_DEP_FILES $$DEV_HELP_DEP_FILES

fixnavi.commands = \
    cd $$targetPath($$PWD) && \
    perl fixnavi.pl -Dqcmanual -Dqtquick \
        qtcreator.qdoc maemodev.qdoc symbiandev.qdoc qtcreator-faq.qdoc
QMAKE_EXTRA_TARGETS += fixnavi

QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc3)
HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator)

VERSION_TAG = $$replace(QTCREATOR_VERSION, "[-.]", )

defineReplace(qdoc) {
    equals(QMAKE_DIR_SEP, /) {   # unix, mingw+msys
        QDOC = SRCDIR=$$PWD OUTDIR=$$1 QTC_VERSION=$$QTCREATOR_VERSION QTC_VERSION_TAG=$$VERSION_TAG $$QDOC_BIN
    } else:win32-g++* {   # just mingw
        # The lack of spaces in front of the && is necessary!
        QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$1&& set QTC_VERSION=$$QTCREATOR_VERSION&& set QTC_VERSION_TAG=$$VERSION_TAG&& $$QDOC_BIN
    } else {   # nmake
        QDOC = set SRCDIR=$$PWD $$escape_expand(\\n\\t) \
               set OUTDIR=$$1 $$escape_expand(\\n\\t) \
               set QTC_VERSION=$$QTCREATOR_VERSION $$escape_expand(\\n\\t) \
               set QTC_VERSION_TAG=$$VERSION_TAG $$escape_expand(\\n\\t) \
               $$QDOC_BIN
    }
    return($$QDOC)
}

QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
QCH_FILE = $$IDE_DOC_PATH/qtcreator.qch

HELP_DEP_FILES = $$PWD/qtcreator.qdoc \
                 $$PWD/addressbook-sdk.qdoc \
                 $$PWD/config/compat.qdocconf \
                 $$PWD/config/macros.qdocconf \
                 $$PWD/config/qt-cpp-ignore.qdocconf \
                 $$PWD/config/qt-defines.qdocconf \
                 $$PWD/config/qt-html-templates.qdocconf \
                 $$PWD/config/qt-html-default-styles.qdocconf \
                 $$PWD/qtcreator.qdocconf

html_docs.commands = $$qdoc($$OUT_PWD/doc/html) $$PWD/qtcreator.qdocconf
html_docs.depends += $$HELP_DEP_FILES
html_docs.files = $$QHP_FILE

html_docs_online.commands = $$qdoc($$OUT_PWD/doc/html) $$PWD/qtcreator-online.qdocconf
html_docs_online.depends += $$HELP_DEP_FILES

qch_docs.commands = $$HELPGENERATOR -o \"$$QCH_FILE\" $$QHP_FILE
qch_docs.depends += html_docs

DEV_QHP_FILE = $$OUT_PWD/doc/api/html/qtcreator-dev.qhp
DEV_QCH_FILE = $$IDE_DOC_PATH/qtcreator-dev.qch

DEV_HELP_DEP_FILES = \
    $$PWD/api/qtcreator-api.qdoc \
    $$PWD/api/coding-style.qdoc \
    $$PWD/api/external-tool-spec.qdoc \
    $$PWD/api/qtcreator-dev.qdoc \
    $$PWD/api/qtcreator-dev-wizards.qdoc \
    $$PWD/api/qtcreator-dev.qdocconf

dev_html_docs.commands = $$qdoc($$OUT_PWD/doc/api/html) $$PWD/api/qtcreator-dev.qdocconf
dev_html_docs.depends += $$DEV_HELP_DEP_FILES

dev_html_docs_online.commands = $$qdoc($$OUT_PWD/doc/api/html) $$PWD/api/qtcreator-dev-online.qdocconf
dev_html_docs_online.depends += $$DEV_HELP_DEP_FILES

dev_qch_docs.commands = $$HELPGENERATOR -o \"$$DEV_QCH_FILE\" $$DEV_QHP_FILE
dev_qch_docs.depends += dev_html_docs

unix:!macx {
    inst_qch_docs.files = $$QCH_FILE
    inst_qch_docs.path = /share/doc/qtcreator
    inst_qch_docs.CONFIG += no_check_exist
    INSTALLS += inst_qch_docs

    inst_dev_qch_docs.files = $$DEV_QCH_FILE
    inst_dev_qch_docs.path = /share/doc/qtcreator
    inst_dev_qch_docs.CONFIG += no_check_exist
    INSTALLS += inst_dev_qch_docs
}

docs_online.depends = html_docs_online dev_html_docs_online
docs.depends = qch_docs dev_qch_docs
QMAKE_EXTRA_TARGETS += html_docs dev_html_docs html_docs_online dev_html_docs_online qch_docs dev_qch_docs docs docs_online

OTHER_FILES = $$HELP_DEP_FILES $$DEV_HELP_DEP_FILES

fixnavi.commands = \
    cd $$targetPath($$PWD) && \
    perl fixnavi.pl -Dqcmanual -Dqtquick \
        qtcreator.qdoc maemodev.qdoc symbiandev.qdoc qtcreator-faq.qdoc
QMAKE_EXTRA_TARGETS += fixnavi


StartWidget

StartWidget

HEADERS += \
	$$PWD/mainWindow.h \
	$$PWD/propertyEditorProxyModel.h \
	$$PWD/errorReporter.h \
	$$PWD/gesturesPainterInterface.h \
	$$PWD/gesturesPainterInterface.h \
	$$PWD/error.h \
	$$PWD/errorListWidget.h \
	$$PWD/mainWindowInterpretersInterface.h \
	$$PWD/findManager.h \
	$$PWD/dotRunner.h \
	$$PWD/splashScreen.h \
	$$PWD/tabWidget.h \
	$$PWD/modelExplorer.h \
	$$PWD/miniMap.h \
	$$PWD/referenceList.h \
	$$PWD/externBrowser.h \
	$$PWD/qscintillaTextEdit.h \
	$$PWD/projectManager/autosaver.h \
	$$PWD/projectManager/projectManagementInterface.h \
	$$PWD/projectManager/projectManager.h \
	$$PWD/palette/paletteTree.h \
	$$PWD/palette/paletteTreeWidget.h \
	$$PWD/palette/draggableElement.h \
	$$PWD/palette/paletteTreeWidgets.h \
	$$PWD/palette/paletteElement.h \
        $$PWD/mainwindow/startWidget/suggestToCreateDiagramWidget.h \
        $$PWD/mainwindow/startWidget/startwidget.h \
        $$PWD/mainwindow/startWidget/recentProjectsListWidget.h \
        $$PWD/mainwindow/startWidget/recentProjectItem.h \
        $$PWD/mainwindow/startWidget/listWidget.h \

SOURCES += \
	$$PWD/mainWindow.cpp \
	$$PWD/propertyEditorProxyModel.cpp \
	$$PWD/errorReporter.cpp \
	$$PWD/error.cpp \
	$$PWD/errorListWidget.cpp \
	$$PWD/findManager.cpp \
	$$PWD/dotRunner.cpp \
	$$PWD/splashScreen.cpp \
	$$PWD/tabWidget.cpp \
	$$PWD/miniMap.cpp \
	$$PWD/modelExplorer.cpp \
	$$PWD/referenceList.cpp \
	$$PWD/qscintillaTextEdit.cpp \
	$$PWD/projectManager/autosaver.cpp \
	$$PWD/projectManager/projectManager.cpp \
	$$PWD/palette/paletteTree.cpp \
	$$PWD/palette/paletteTreeWidget.cpp \
	$$PWD/palette/draggableElement.cpp \
	$$PWD/palette/paletteTreeWidgets.cpp \
	$$PWD/palette/paletteElement.cpp \
        $$PWD/mainwindow/startWidget/suggestToCreateDiagramWidget.cpp \
        $$PWD/mainwindow/startWidget/startWidget.cpp \
        $$PWD/mainwindow/startWidget/recentProjectsListWidget.cpp \
        $$PWD/mainwindow/startWidget/recentProjectItem.cpp \
        $$PWD/mainwindow/startWidget/listWidget.cpp \

win32 {
	HEADERS += \
		$$PWD/windowsExternBrowser.h \

	SOURCES += \
		$$PWD/windowsExternBrowser.cpp \
}

unix {
	HEADERS += \
		$$PWD/linuxExternBrowser.h \

	SOURCES += \
		$$PWD/linuxExternBrowser.cpp \
}

macx {
	HEADERS += \
		$$PWD/macExternBrowser.h \

	SOURCES += \
		$$PWD/macExternBrowser.cpp \
}

FORMS += \
	$$PWD/mainWindow.ui \
	$$PWD/referenceList.ui \

# Shape editor
HEADERS += \
	$$PWD/shapeEdit/shapeEdit.h \
	$$PWD/shapeEdit/scene.h \
	$$PWD/shapeEdit/arch.h \
	$$PWD/shapeEdit/line.h \
	$$PWD/shapeEdit/item.h \
	$$PWD/shapeEdit/ellipse.h \
	$$PWD/shapeEdit/rectangle.h \
	$$PWD/shapeEdit/text.h \
	$$PWD/shapeEdit/pointPort.h \
	$$PWD/shapeEdit/linePort.h \
	$$PWD/shapeEdit/xmlLoader.h \
	$$PWD/shapeEdit/stylus.h \
	$$PWD/shapeEdit/colorListEditor.h \
	$$PWD/shapeEdit/curve.h \
	$$PWD/shapeEdit/view.h \
	$$PWD/shapeEdit/textPicture.h \
	$$PWD/shapeEdit/path.h \
	$$PWD/shapeEdit/image.h \
	$$PWD/shapeEdit/visibilityConditionsDialog.h \
	$$PWD/shapeEdit/visibilityValueWidget.h \

SOURCES += \
	$$PWD/shapeEdit/shapeEdit.cpp \
	$$PWD/shapeEdit/scene.cpp \
	$$PWD/shapeEdit/arch.cpp \
	$$PWD/shapeEdit/line.cpp \
	$$PWD/shapeEdit/item.cpp \
	$$PWD/shapeEdit/ellipse.cpp \
	$$PWD/shapeEdit/rectangle.cpp \
	$$PWD/shapeEdit/text.cpp \
	$$PWD/shapeEdit/pointPort.cpp \
	$$PWD/shapeEdit/linePort.cpp \
	$$PWD/shapeEdit/xmlLoader.cpp \
	$$PWD/shapeEdit/stylus.cpp \
	$$PWD/shapeEdit/colorListEditor.cpp \
	$$PWD/shapeEdit/path.cpp \
	$$PWD/shapeEdit/curve.cpp \
	$$PWD/shapeEdit/view.cpp \
	$$PWD/shapeEdit/textPicture.cpp \
	$$PWD/shapeEdit/image.cpp \
	$$PWD/shapeEdit/visibilityConditionsDialog.cpp \
	$$PWD/shapeEdit/visibilityValueWidget.cpp \

FORMS += \
	$$PWD/shapeEdit/shapeEdit.ui \
	$$PWD/shapeEdit/visibilityConditionsDialog.ui \

HEADERS += \
	$$PWD/mainWindow.h \
	$$PWD/propertyEditorProxyModel.h \
	$$PWD/errorReporter.h \
	$$PWD/gesturesPainterInterface.h \
	$$PWD/gesturesPainterInterface.h \
	$$PWD/error.h \
	$$PWD/errorListWidget.h \
	$$PWD/mainWindowInterpretersInterface.h \
	$$PWD/findManager.h \
	$$PWD/dotRunner.h \
	$$PWD/splashScreen.h \
	$$PWD/tabWidget.h \
	$$PWD/modelExplorer.h \
	$$PWD/miniMap.h \
	$$PWD/referenceList.h \
	$$PWD/externBrowser.h \
	$$PWD/qscintillaTextEdit.h \
	$$PWD/projectManager/autosaver.h \
	$$PWD/projectManager/projectManagementInterface.h \
	$$PWD/projectManager/projectManager.h \
	$$PWD/palette/paletteTree.h \
	$$PWD/palette/paletteTreeWidget.h \
	$$PWD/palette/draggableElement.h \
	$$PWD/palette/paletteTreeWidgets.h \
	$$PWD/palette/paletteElement.h \
        $$PWD/mainwindow/startWidget/suggestToCreateDiagramWidget.h \
        $$PWD/mainwindow/startWidget/startwidget.h \
        $$PWD/mainwindow/startWidget/recentProjectsListWidget.h \
        $$PWD/mainwindow/startWidget/recentProjectItem.h \
        $$PWD/mainwindow/startWidget/listWidget.h \
    mainwindow/startWidget/suggestToCreateDiagramWidget.h \
    mainwindow/startWidget/startwidget.h \
    mainwindow/startWidget/recentProjectsListWidget.h \
    mainwindow/startWidget/recentProjectItem.h \
    mainwindow/startWidget/listWidget.h

SOURCES += \
	$$PWD/mainWindow.cpp \
	$$PWD/propertyEditorProxyModel.cpp \
	$$PWD/errorReporter.cpp \
	$$PWD/error.cpp \
	$$PWD/errorListWidget.cpp \
	$$PWD/findManager.cpp \
	$$PWD/dotRunner.cpp \
	$$PWD/splashScreen.cpp \
	$$PWD/tabWidget.cpp \
	$$PWD/miniMap.cpp \
	$$PWD/modelExplorer.cpp \
	$$PWD/referenceList.cpp \
	$$PWD/qscintillaTextEdit.cpp \
	$$PWD/projectManager/autosaver.cpp \
	$$PWD/projectManager/projectManager.cpp \
	$$PWD/palette/paletteTree.cpp \
	$$PWD/palette/paletteTreeWidget.cpp \
	$$PWD/palette/draggableElement.cpp \
	$$PWD/palette/paletteTreeWidgets.cpp \
	$$PWD/palette/paletteElement.cpp \
        $$PWD/mainwindow/startWidget/suggestToCreateDiagramWidget.cpp \
        $$PWD/mainwindow/startWidget/startWidget.cpp \
        $$PWD/mainwindow/startWidget/recentProjectsListWidget.cpp \
        $$PWD/mainwindow/startWidget/recentProjectItem.cpp \
        $$PWD/mainwindow/startWidget/listWidget.cpp \
    mainwindow/startWidget/suggestToCreateDiagramWidget.cpp \
    mainwindow/startWidget/startWidget.cpp \
    mainwindow/startWidget/recentProjectsListWidget.cpp \
    mainwindow/startWidget/recentProjectItem.cpp \
    mainwindow/startWidget/listWidget.cpp

win32 {
	HEADERS += \
		$$PWD/windowsExternBrowser.h \

	SOURCES += \
		$$PWD/windowsExternBrowser.cpp \
}

unix {
	HEADERS += \
		$$PWD/linuxExternBrowser.h \

	SOURCES += \
		$$PWD/linuxExternBrowser.cpp \
}

macx {
	HEADERS += \
		$$PWD/macExternBrowser.h \

	SOURCES += \
		$$PWD/macExternBrowser.cpp \
}

FORMS += \
	$$PWD/mainWindow.ui \
	$$PWD/referenceList.ui \

# Shape editor
HEADERS += \
	$$PWD/shapeEdit/shapeEdit.h \
	$$PWD/shapeEdit/scene.h \
	$$PWD/shapeEdit/arch.h \
	$$PWD/shapeEdit/line.h \
	$$PWD/shapeEdit/item.h \
	$$PWD/shapeEdit/ellipse.h \
	$$PWD/shapeEdit/rectangle.h \
	$$PWD/shapeEdit/text.h \
	$$PWD/shapeEdit/pointPort.h \
	$$PWD/shapeEdit/linePort.h \
	$$PWD/shapeEdit/xmlLoader.h \
	$$PWD/shapeEdit/stylus.h \
	$$PWD/shapeEdit/colorListEditor.h \
	$$PWD/shapeEdit/curve.h \
	$$PWD/shapeEdit/view.h \
	$$PWD/shapeEdit/textPicture.h \
	$$PWD/shapeEdit/path.h \
	$$PWD/shapeEdit/image.h \
	$$PWD/shapeEdit/visibilityConditionsDialog.h \
	$$PWD/shapeEdit/visibilityValueWidget.h \

SOURCES += \
	$$PWD/shapeEdit/shapeEdit.cpp \
	$$PWD/shapeEdit/scene.cpp \
	$$PWD/shapeEdit/arch.cpp \
	$$PWD/shapeEdit/line.cpp \
	$$PWD/shapeEdit/item.cpp \
	$$PWD/shapeEdit/ellipse.cpp \
	$$PWD/shapeEdit/rectangle.cpp \
	$$PWD/shapeEdit/text.cpp \
	$$PWD/shapeEdit/pointPort.cpp \
	$$PWD/shapeEdit/linePort.cpp \
	$$PWD/shapeEdit/xmlLoader.cpp \
	$$PWD/shapeEdit/stylus.cpp \
	$$PWD/shapeEdit/colorListEditor.cpp \
	$$PWD/shapeEdit/path.cpp \
	$$PWD/shapeEdit/curve.cpp \
	$$PWD/shapeEdit/view.cpp \
	$$PWD/shapeEdit/textPicture.cpp \
	$$PWD/shapeEdit/image.cpp \
	$$PWD/shapeEdit/visibilityConditionsDialog.cpp \
	$$PWD/shapeEdit/visibilityValueWidget.cpp \

FORMS += \
	$$PWD/shapeEdit/shapeEdit.ui \
	$$PWD/shapeEdit/visibilityConditionsDialog.ui \


clang3.5 missing warning option fix.

clang3.5 missing warning option fix.

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

#CONFIG *= drape

drape {
  DEFINES *= USE_DRAPE
}

CONFIG(map_designer) {
  DEFINES *= STANDALONE_APP
  DEFINES *= BUILD_DESIGNER
}

# our own version variables
VERSION_MAJOR = 2
VERSION_MINOR = 4

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

# ROOT_DIR is in INCLUDEPATH now according to the new include policy.
INCLUDEPATH *= $$ROOT_DIR
# Do not set DEPENDPATH - it causes rebuild all with minor changes.
#DEPENDPATH  *= $$ROOT_DIR
INCLUDEPATH *= $$ROOT_DIR/3party/boost
INCLUDEPATH *= $$ROOT_DIR/3party/glm

# Hack for Qt5 qmake to make it much faster.
# Turns off any external headers modification check (see DEPENDPATH).
# Do not remove depend_includepath in CONFIG. Need to check modifications within ROOT_DIR.
#CONFIG -= depend_includepath

CONFIG *= c++11

# Automatically enable release config for production
CONFIG(production) {
  CONFIG *= release
}

CONFIG(release, debug|release) {
  DEFINES *= RELEASE _RELEASE NDEBUG
  CONFIG(production) {
    CONFIG_NAME = production
  } else {
    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

QMAKE_LIBDIR = $$BINARIES_PATH $$QMAKE_LIBDIR

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

# Libraries' dependencies hack.
win32-msvc* {
  LIB_EXT = .lib
  LIB_PREFIX =
}
unix|win32-g++|tizen* {
 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
  LIBS *= -lShell32
}

win32-msvc* {
  QMAKE_CLEAN += *.user
  DEFINES += _SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX BOOST_ALL_NO_LIB
  QMAKE_CXXFLAGS += /Zi /fp:fast
  QMAKE_CFLAGS += /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

  QMAKE_LFLAGS *= /OPT:REF
  QMAKE_LFLAGS_RELEASE *= /OPT:REF,ICF
  QMAKE_LFLAGS_DEBUG *= /OPT:NOICF

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

win32-msvc201* {
  # disable tr1 and c++0x features to avoid build errors
#  DEFINES += _HAS_CPP0X=0
#  DEFINES += BOOST_NO_CXX11_HDR_ARRAY BOOST_NO_CXX11_HDR_TYPEINDEX BOOST_NO_CXX11_SMART_PTR
  QMAKE_CFLAGS *= /wd4100
  QMAKE_CXXFLAGS *= /wd4100
  QMAKE_CFLAGS_RELEASE += /GL
  QMAKE_CXXFLAGS_RELEASE += /GL
  QMAKE_LFLAGS_RELEASE += /LTCG
  QMAKE_LIB += /LTCG
}

# unix also works for Android
unix|win32-g++ {
  LIBS *= -lz
  QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare -Wno-strict-aliasing -Wno-unused-parameter

  # -Wno-unused-local-typedef is not supported on clang 3.5.
  IS_CLANG35 = $$system( echo | $$QMAKE_CXX -dM -E - | grep '__clang_version__.*3\.5.*' )
  if (isEmpty(IS_CLANG35)){
    QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedef
  }

  *-clang {
    QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-conversion -Werror=return-type -Wno-deprecated-register
  }

tizen{
  QMAKE_CFLAGS_RELEASE -= -O2
  QMAKE_CFLAGS_RELEASE += -O1
  QMAKE_CXXFLAGS_RELEASE -= -O2
  QMAKE_CXXFLAGS_RELEASE += -O1
  QMAKE_CFLAGS_RELEASE *= -ffast-math
  QMAKE_CXXFLAGS_RELEASE *= -ffast-math
} else {
  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-* {
  QMAKE_CFLAGS *= -fdata-sections -ffunction-sections
  QMAKE_CXXFLAGS *= -fdata-sections -ffunction-sections
  QMAKE_LFLAGS *= -Wl,--gc-sections -Wl,-Bsymbolic-functions
  linux-g++* {
    QMAKE_CFLAGS_RELEASE *= -ffloat-store
    QMAKE_CXXFLAGS_RELEASE *= -ffloat-store
  }
  # debian build requirements
  CONFIG(production) {
    QMAKE_CFLAGS_RELEASE = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
    QMAKE_CXXFLAGS_RELEASE = -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
    QMAKE_LFLAGS *= -Wl,-z,relro
  }

}

android-g++ {
  QMAKE_CFLAGS *= -fdata-sections -ffunction-sections
  QMAKE_CXXFLAGS *= -fdata-sections -ffunction-sections
  QMAKE_LFLAGS *= -Wl,--gc-sections
}

win32-g++ {
  QMAKE_CFLAGS *= -Wextra
  QMAKE_CXXFLAGS *= -Wextra
  QMAKE_LFLAGS *= -s
  QMAKE_LFLAGS_RELEASE *= -O
  LIBS *= -lpthread
}

macx-* {
  QMAKE_LFLAGS *= -dead_strip
  LIBS *= "-framework Foundation"

#  macx-clang {
#    QMAKE_CFLAGS_RELEASE -= -O3
#    QMAKE_CFLAGS_RELEASE += -O4 -flto
#    QMAKE_CXXFLAGS_RELEASE -= -O3
#    QMAKE_CXXFLAGS_RELEASE += -O4 -flto
#    QMAKE_LFLAGS_RELEASE += -O4 -flto
#  }
}

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

# Fix boost compilation error
win32* {
    QMAKE_MOC = $$[QT_INSTALL_BINS]/moc.exe -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
} else {
    QMAKE_MOC = $$[QT_INSTALL_BINS]/moc -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
}

# Include with private variables.
HEADERS += \
  $$ROOT_DIR/private.h

# Standard includes wrappers.
HEADERS += \
  $$ROOT_DIR/std/algorithm.hpp \
  $$ROOT_DIR/std/array.hpp \
  $$ROOT_DIR/std/atomic.hpp \
  $$ROOT_DIR/std/auto_ptr.hpp \
  $$ROOT_DIR/std/bind.hpp \
  $$ROOT_DIR/std/bitset.hpp \
  $$ROOT_DIR/std/cctype.hpp \
  $$ROOT_DIR/std/cerrno.hpp \
  $$ROOT_DIR/std/chrono.hpp \
  $$ROOT_DIR/std/cmath.hpp \
  $$ROOT_DIR/std/complex.hpp \
  $$ROOT_DIR/std/condition_variable.hpp \
  $$ROOT_DIR/std/cstdarg.hpp \
  $$ROOT_DIR/std/cstdint.hpp \
  $$ROOT_DIR/std/cstdio.hpp \
  $$ROOT_DIR/std/cstdlib.hpp \
  $$ROOT_DIR/std/cstring.hpp \
  $$ROOT_DIR/std/ctime.hpp \
  $$ROOT_DIR/std/deque.hpp \
  $$ROOT_DIR/std/errno.hpp \
  $$ROOT_DIR/std/exception.hpp \
  $$ROOT_DIR/std/fstream.hpp \
  $$ROOT_DIR/std/function.hpp \
  $$ROOT_DIR/std/functional.hpp \
  $$ROOT_DIR/std/initializer_list.hpp \
  $$ROOT_DIR/std/iomanip.hpp \
  $$ROOT_DIR/std/ios.hpp \
  $$ROOT_DIR/std/iostream.hpp \
  $$ROOT_DIR/std/iterator.hpp \
  $$ROOT_DIR/std/iterator_facade.hpp \
  $$ROOT_DIR/std/limits.hpp \
  $$ROOT_DIR/std/list.hpp \
  $$ROOT_DIR/std/map.hpp \
  $$ROOT_DIR/std/msvc_cpp11_workarounds.hpp \
  $$ROOT_DIR/std/mutex.hpp \
  $$ROOT_DIR/std/noncopyable.hpp \
  $$ROOT_DIR/std/numeric.hpp \
  $$ROOT_DIR/std/queue.hpp \
  $$ROOT_DIR/std/set.hpp \
  $$ROOT_DIR/std/shared_array.hpp \
  $$ROOT_DIR/std/shared_ptr.hpp \
  $$ROOT_DIR/std/sstream.hpp \
  $$ROOT_DIR/std/stack.hpp \
  $$ROOT_DIR/std/string.hpp \
  $$ROOT_DIR/std/systime.hpp \
  $$ROOT_DIR/std/target_os.hpp \
  $$ROOT_DIR/std/thread.hpp \
  $$ROOT_DIR/std/transform_iterator.hpp \
  $$ROOT_DIR/std/tuple.hpp \
  $$ROOT_DIR/std/type_traits.hpp \
  $$ROOT_DIR/std/typeinfo.hpp \
  $$ROOT_DIR/std/unique_ptr.hpp \
  $$ROOT_DIR/std/unordered_map.hpp \
  $$ROOT_DIR/std/unordered_set.hpp \
  $$ROOT_DIR/std/utility.hpp \
  $$ROOT_DIR/std/vector.hpp \
  $$ROOT_DIR/std/weak_ptr.hpp \
  $$ROOT_DIR/std/windows.hpp \

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

#CONFIG *= drape

drape {
  DEFINES *= USE_DRAPE
}

CONFIG(map_designer) {
  DEFINES *= STANDALONE_APP
  DEFINES *= BUILD_DESIGNER
}

# our own version variables
VERSION_MAJOR = 2
VERSION_MINOR = 4

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

# ROOT_DIR is in INCLUDEPATH now according to the new include policy.
INCLUDEPATH *= $$ROOT_DIR
# Do not set DEPENDPATH - it causes rebuild all with minor changes.
#DEPENDPATH  *= $$ROOT_DIR
INCLUDEPATH *= $$ROOT_DIR/3party/boost
INCLUDEPATH *= $$ROOT_DIR/3party/glm

# Hack for Qt5 qmake to make it much faster.
# Turns off any external headers modification check (see DEPENDPATH).
# Do not remove depend_includepath in CONFIG. Need to check modifications within ROOT_DIR.
#CONFIG -= depend_includepath

CONFIG *= c++11

# Automatically enable release config for production
CONFIG(production) {
  CONFIG *= release
}

CONFIG(release, debug|release) {
  DEFINES *= RELEASE _RELEASE NDEBUG
  CONFIG(production) {
    CONFIG_NAME = production
  } else {
    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

QMAKE_LIBDIR = $$BINARIES_PATH $$QMAKE_LIBDIR

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

# Libraries' dependencies hack.
win32-msvc* {
  LIB_EXT = .lib
  LIB_PREFIX =
}
unix|win32-g++|tizen* {
 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
  LIBS *= -lShell32
}

win32-msvc* {
  QMAKE_CLEAN += *.user
  DEFINES += _SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX BOOST_ALL_NO_LIB
  QMAKE_CXXFLAGS += /Zi /fp:fast
  QMAKE_CFLAGS += /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

  QMAKE_LFLAGS *= /OPT:REF
  QMAKE_LFLAGS_RELEASE *= /OPT:REF,ICF
  QMAKE_LFLAGS_DEBUG *= /OPT:NOICF

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

win32-msvc201* {
  # disable tr1 and c++0x features to avoid build errors
#  DEFINES += _HAS_CPP0X=0
#  DEFINES += BOOST_NO_CXX11_HDR_ARRAY BOOST_NO_CXX11_HDR_TYPEINDEX BOOST_NO_CXX11_SMART_PTR
  QMAKE_CFLAGS *= /wd4100
  QMAKE_CXXFLAGS *= /wd4100
  QMAKE_CFLAGS_RELEASE += /GL
  QMAKE_CXXFLAGS_RELEASE += /GL
  QMAKE_LFLAGS_RELEASE += /LTCG
  QMAKE_LIB += /LTCG
}

# unix also works for Android
unix|win32-g++ {
  LIBS *= -lz
  QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare -Wno-strict-aliasing -Wno-unused-parameter \
                            -Wno-unused-local-typedef
  *-clang {
    QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-conversion -Werror=return-type -Wno-deprecated-register
  }

tizen{
  QMAKE_CFLAGS_RELEASE -= -O2
  QMAKE_CFLAGS_RELEASE += -O1
  QMAKE_CXXFLAGS_RELEASE -= -O2
  QMAKE_CXXFLAGS_RELEASE += -O1
  QMAKE_CFLAGS_RELEASE *= -ffast-math
  QMAKE_CXXFLAGS_RELEASE *= -ffast-math
} else {
  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-* {
  QMAKE_CFLAGS *= -fdata-sections -ffunction-sections
  QMAKE_CXXFLAGS *= -fdata-sections -ffunction-sections
  QMAKE_LFLAGS *= -Wl,--gc-sections -Wl,-Bsymbolic-functions
  linux-g++* {
    QMAKE_CFLAGS_RELEASE *= -ffloat-store
    QMAKE_CXXFLAGS_RELEASE *= -ffloat-store
  }
  # debian build requirements
  CONFIG(production) {
    QMAKE_CFLAGS_RELEASE = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
    QMAKE_CXXFLAGS_RELEASE = -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
    QMAKE_LFLAGS *= -Wl,-z,relro
  }

}

android-g++ {
  QMAKE_CFLAGS *= -fdata-sections -ffunction-sections
  QMAKE_CXXFLAGS *= -fdata-sections -ffunction-sections
  QMAKE_LFLAGS *= -Wl,--gc-sections
}

win32-g++ {
  QMAKE_CFLAGS *= -Wextra
  QMAKE_CXXFLAGS *= -Wextra
  QMAKE_LFLAGS *= -s
  QMAKE_LFLAGS_RELEASE *= -O
  LIBS *= -lpthread
}

macx-* {
  QMAKE_LFLAGS *= -dead_strip
  LIBS *= "-framework Foundation"

#  macx-clang {
#    QMAKE_CFLAGS_RELEASE -= -O3
#    QMAKE_CFLAGS_RELEASE += -O4 -flto
#    QMAKE_CXXFLAGS_RELEASE -= -O3
#    QMAKE_CXXFLAGS_RELEASE += -O4 -flto
#    QMAKE_LFLAGS_RELEASE += -O4 -flto
#  }
}

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

# Fix boost compilation error
win32* {
    QMAKE_MOC = $$[QT_INSTALL_BINS]/moc.exe -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
} else {
    QMAKE_MOC = $$[QT_INSTALL_BINS]/moc -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
}

# Include with private variables.
HEADERS += \
  $$ROOT_DIR/private.h

# Standard includes wrappers.
HEADERS += \
  $$ROOT_DIR/std/algorithm.hpp \
  $$ROOT_DIR/std/array.hpp \
  $$ROOT_DIR/std/atomic.hpp \
  $$ROOT_DIR/std/auto_ptr.hpp \
  $$ROOT_DIR/std/bind.hpp \
  $$ROOT_DIR/std/bitset.hpp \
  $$ROOT_DIR/std/cctype.hpp \
  $$ROOT_DIR/std/cerrno.hpp \
  $$ROOT_DIR/std/chrono.hpp \
  $$ROOT_DIR/std/cmath.hpp \
  $$ROOT_DIR/std/complex.hpp \
  $$ROOT_DIR/std/condition_variable.hpp \
  $$ROOT_DIR/std/cstdarg.hpp \
  $$ROOT_DIR/std/cstdint.hpp \
  $$ROOT_DIR/std/cstdio.hpp \
  $$ROOT_DIR/std/cstdlib.hpp \
  $$ROOT_DIR/std/cstring.hpp \
  $$ROOT_DIR/std/ctime.hpp \
  $$ROOT_DIR/std/deque.hpp \
  $$ROOT_DIR/std/errno.hpp \
  $$ROOT_DIR/std/exception.hpp \
  $$ROOT_DIR/std/fstream.hpp \
  $$ROOT_DIR/std/function.hpp \
  $$ROOT_DIR/std/functional.hpp \
  $$ROOT_DIR/std/initializer_list.hpp \
  $$ROOT_DIR/std/iomanip.hpp \
  $$ROOT_DIR/std/ios.hpp \
  $$ROOT_DIR/std/iostream.hpp \
  $$ROOT_DIR/std/iterator.hpp \
  $$ROOT_DIR/std/iterator_facade.hpp \
  $$ROOT_DIR/std/limits.hpp \
  $$ROOT_DIR/std/list.hpp \
  $$ROOT_DIR/std/map.hpp \
  $$ROOT_DIR/std/msvc_cpp11_workarounds.hpp \
  $$ROOT_DIR/std/mutex.hpp \
  $$ROOT_DIR/std/noncopyable.hpp \
  $$ROOT_DIR/std/numeric.hpp \
  $$ROOT_DIR/std/queue.hpp \
  $$ROOT_DIR/std/set.hpp \
  $$ROOT_DIR/std/shared_array.hpp \
  $$ROOT_DIR/std/shared_ptr.hpp \
  $$ROOT_DIR/std/sstream.hpp \
  $$ROOT_DIR/std/stack.hpp \
  $$ROOT_DIR/std/string.hpp \
  $$ROOT_DIR/std/systime.hpp \
  $$ROOT_DIR/std/target_os.hpp \
  $$ROOT_DIR/std/thread.hpp \
  $$ROOT_DIR/std/transform_iterator.hpp \
  $$ROOT_DIR/std/tuple.hpp \
  $$ROOT_DIR/std/type_traits.hpp \
  $$ROOT_DIR/std/typeinfo.hpp \
  $$ROOT_DIR/std/unique_ptr.hpp \
  $$ROOT_DIR/std/unordered_map.hpp \
  $$ROOT_DIR/std/unordered_set.hpp \
  $$ROOT_DIR/std/utility.hpp \
  $$ROOT_DIR/std/vector.hpp \
  $$ROOT_DIR/std/weak_ptr.hpp \
  $$ROOT_DIR/std/windows.hpp \


Stop forcing DESTDIR

Stop forcing DESTDIR

CONFIG(debug, debug|release) {
  BUILD_TYPE = debug
}
else:CONFIG(release, debug|release) {
  BUILD_TYPE = release
}
else {
  warning("Unknown build type; defaulting to debug")
  BUILD_TYPE = debug
}

DEFINES += \
  GLM_META_PROG_HELPERS \
  GENERATOR_USE_GLM \

OBJECTS_DIR = temp
MOC_DIR = temp
UI_DIR = temp
RCC_DIR = temp

#QT += KIOCore KIOFileWidgets KIOWidgets KNTLM

INCLUDEPATH *= \
  $$MOC_DIR \
  $$UI_DIR \
  $$RCC_DIR \

DESTDIR = $$PWD/../build/$${BUILD_TYPE}-$${QMAKE_CC}/dist


[qt] Enabled downloader in release builds

# 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
  QMAKE_LFLAGS *= -dead_strip
}

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 -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
  QMAKE_LFLAGS *= -dead_strip
}

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


upped the version

upped the version

VERSION = 0.2.13

PROJECT_NAME = meego-ux-media

DISTSUBDIR = $${PROJECT_NAME}-$${VERSION}
TSSUBDIR = $${DISTSUBDIR}/ts

VERSION = 0.2.12

PROJECT_NAME = meego-ux-media

DISTSUBDIR = $${PROJECT_NAME}-$${VERSION}
TSSUBDIR = $${DISTSUBDIR}/ts


Another mistake in qmake - linux doesn't have kqueue

INCLUDEPATH += \
    $$PWD/../libuv/src \
    $$PWD/../libuv/include

HEADERS += $$PWD/../libuv/src/*.h \
    $$PWD/../libuv/include/pthread-barrier.h \
    $$PWD/../libuv/include/uv-errno.h \
    $$PWD/../libuv/include/uv-threadpool.h \
    $$PWD/../libuv/include/uv-version.h \
    $$PWD/../libuv/include/uv-common.h \
    $$PWD/../libuv/include/uv.h \
    $$PWD/../libuv/include/tree.h

win32 {
    HEADERS += $$PWD/../libuv/include/uv-win.h

}

unix:!macx {
    HEADERS += $$PWD/../libuv/include/uv-unix.h
}

macx: {
    HEADERS += $$PWD/../libuv/include/uv-darwin.h
}

SOURCES += $$PWD/../libuv/src/*.c

win32 {
    INCLUDEPATH += $$PWD/../libuv/src/win
    HEADERS += $$PWD/../libuv/src/win/*.h
    SOURCES += $$PWD/../libuv/src/win/*.c
}

unix {
    INCLUDEPATH += $$PWD/../libuv/src/unix
    HEADERS += $$PWD/../libuv/src/unix/*.h
    SOURCES += $$PWD/../libuv/src/unix/async.c \
        $$PWD/../libuv/src/unix/core.c \
        $$PWD/../libuv/src/unix/dl.c \
        $$PWD/../libuv/src/unix/fs.c \
        $$PWD/../libuv/src/unix/getaddrinfo.c \
        $$PWD/../libuv/src/unix/getnameinfo.c \
        $$PWD/../libuv/src/unix/loop.c \
        $$PWD/../libuv/src/unix/pipe.c \
        $$PWD/../libuv/src/unix/poll.c \
        $$PWD/../libuv/src/unix/process.c \
        $$PWD/../libuv/src/unix/proctitle.c \
        $$PWD/../libuv/src/unix/pthread-barrier.c \
        $$PWD/../libuv/src/unix/pthread-fixes.c \
        $$PWD/../libuv/src/unix/signal.c \
        $$PWD/../libuv/src/unix/stream.c \
        $$PWD/../libuv/src/unix/tcp.c \
        $$PWD/../libuv/src/unix/thread.c \
        $$PWD/../libuv/src/unix/timer.c \
        $$PWD/../libuv/src/unix/tty.c \
        $$PWD/../libuv/src/unix/udp.c
}

unix:!macx {
    SOURCES += $$PWD/../libuv/src/unix/linux-core.c \
        $$PWD/../libuv/src/unix/linux-inotify.c \
        $$PWD/../libuv/src/unix/linux-syscalls.c
}

macx {
    SOURCES += $$PWD/../libuv/src/unix/darwin.c \
        $$PWD/../libuv/src/unix/darwin-proctitle.c \
        $$PWD/../libuv/src/unix/fsevents.c \
        $$PWD/../libuv/src/unix/kqueue.c
}

INCLUDEPATH += \
    $$PWD/../libuv/src \
    $$PWD/../libuv/include

HEADERS += $$PWD/../libuv/src/*.h \
    $$PWD/../libuv/include/pthread-barrier.h \
    $$PWD/../libuv/include/uv-errno.h \
    $$PWD/../libuv/include/uv-threadpool.h \
    $$PWD/../libuv/include/uv-version.h \
    $$PWD/../libuv/include/uv-common.h \
    $$PWD/../libuv/include/uv.h \
    $$PWD/../libuv/include/tree.h

win32 {
    HEADERS += $$PWD/../libuv/include/uv-win.h

}

unix:!macx {
    HEADERS += $$PWD/../libuv/include/uv-unix.h
}

macx: {
    HEADERS += $$PWD/../libuv/include/uv-darwin.h
}

SOURCES += $$PWD/../libuv/src/*.c

win32 {
    INCLUDEPATH += $$PWD/../libuv/src/win
    HEADERS += $$PWD/../libuv/src/win/*.h
    SOURCES += $$PWD/../libuv/src/win/*.c
}

unix {
    INCLUDEPATH += $$PWD/../libuv/src/unix
    HEADERS += $$PWD/../libuv/src/unix/*.h
    SOURCES += $$PWD/../libuv/src/unix/async.c \
        $$PWD/../libuv/src/unix/core.c \
        $$PWD/../libuv/src/unix/dl.c \
        $$PWD/../libuv/src/unix/fs.c \
        $$PWD/../libuv/src/unix/getaddrinfo.c \
        $$PWD/../libuv/src/unix/getnameinfo.c \
        $$PWD/../libuv/src/unix/kqueue.c \
        $$PWD/../libuv/src/unix/loop.c \
        $$PWD/../libuv/src/unix/pipe.c \
        $$PWD/../libuv/src/unix/poll.c \
        $$PWD/../libuv/src/unix/process.c \
        $$PWD/../libuv/src/unix/proctitle.c \
        $$PWD/../libuv/src/unix/pthread-barrier.c \
        $$PWD/../libuv/src/unix/pthread-fixes.c \
        $$PWD/../libuv/src/unix/signal.c \
        $$PWD/../libuv/src/unix/stream.c \
        $$PWD/../libuv/src/unix/tcp.c \
        $$PWD/../libuv/src/unix/thread.c \
        $$PWD/../libuv/src/unix/timer.c \
        $$PWD/../libuv/src/unix/tty.c \
        $$PWD/../libuv/src/unix/udp.c
}

unix:!macx {
    SOURCES += $$PWD/../libuv/src/unix/linux-core.c \
        $$PWD/../libuv/src/unix/linux-inotify.c \
        $$PWD/../libuv/src/unix/linux-syscalls.c
}

macx {
    SOURCES += $$PWD/../libuv/src/unix/darwin.c \
        $$PWD/../libuv/src/unix/darwin-proctitle.c \
        $$PWD/../libuv/src/unix/fsevents.c
}


fixes issue correctly detecting 32 bit builds

###################################################################################
# This is a common file which, if changed, needs replicating into the following
# projects:
#   qtvlc
#   Lynx
#   Lynx-updater
#   QDeviceWatcher
#   quazip
#
#   Version 1 - 2016-09-06 - PH - Specify a common build path
#
###################################################################################

COMPILER_VERSION=unknown

android {
    COMPILER_VERSION=gcc4.9
}
else {
    linux {
        COMPILER_VERSION=gcc5.3.1
    }
}

osx|ios {
    COMPILER_VERSION=clang
}

windows {
    *-g++* {

        COMPILER_VERSION=unknownGCC

        greaterThan(QT_MAJOR_VERSION, 5) {
            COMPILER_VERSION=mingw5.3.0
        }
        else {
            greaterThan(QT_MINOR_VERSION, 6) {
                COMPILER_VERSION=mingw5.3.0
            }
            else {
                COMPILER_VERSION=mingw4.9.2
            }
        }
    }
    *-msvc* {
        COMPILER_VERSION=unknownMSVC

        isEmpty(MSVC_VER) {
            message("Finding MSVC_VER")
            MSVC_VER = $$(VisualStudioVersion)
        }

        message(MSVC_VER: $${MSVC_VER});

        equals(MSVC_VER, 14.0){
            COMPILER_VERSION=msvc2015
        }
        equals(MSVC_VER, 12.0){
            COMPILER_VERSION=msvc2013
        }

        message(QT_ARCH: $${QT_ARCH});

        contains(QT_ARCH, x86_64){
            COMPILER_VERSION=$${COMPILER_VERSION}_64
        }
        else {
            COMPILER_VERSION=$${COMPILER_VERSION}_32
        }
    }
}

CONFIG(release, debug|release) {
    DRMODE = r
}
CONFIG(debug, debug|release) {
    DRMODE = d
}

CURRENT_BUILD_OS = $$(OS)
contains(CURRENT_BUILD_OS, Windows_NT){
    message("Windows build machine")
    BUILD_LIBRARIES_ROOT = C:/Buildbot/lib
}else{
    CURRENT_HOME = $$(HOME)
    message(Current Home: $$CURRENT_HOME)
    contains (CURRENT_HOME, /home/administrator) {
        message("Linux build machine")
        CURRENT_BUILD_OS = linux
        BUILD_LIBRARIES_ROOT = /home/$$(USER)/dev/sahara/lib
    } else {
        message("OSX Build machine")
        CURRENT_BUILD_OS = OSX
        BUILD_LIBRARIES_ROOT = /Users/$$(USER)/dev/sahara/lib
    }
}

android {
    TARGET_OS = a
}
else {

    win32 {
        TARGET_OS = win

        win32-msvc* {
            TARGET_OS = winmsvc
        }
    }
    else {
        macx {
            TARGET_OS = mac
        }
        else {
            linux {
                TARGET_OS = linux
            }
            else {
                ios {
                    TARGET_OS = ios
                } else {
                    TARGET_OS = unknown
                }
            }
        }
    }
}

BUILD_PATH = _g/$${DRMODE}-$${QT_VERSION}-$${COMPILER_VERSION}-$${TARGET_OS}

MOC_DIR = $$PWD/$${BUILD_PATH}/_m
OBJECTS_DIR = $$PWD/$${BUILD_PATH}/_o
DESTDIR = $$PWD/$${BUILD_PATH}/bin
UI_DIR = $$PWD/$${BUILD_PATH}/_u
UI_SOURCES_DIR = $$PWD/$${BUILD_PATH}/_u
RCC_DIR = $$PWD/$${BUILD_PATH}/_r

message("QMAKESPEC:" $${QMAKESPEC})
message(Compiler version: $${COMPILER_VERSION})
message(Qt version: $${QT_VERSION})
message(Dependency root: $${BUILD_LIBRARIES_ROOT})

###################################################################################
# This is a common file which, if changed, needs replicating into the following
# projects:
#   qtvlc
#   Lynx
#   Lynx-updater
#   QDeviceWatcher
#   quazip
#
#   Version 1 - 2016-09-06 - PH - Specify a common build path
#
###################################################################################

COMPILER_VERSION=unknown

android {
    COMPILER_VERSION=gcc4.9
}
else {
    linux {
        COMPILER_VERSION=gcc5.3.1
    }
}

osx|ios {
    COMPILER_VERSION=clang
}

windows {
    *-g++* {

        COMPILER_VERSION=unknownGCC

        greaterThan(QT_MAJOR_VERSION, 5) {
            COMPILER_VERSION=mingw5.3.0
        }
        else {
            greaterThan(QT_MINOR_VERSION, 6) {
                COMPILER_VERSION=mingw5.3.0
            }
            else {
                COMPILER_VERSION=mingw4.9.2
            }
        }
    }
    *-msvc* {
        COMPILER_VERSION=unknownMSVC

        isEmpty(MSVC_VER) {
            message("Finding MSVC_VER")
            MSVC_VER = $$(VisualStudioVersion)
        }

        message(MSVC_VER: $${MSVC_VER});

        equals(MSVC_VER, 14.0){
            COMPILER_VERSION=msvc2015
        }
        equals(MSVC_VER, 12.0){
            COMPILER_VERSION=msvc2013
        }

        contains(QMAKE_TARGET.arch, x86_64){
            COMPILER_VERSION=$${COMPILER_VERSION}_64
        }
        else {
            COMPILER_VERSION=$${COMPILER_VERSION}_32
        }
    }
}

CONFIG(release, debug|release) {
    DRMODE = r
}
CONFIG(debug, debug|release) {
    DRMODE = d
}

CURRENT_BUILD_OS = $$(OS)
contains(CURRENT_BUILD_OS, Windows_NT){
    message("Windows build machine")
    BUILD_LIBRARIES_ROOT = C:/Buildbot/lib
}else{
    CURRENT_HOME = $$(HOME)
    message(Current Home: $$CURRENT_HOME)
    contains (CURRENT_HOME, /home/administrator) {
        message("Linux build machine")
        CURRENT_BUILD_OS = linux
        BUILD_LIBRARIES_ROOT = /home/$$(USER)/dev/sahara/lib
    } else {
        message("OSX Build machine")
        CURRENT_BUILD_OS = OSX
        BUILD_LIBRARIES_ROOT = /Users/$$(USER)/dev/sahara/lib
    }
}

android {
    TARGET_OS = a
}
else {

    win32 {
        TARGET_OS = win

        win32-msvc* {
            TARGET_OS = winmsvc
        }
    }
    else {
        macx {
            TARGET_OS = mac
        }
        else {
            linux {
                TARGET_OS = linux
            }
            else {
                ios {
                    TARGET_OS = ios
                } else {
                    TARGET_OS = unknown
                }
            }
        }
    }
}

BUILD_PATH = _g/$${DRMODE}-$${QT_VERSION}-$${COMPILER_VERSION}-$${TARGET_OS}

MOC_DIR = $$PWD/$${BUILD_PATH}/_m
OBJECTS_DIR = $$PWD/$${BUILD_PATH}/_o
DESTDIR = $$PWD/$${BUILD_PATH}/bin
UI_DIR = $$PWD/$${BUILD_PATH}/_u
UI_SOURCES_DIR = $$PWD/$${BUILD_PATH}/_u
RCC_DIR = $$PWD/$${BUILD_PATH}/_r

message("QMAKESPEC:" $${QMAKESPEC})
message(Compiler version: $${COMPILER_VERSION})
message(Qt version: $${QT_VERSION})
message(Dependency root: $${BUILD_LIBRARIES_ROOT})


Remove FIXME from the v8base.pri

Remove FIXME from the v8base.pri

Check the version of gcc and use -fno-strict-aliasing flag when it's
4.5.

Merge-request: 1
(This patch was cherry-pick from QtScript module)
Reviewed-by: Jedrzej Nowacki <jedrzej.nowacki@nokia.com>

Change-Id: I0086ec374c7cfd4c0842198734318c915c6cea8d
Reviewed-on: http://codereview.qt.nokia.com/2515
Reviewed-by: Qt Sanity Bot <5581206bb7e0307f0d99eb71898ae6b694149ca5@ovi.com>
Reviewed-by: Kent Hansen <3ac6a472c49f67eda9a4f8f5b4658e16610d4c63@nokia.com>

V8DIR = $$(V8DIR)
isEmpty(V8DIR) {
    V8DIR = $$PWD/../../3rdparty/v8
} else {
    message(using external V8 from $$V8DIR)
}

*-g++*: {
    QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter
    QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter

    # mksnapshot hangs if gcc 4.5 is used
    # for reference look at http://code.google.com/p/v8/issues/detail?id=884
    equals(QT_GCC_MAJOR_VERSION, 4): equals(QT_GCC_MINOR_VERSION, 5) {
      message(because of a bug in gcc / v8 we need to add -fno-strict-aliasing)
      QMAKE_CFLAGS += -fno-strict-aliasing
      QMAKE_CXXFLAGS += -fno-strict-aliasing
    }
}

V8DIR = $$(V8DIR)
isEmpty(V8DIR) {
    V8DIR = $$PWD/../../3rdparty/v8
} else {
    message(using external V8 from $$V8DIR)
}

*-g++*: {
    QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter
    QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter

    # mksnapshot hangs if gcc 4.5 is used
    # for reference look at http://code.google.com/p/v8/issues/detail?id=884
    # FIXME how to find 4.5 series?
    message(because of a bug in gcc / v8 we need to add -fno-strict-aliasing)
    QMAKE_CFLAGS += -fno-strict-aliasing
    QMAKE_CXXFLAGS += -fno-strict-aliasing
}


Long filename fix

Long filename fix

# Supported languages
## **Add new .qm to translations.qrc**
## **Update translations.cpp**
LANGUAGES = fr de es

TRANSLATIONS_DIR = $${_PRO_FILE_PWD_}/translations
SOURCES += \
    $${TRANSLATIONS_DIR}/translationdialog.cpp \
    $${TRANSLATIONS_DIR}/translations.cpp
HEADERS += \
    $${TRANSLATIONS_DIR}/translationdialog.h \
    $${TRANSLATIONS_DIR}/translations.h
FORMS += \
    $${TRANSLATIONS_DIR}/translationdialog.ui
RESOURCES += \
    $${TRANSLATIONS_DIR}/translations.qrc

# Create/update .ts Files
qtPrepareTool(LUPDATE, lupdate)
command = $$LUPDATE $$shell_quote($$_PRO_FILE_)
system($$command)|error("Failed to run: $$command")

## https://appbus.wordpress.com/2016/04/28/howto-translations-i18n/
# Available translations
defineReplace(prependAll) {
    for(a,$$1):result += $$2$${a}$$3
    return($$result)
}
tsroot = $$join(TARGET,,,.ts)
tstarget = $$join(TARGET,,,_)
TRANSLATIONS = $${TRANSLATIONS_DIR}/$$tsroot
TRANSLATIONS += $$prependAll(LANGUAGES, $${TRANSLATIONS_DIR}/$$tstarget, .ts)

# run LRELEASE to generate the qm files
qtPrepareTool(LRELEASE, lrelease)
for(tsfile, TRANSLATIONS) {
    command = $$LRELEASE $$shell_quote($$tsfile)
    system($$command)|error("Failed to run: $$command")
}

# Supported languages
## **Add new .qm to translations.qrc**
## **Update translations.cpp**
LANGUAGES = fr de es

TRANSLATIONS_DIR = $${_PRO_FILE_PWD_}/translations
SOURCES += \
    $${TRANSLATIONS_DIR}/translationdialog.cpp \
    $${TRANSLATIONS_DIR}/translations.cpp
HEADERS += \
    $${TRANSLATIONS_DIR}/translationdialog.h \
    $${TRANSLATIONS_DIR}/translations.h
FORMS += \
    $${TRANSLATIONS_DIR}/translationdialog.ui
RESOURCES += \
    $${TRANSLATIONS_DIR}/translations.qrc

# Create/update .ts Files
qtPrepareTool(LUPDATE, lupdate)
command = $$LUPDATE $$_PRO_FILE_
system($$command)|error("Failed to run: $$command")

## https://appbus.wordpress.com/2016/04/28/howto-translations-i18n/
# Available translations
defineReplace(prependAll) {
    for(a,$$1):result += $$2$${a}$$3
    return($$result)
}
tsroot = $$join(TARGET,,,.ts)
tstarget = $$join(TARGET,,,_)
TRANSLATIONS = $${TRANSLATIONS_DIR}/$$tsroot
TRANSLATIONS += $$prependAll(LANGUAGES, $${TRANSLATIONS_DIR}/$$tstarget, .ts)

# run LRELEASE to generate the qm files
qtPrepareTool(LRELEASE, lrelease)
for(tsfile, TRANSLATIONS) {
    command = $$LRELEASE $$tsfile
    system($$command)|error("Failed to run: $$command")
}


Must be the germans again, surely. Zulu germans

vlc {
    DEFINES += MEDIAPLAYER_VLC
    HEADERS += $$PWD/mediaplayervlc.h
    SOURCES += $$PWD/mediaplayervlc.cpp
    LIBS += -lvlc
} else: 7425 {
message("7425 mediaplayer integrated")
    DEFINES += MEDIAPLAYER_7425
    HEADERS += $$PWD/mediaplayer7425.h
    SOURCES += $$PWD/mediaplayer7425.cpp
} else: ST7105 {
    message("ST7105 mediaplayer integrated")
    DEFINES += MEDIAPLAYER_ST7105
    HEADERS += $$PWD/mediaplayerST7105.h
    SOURCES += $$PWD/mediaplayerST7105.cpp
} else: ST7108 {
    message("ST7108 mediaplayer integrated")
    DEFINES += MEDIAPLAYER_ST7108
    HEADERS += $$PWD/mediaplayerST7108.h
    SOURCES += $$PWD/mediaplayerST7108.cpp
} else: ST7540 {
    message("ST7540 mediaplayer integrated")
    DEFINES += MEDIAPLAYER_ST7540
    HEADERS += $$PWD/mediaplayerST7540.h
    SOURCES += $$PWD/mediaplayerST7540.cpp
} else: TRIDENT_SHINER_GSTTSPLAYER {
    message("Tridents Shiner's GstTsPlayer mediaplayer integrated")
    DEFINES += MEDIAPLAYER_TRIDENT_SHINER_GSTTSPLAYER
    HEADERS += $$PWD/mediaplayerTridentShinerGstTsPlayer.h
    SOURCES += $$PWD/mediaplayerTridentShinerGstTsPlayer.cpp
} else: TRIDENT_SHINER_MINIPLAYER {
    message("Tridents Shiner's miniplayer mediaplayer integrated")
    DEFINES += MEDIAPLAYER_TRIDENT_SHINER_MINIPLAYER
    HEADERS += $$PWD/mediaplayerTridentShinerMiniplayer.h
    SOURCES += $$PWD/mediaplayerTridentShinerMiniplayer.cpp
} else:!no-dbus {
    DEFINES += MEDIAPLAYER_DBUS
    HEADERS += $$PWD/mediaplayerdbus.h
} else {
    HEADERS += $$PWD/mediaplayerdummy.h
}

vlc {
    DEFINES += MEDIAPLAYER_VLC
    HEADERS += $$PWD/mediaplayervlc.h
    SOURCES += $$PWD/mediaplayervlc.cpp
    LIBS += -lvlc
} else: 7425 {
message("7425 mediaplayer integrated")
    DEFINES += MEDIAPLAYER_7425
    HEADERS += $$PWD/mediaplayer7425.h
    SOURCES += $$PWD/mediaplayer7425.cpp
} else: ST7105 {
    message("ST7105 mediaplayer integrated")
    DEFINES += MEDIAPLAYER_ST7105
    HEADERS += $$PWD/mediaplayerST7105.h
    SOURCES += $$PWD/mediaplayerST7105.cpp
} else: ST7108 {
    message("ST7108 mediaplayer integrated")
    DEFINES += MEDIAPLAYER_ST7108
    HEADERS += $$PWD/mediaplayerST7108.h
    SOURCES += $$PWD/mediaplayerST7108.cpp
} else: ST7540 {
    message("ST7540 mediaplayer integrated")
    DEFINES += MEDIAPLAYER_ST7540
    HEADERS += $$PWD/mediaplayerST7540.h
    SOURCES += $$PWD/mediaplayerST7540.cpp
} else: TRIDENT_SHINER_GSTTSPLAYER {
    message("Tridents Shiner's GstTsPlayer mediaplayer integrated")
    DEFINES += MEDIAPLAYER_TRIDENT_SHINER_GSTTSPLAYER
    HEADERS += $$PWD/mediaplayerTridentShinerGstTsPlayer.h
    SOURCES += $$PWD/mediaplayerTridentShinerGstTsPlayer.cpp
} else: TRIDENT_SHINER_MINIPLAYER {
    message("Tridents Shiner's miniplayer mediaplayer integrated")
    DEFINES += MEDIAPLAYER_TRIDENT_SHINER_MINIPLAYER
    HEADERS += $$PWD/mediaplayerTridentShinerMiniplayer.h
    SOURCES += $$PWD/mediaplayerTridentShinerMiniplayer.cpp
} else:!no-dbus {
    DEFINES += MEDIAPLAYER_DBUS
    HEADERS += $$PWD/mediaplayerdbus.h
} else {
    HEADERS += mediaplayerdummy.h
}