Fix build with new qmake & vs2019

Fix build with new qmake & vs2019

VERSION = $$cat(version.txt)

PRODUCT_VERSION = $$(PRODUCT_VERSION)
BUILD_NUMBER = $$(BUILD_NUMBER)

!isEmpty(PRODUCT_VERSION){
    !isEmpty(BUILD_NUMBER){
        VERSION = $${PRODUCT_VERSION}.$${BUILD_NUMBER}
    }
}

DEFINES += INTVER=$$VERSION

PUBLISHER_NAME = $$(PUBLISHER_NAME)
isEmpty(PUBLISHER_NAME){
    PUBLISHER_NAME = $$cat(copyright.txt)
}

OO_BUILD_BRANDING = $$(OO_BRANDING)
OO_DESTDIR_BUILD_OVERRIDE = $$(DESTDIR_BUILD_OVERRIDE)

win32 {
    CURRENT_YEAR = $$system(wmic PATH Win32_LocalTime GET ^Year /FORMAT:VALUE | find \"=\")
    CURRENT_YEAR = $$replace(CURRENT_YEAR, "Year=", "")
    CURRENT_YEAR = $$replace(CURRENT_YEAR, "\r", "")
    CURRENT_YEAR = $$replace(CURRENT_YEAR, "\n", "")
    CURRENT_YEAR = $$replace(CURRENT_YEAR, "\t", "")
}

!win32 {
    CURRENT_YEAR = $$system(date +%Y)
}

QMAKE_TARGET_COMPANY = $$PUBLISHER_NAME
QMAKE_TARGET_COPYRIGHT = Copyright (C) $${PUBLISHER_NAME} $${CURRENT_YEAR}. All rights reserved

# CONFIGURATION
CONFIG(debug, debug|release) {
    CONFIG += core_debug
}
force_debug_info:CONFIG += core_debug
!core_debug:CONFIG += core_release

not_use_dynamic_libs {
shared {
    CONFIG -= shared
    CONFIG -= plugin
    CONFIG += staticlib
}
}

#PLATFORM
win32 {
    CONFIG += core_windows

    WINDOWS_VERSION_XP = $$(WINDOWS_VERSION_XP)
    !isEmpty(WINDOWS_VERSION_XP) {
        CONFIG += build_xp
        message(xp using)
    }
}

DST_ARCH=$$QMAKE_TARGET.arch
isEqual(QT_MAJOR_VERSION, 5) {
    DST_ARCH=$$QT_ARCH
    # QT_ARCH uses 'i386' instead of 'x86',
    # so map that value back to what we expect.
    equals(DST_ARCH, i386) {
        DST_ARCH=x86
    }
}

ios {
    CONFIG += core_ios
    DEFINES += _IOS IOS LINUX _LINUX MAC _MAC _XCODE _ARM_ALIGN_
}
android {
    CONFIG += core_android
    DEFINES += __ANDROID__ LINUX _LINUX _ARM_ALIGN_
}

win32:contains(QMAKE_TARGET.arch, x86_64): {
    CONFIG += core_win_64
}
win32:!contains(QMAKE_TARGET.arch, x86_64): {
    CONFIG += core_win_32
}

linux-g++ {
    CONFIG += core_linux
linux-g++:contains(QMAKE_HOST.arch, x86_64): {
    message("linux-64")
    CONFIG += core_linux_64
}
linux-g++:!contains(QMAKE_HOST.arch, x86_64): {
    message("linux-32")
    CONFIG += core_linux_32
}
linux-g++:contains(DST_ARCH, arm): {
    message("arm")
    CONFIG += core_linux_arm
    DEFINES += LINUX_ARM
}
}

linux-g++-64 {
    message("linux-64")
    CONFIG += core_linux
    CONFIG += core_linux_64
}
linux-g++-32 {
    message("linux-32")
    CONFIG += core_linux
    CONFIG += core_linux_32
}

mac {
    !core_ios {
        CONFIG += core_mac
        CONFIG += core_mac_64
    }
}

# DEFINES
core_windows {
    DEFINES += WIN32 _WIN32
    DEFINES += NOMINMAX
}
core_win_64 {
    DEFINES += WIN64 _WIN64
}

core_linux {
    DEFINES += LINUX _LINUX
}

core_mac {
    DEFINES += LINUX _LINUX MAC _MAC
    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
    QMAKE_LFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH

    QMAKE_CFLAGS += "-Wno-implicit-function-declaration"

    greaterThan(QT_MAJOR_VERSION, 5) {
        QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
        !apple_silicon:QMAKE_APPLE_DEVICE_ARCHS = x86_64
    }
}

# PREFIXES
core_windows {
    CONFIG -= debug_and_release debug_and_release_target
    QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
    QMAKE_CXXFLAGS -= -Zc:strictStrings
    QMAKE_CXXFLAGS += /MP

    vs2019 {
        QMAKE_CXXFLAGS_RELEASE -= -permissive-
        QMAKE_CXXFLAGS -= -permissive-
    }

    DEFINES += WINDOWS_IGNORE_PACKING_MISMATCH

    OO_WINDOWS_IGNORE_PACKING_MISMATCH = $$(OO_WINDOWS_IGNORE_PACKING_MISMATCH)
    isEqual(OO_WINDOWS_IGNORE_PACKING_MISMATCH, 1):QMAKE_CXXFLAGS -= /Zp

    equals(TEMPLATE, app) {
        console {
            core_win_64:QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.02
            core_win_32:QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.01
        } else {
            core_win_64:QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.02
            core_win_32:QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.01
        }
    }
}

core_linux {
    equals(TEMPLATE, app) {
        QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN\'"
        QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN/system\'"
        QMAKE_LFLAGS += -Wl,--disable-new-dtags
    }
}

core_win_32 {
    CORE_BUILDS_PLATFORM_PREFIX = win_32
}
core_win_64 {
    CORE_BUILDS_PLATFORM_PREFIX = win_64
}
core_linux_32 {
    CORE_BUILDS_PLATFORM_PREFIX = linux_32
}
core_linux_64 {
    CORE_BUILDS_PLATFORM_PREFIX = linux_64
}
core_mac_64 {
    CORE_BUILDS_PLATFORM_PREFIX = mac_64

    apple_silicon {
        CORE_BUILDS_PLATFORM_PREFIX = mac_arm64
        QMAKE_APPLE_DEVICE_ARCHS = arm64
    }
}
core_linux_arm {
    CORE_BUILDS_PLATFORM_PREFIX = arm
}
core_ios {
    CORE_BUILDS_PLATFORM_PREFIX = ios

    CONFIG(iphonesimulator, iphoneos|iphonesimulator): {
        message("iphonesimulator")
        CORE_BUILDS_PLATFORM_PREFIX = ios_simulator
    } else {

        QMAKE_IOS_DEPLOYMENT_TARGET = 10.0
        CONFIG += core_ios_main_arch

        QMAKE_CFLAGS += -fembed-bitcode
        QMAKE_CXXFLAGS += -fembed-bitcode
        QMAKE_LFLAGS += -fembed-bitcode

        core_ios_main_arch {
            QMAKE_APPLE_DEVICE_ARCHS = arm64
            core_ios_no_simulator_arch : QMAKE_APPLE_SIMULATOR_ARCHS=

            !core_ios_no_32 {
                QMAKE_APPLE_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS armv7
            }
        } else {
            plugin : TARGET = $$join(TARGET, TARGET, "", "_addition")
            QMAKE_APPLE_DEVICE_ARCHS=
            QMAKE_APPLE_SIMULATOR_ARCHS=
        }

        core_ios_nomain_arch {
            QMAKE_APPLE_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS arm64e
            !core_ios_no_32 {
                QMAKE_APPLE_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS armv7s
            }
        }

        !no_verify_bitcode {
            # for application: (using xcodebuild)
            #Q_ENABLE_BITCODE.name = ENABLE_BITCODE
            #Q_ENABLE_BITCODE.value = NO
            #
            #Q_BITCODE_GENERATION_MODE.name = BITCODE_GENERATION_MODE
            #Q_BITCODE_GENERATION_MODE.value = marker
            #
            #QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_BITCODE
            #QMAKE_MAC_XCODE_SETTINGS += Q_BITCODE_GENERATION_MODE

            # for libraries
            !core_debug {
                QMAKE_LFLAGS += -Xlinker -bitcode_verify
                QMAKE_LFLAGS += -Xlinker -bitcode_hide_symbols
                #QMAKE_LFLAGS += -Xlinker -bitcode_symbol_map -Xlinker $$CORE_BUILDS_LIBRARIES_PATH
            }
        }
    }

    !core_ios_no_unistd {
        DEFINES += HAVE_UNISTD_H HAVE_FCNTL_H
    }
}

core_android {
    CORE_BUILDS_PLATFORM_PREFIX = $$join(ANDROID_TARGET_ARCH, ANDROID_TARGET_ARCH, "android_", "")
    CORE_BUILDS_PLATFORM_PREFIX = $$replace(CORE_BUILDS_PLATFORM_PREFIX, "-", "_")
    CORE_BUILDS_PLATFORM_PREFIX = $$replace(CORE_BUILDS_PLATFORM_PREFIX, "armeabi_v7", "armv7")
    CORE_BUILDS_PLATFORM_PREFIX = $$replace(CORE_BUILDS_PLATFORM_PREFIX, "armv7a", "armv7")

    !isEmpty(OO_DESTDIR_BUILD_OVERRIDE) {
        isEqual(CORE_BUILDS_PLATFORM_PREFIX, android_arm64_v8a):OO_DESTDIR_BUILD_OVERRIDE=$$OO_DESTDIR_BUILD_OVERRIDE/arm64-v8a
        isEqual(CORE_BUILDS_PLATFORM_PREFIX, android_armv7):OO_DESTDIR_BUILD_OVERRIDE=$$OO_DESTDIR_BUILD_OVERRIDE/armeabi-v7a
        isEqual(CORE_BUILDS_PLATFORM_PREFIX, android_x86):OO_DESTDIR_BUILD_OVERRIDE=$$OO_DESTDIR_BUILD_OVERRIDE/x86
        isEqual(CORE_BUILDS_PLATFORM_PREFIX, android_x86_64):OO_DESTDIR_BUILD_OVERRIDE=$$OO_DESTDIR_BUILD_OVERRIDE/x86_64
    }

    core_debug {
        QMAKE_LFLAGS += -Wl,--build-id=sha1
    }

    !core_android_no_unistd {
        DEFINES += HAVE_UNISTD_H HAVE_FCNTL_H
    }
}

core_debug {
    CORE_BUILDS_CONFIGURATION_PREFIX    = debug
}
core_release {
    CORE_BUILDS_CONFIGURATION_PREFIX    = release
}

# MESSAGE
message($$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX)

# COMPILER
CONFIG += c++11

greaterThan(QT_MAJOR_VERSION, 5) {
    !core_windows {
        QMAKE_CXXFLAGS += -Wno-register
        QMAKE_CFLAGS += -Wno-register
    }
}

core_linux {
core_static_link_libstd {
    QMAKE_LFLAGS += -static-libstdc++ -static-libgcc
    message(core_static_link_libstd)
}
plugin {
    QMAKE_CXXFLAGS += -fvisibility=hidden
    QMAKE_CFLAGS += -fvisibility=hidden

    TARGET_EXT = .so
}
}

core_mac {
plugin {
    QMAKE_CXXFLAGS += -fvisibility=hidden
    QMAKE_CFLAGS += -fvisibility=hidden
}
}

core_windows {
plugin {
    TARGET_EXT = .dll
}
}

core_disable_all_warnings {
    CONFIG += warn_off
}

# BUILD_PATHS
# MUST BE DEFINED CORE_ROOT_DIR
!core_no_dst {
DESTDIR     = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX
OBJECTS_DIR = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/obj
MOC_DIR     = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/moc
RCC_DIR     = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/rcc
UI_DIR      = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/ui
build_xp {
    OBJECTS_DIR = $$OBJECTS_DIR/xp
    MOC_DIR     = $$MOC_DIR/xp
    RCC_DIR     = $$RCC_DIR/xp
    UI_DIR      = $$UI_DIR/xp
}
}

CORE_BUILDS_LIBRARIES_PATH = $$CORE_ROOT_DIR/build/lib/$$CORE_BUILDS_PLATFORM_PREFIX
CORE_BUILDS_BINARY_PATH = $$CORE_ROOT_DIR/build/bin/$$CORE_BUILDS_PLATFORM_PREFIX

!isEmpty(OO_BUILD_BRANDING) {
    CORE_BUILDS_LIBRARIES_PATH = $$CORE_ROOT_DIR/build/$$OO_BUILD_BRANDING/lib/$$CORE_BUILDS_PLATFORM_PREFIX
    CORE_BUILDS_BINARY_PATH = $$CORE_ROOT_DIR/build/$$OO_BUILD_BRANDING/bin/$$CORE_BUILDS_PLATFORM_PREFIX
}

core_debug {
    CORE_BUILDS_LIBRARIES_PATH = $$CORE_BUILDS_LIBRARIES_PATH/debug
    CORE_BUILDS_BINARY_PATH = $$CORE_BUILDS_BINARY_PATH/debug
}

!isEmpty(OO_DESTDIR_BUILD_OVERRIDE) {
    CORE_BUILDS_LIBRARIES_PATH = $$OO_DESTDIR_BUILD_OVERRIDE
    CORE_BUILDS_BINARY_PATH = $$OO_DESTDIR_BUILD_OVERRIDE
}

plugin {
    DESTDIR = $$CORE_BUILDS_LIBRARIES_PATH
}
staticlib {
    DESTDIR = $$CORE_BUILDS_LIBRARIES_PATH
}

core_x2t {
core_windows {
    QMAKE_CXXFLAGS += /bigobj
} else {
    QMAKE_CXXFLAGS += -Wall -Wno-ignored-qualifiers
}

DEFINES += CRYPTOPP_DISABLE_ASM
}

core_ios:CONFIG+=support_bundle_dylibs

!support_bundle_dylibs:CONFIG-=bundle_dylibs

core_ios {
    bundle_dylibs {
        plugin {
            CONFIG -= plugin
            CONFIG += lib_bundle

            QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/
            #QMAKE_LFLAGS += -Xlinker -rpath -Xlinker @executable_path/Frameworks
            #QMAKE_LFLAGS += -Xlinker -rpath -Xlinker @loader_path/Frameworks

            # correct version to < 256
            VERSIONS = $$split(VERSION, ".")
            VERSION_1 = $$member(VERSIONS, 0)
            VERSION_2 = $$member(VERSIONS, 1)
            VERSION_3 = $$member(VERSIONS, 2)
            VERSION_4 = $$member(VERSIONS, 3)

            greaterThan(VERSION_1, 255): VERSION_1 = 255
            greaterThan(VERSION_2, 255): VERSION_2 = 255
            greaterThan(VERSION_3, 255): VERSION_3 = 255
            greaterThan(VERSION_4, 255): VERSION_4 = 255

            VERSION_CORRECT = $$VERSION_1
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_2)
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_3)
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_4)

            VERSION = $$VERSION_CORRECT
        }
    }
}

defineTest(ADD_DEPENDENCY) {
    libs = $$ARGS
    for(lib, libs) {
        CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH
        build_xp {
            isEqual(lib, doctrenderer):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
            isEqual(lib, ascdocumentscore):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
            isEqual(lib, videoplayer):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
            isEqual(lib, ooxmlsignature):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
        }
        !bundle_dylibs:LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH_DST -l$$lib
        bundle_dylibs:LIBS += -F$$CORE_BUILDS_LIBRARIES_PATH_DST -framework $$lib
    }
    export(LIBS)
}

ADD_INC_PATH = $$(ADDITIONAL_INCLUDE_PATH)
!isEmpty(ADD_INC_PATH):INCLUDEPATH += $$ADD_INC_PATH

VERSION = $$cat(version.txt)

PRODUCT_VERSION = $$(PRODUCT_VERSION)
BUILD_NUMBER = $$(BUILD_NUMBER)

!isEmpty(PRODUCT_VERSION){
    !isEmpty(BUILD_NUMBER){
        VERSION = $${PRODUCT_VERSION}.$${BUILD_NUMBER}
    }
}

DEFINES += INTVER=$$VERSION

PUBLISHER_NAME = $$(PUBLISHER_NAME)
isEmpty(PUBLISHER_NAME){
    PUBLISHER_NAME = $$cat(copyright.txt)
}

OO_BUILD_BRANDING = $$(OO_BRANDING)
OO_DESTDIR_BUILD_OVERRIDE = $$(DESTDIR_BUILD_OVERRIDE)

win32 {
    CURRENT_YEAR = $$system(wmic PATH Win32_LocalTime GET ^Year /FORMAT:VALUE | find \"=\")
    CURRENT_YEAR = $$replace(CURRENT_YEAR, "Year=", "")
    CURRENT_YEAR = $$replace(CURRENT_YEAR, "\r", "")
    CURRENT_YEAR = $$replace(CURRENT_YEAR, "\n", "")
    CURRENT_YEAR = $$replace(CURRENT_YEAR, "\t", "")
}

!win32 {
    CURRENT_YEAR = $$system(date +%Y)
}

QMAKE_TARGET_COMPANY = $$PUBLISHER_NAME
QMAKE_TARGET_COPYRIGHT = Copyright (C) $${PUBLISHER_NAME} $${CURRENT_YEAR}. All rights reserved

# CONFIGURATION
CONFIG(debug, debug|release) {
    CONFIG += core_debug
}
force_debug_info:CONFIG += core_debug
!core_debug:CONFIG += core_release

not_use_dynamic_libs {
shared {
    CONFIG -= shared
    CONFIG -= plugin
    CONFIG += staticlib
}
}

#PLATFORM
win32 {
    CONFIG += core_windows

    WINDOWS_VERSION_XP = $$(WINDOWS_VERSION_XP)
    !isEmpty(WINDOWS_VERSION_XP) {
        CONFIG += build_xp
        message(xp using)
    }
}

DST_ARCH=$$QMAKE_TARGET.arch
isEqual(QT_MAJOR_VERSION, 5) {
    DST_ARCH=$$QT_ARCH
    # QT_ARCH uses 'i386' instead of 'x86',
    # so map that value back to what we expect.
    equals(DST_ARCH, i386) {
        DST_ARCH=x86
    }
}

ios {
    CONFIG += core_ios
    DEFINES += _IOS IOS LINUX _LINUX MAC _MAC _XCODE _ARM_ALIGN_
}
android {
    CONFIG += core_android
    DEFINES += __ANDROID__ LINUX _LINUX _ARM_ALIGN_
}

win32:contains(QMAKE_TARGET.arch, x86_64): {
    CONFIG += core_win_64
}
win32:!contains(QMAKE_TARGET.arch, x86_64): {
    CONFIG += core_win_32
}

linux-g++ {
    CONFIG += core_linux
linux-g++:contains(QMAKE_HOST.arch, x86_64): {
    message("linux-64")
    CONFIG += core_linux_64
}
linux-g++:!contains(QMAKE_HOST.arch, x86_64): {
    message("linux-32")
    CONFIG += core_linux_32
}
linux-g++:contains(DST_ARCH, arm): {
    message("arm")
    CONFIG += core_linux_arm
    DEFINES += LINUX_ARM
}
}

linux-g++-64 {
    message("linux-64")
    CONFIG += core_linux
    CONFIG += core_linux_64
}
linux-g++-32 {
    message("linux-32")
    CONFIG += core_linux
    CONFIG += core_linux_32
}

mac {
    !core_ios {
        CONFIG += core_mac
        CONFIG += core_mac_64
    }
}

# DEFINES
core_windows {
    DEFINES += WIN32 _WIN32
    DEFINES += NOMINMAX
}
core_win_64 {
    DEFINES += WIN64 _WIN64
}

core_linux {
    DEFINES += LINUX _LINUX
}

core_mac {
    DEFINES += LINUX _LINUX MAC _MAC
    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
    QMAKE_LFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH

    QMAKE_CFLAGS += "-Wno-implicit-function-declaration"

    greaterThan(QT_MAJOR_VERSION, 5) {
        QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
        !apple_silicon:QMAKE_APPLE_DEVICE_ARCHS = x86_64
    }
}

# PREFIXES
core_windows {
    CONFIG -= debug_and_release debug_and_release_target
    QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
    QMAKE_CXXFLAGS -= -Zc:strictStrings
    QMAKE_CXXFLAGS += /MP
    DEFINES += WINDOWS_IGNORE_PACKING_MISMATCH

    OO_WINDOWS_IGNORE_PACKING_MISMATCH = $$(OO_WINDOWS_IGNORE_PACKING_MISMATCH)
    isEqual(OO_WINDOWS_IGNORE_PACKING_MISMATCH, 1):QMAKE_CXXFLAGS -= /Zp

    equals(TEMPLATE, app) {
        console {
            core_win_64:QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.02
            core_win_32:QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.01
        } else {
            core_win_64:QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.02
            core_win_32:QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.01
        }
    }
}

core_linux {
    equals(TEMPLATE, app) {
        QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN\'"
        QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN/system\'"
        QMAKE_LFLAGS += -Wl,--disable-new-dtags
    }
}

core_win_32 {
    CORE_BUILDS_PLATFORM_PREFIX = win_32
}
core_win_64 {
    CORE_BUILDS_PLATFORM_PREFIX = win_64
}
core_linux_32 {
    CORE_BUILDS_PLATFORM_PREFIX = linux_32
}
core_linux_64 {
    CORE_BUILDS_PLATFORM_PREFIX = linux_64
}
core_mac_64 {
    CORE_BUILDS_PLATFORM_PREFIX = mac_64

    apple_silicon {
        CORE_BUILDS_PLATFORM_PREFIX = mac_arm64
        QMAKE_APPLE_DEVICE_ARCHS = arm64
    }
}
core_linux_arm {
    CORE_BUILDS_PLATFORM_PREFIX = arm
}
core_ios {
    CORE_BUILDS_PLATFORM_PREFIX = ios

    CONFIG(iphonesimulator, iphoneos|iphonesimulator): {
        message("iphonesimulator")
        CORE_BUILDS_PLATFORM_PREFIX = ios_simulator
    } else {

        QMAKE_IOS_DEPLOYMENT_TARGET = 10.0
        CONFIG += core_ios_main_arch

        QMAKE_CFLAGS += -fembed-bitcode
        QMAKE_CXXFLAGS += -fembed-bitcode
        QMAKE_LFLAGS += -fembed-bitcode

        core_ios_main_arch {
            QMAKE_APPLE_DEVICE_ARCHS = arm64
            core_ios_no_simulator_arch : QMAKE_APPLE_SIMULATOR_ARCHS=

            !core_ios_no_32 {
                QMAKE_APPLE_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS armv7
            }
        } else {
            plugin : TARGET = $$join(TARGET, TARGET, "", "_addition")
            QMAKE_APPLE_DEVICE_ARCHS=
            QMAKE_APPLE_SIMULATOR_ARCHS=
        }

        core_ios_nomain_arch {
            QMAKE_APPLE_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS arm64e
            !core_ios_no_32 {
                QMAKE_APPLE_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS armv7s
            }
        }

        !no_verify_bitcode {
            # for application: (using xcodebuild)
            #Q_ENABLE_BITCODE.name = ENABLE_BITCODE
            #Q_ENABLE_BITCODE.value = NO
            #
            #Q_BITCODE_GENERATION_MODE.name = BITCODE_GENERATION_MODE
            #Q_BITCODE_GENERATION_MODE.value = marker
            #
            #QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_BITCODE
            #QMAKE_MAC_XCODE_SETTINGS += Q_BITCODE_GENERATION_MODE

            # for libraries
            !core_debug {
                QMAKE_LFLAGS += -Xlinker -bitcode_verify
                QMAKE_LFLAGS += -Xlinker -bitcode_hide_symbols
                #QMAKE_LFLAGS += -Xlinker -bitcode_symbol_map -Xlinker $$CORE_BUILDS_LIBRARIES_PATH
            }
        }
    }

    !core_ios_no_unistd {
        DEFINES += HAVE_UNISTD_H HAVE_FCNTL_H
    }
}

core_android {
    CORE_BUILDS_PLATFORM_PREFIX = $$join(ANDROID_TARGET_ARCH, ANDROID_TARGET_ARCH, "android_", "")
    CORE_BUILDS_PLATFORM_PREFIX = $$replace(CORE_BUILDS_PLATFORM_PREFIX, "-", "_")
    CORE_BUILDS_PLATFORM_PREFIX = $$replace(CORE_BUILDS_PLATFORM_PREFIX, "armeabi_v7", "armv7")
    CORE_BUILDS_PLATFORM_PREFIX = $$replace(CORE_BUILDS_PLATFORM_PREFIX, "armv7a", "armv7")

    !isEmpty(OO_DESTDIR_BUILD_OVERRIDE) {
        isEqual(CORE_BUILDS_PLATFORM_PREFIX, android_arm64_v8a):OO_DESTDIR_BUILD_OVERRIDE=$$OO_DESTDIR_BUILD_OVERRIDE/arm64-v8a
        isEqual(CORE_BUILDS_PLATFORM_PREFIX, android_armv7):OO_DESTDIR_BUILD_OVERRIDE=$$OO_DESTDIR_BUILD_OVERRIDE/armeabi-v7a
        isEqual(CORE_BUILDS_PLATFORM_PREFIX, android_x86):OO_DESTDIR_BUILD_OVERRIDE=$$OO_DESTDIR_BUILD_OVERRIDE/x86
        isEqual(CORE_BUILDS_PLATFORM_PREFIX, android_x86_64):OO_DESTDIR_BUILD_OVERRIDE=$$OO_DESTDIR_BUILD_OVERRIDE/x86_64
    }

    core_debug {
        QMAKE_LFLAGS += -Wl,--build-id=sha1
    }

    !core_android_no_unistd {
        DEFINES += HAVE_UNISTD_H HAVE_FCNTL_H
    }
}

core_debug {
    CORE_BUILDS_CONFIGURATION_PREFIX    = debug
}
core_release {
    CORE_BUILDS_CONFIGURATION_PREFIX    = release
}

# MESSAGE
message($$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX)

# COMPILER
CONFIG += c++11

greaterThan(QT_MAJOR_VERSION, 5) {
    QMAKE_CXXFLAGS += -Wno-register
    QMAKE_CFLAGS += -Wno-register
}

core_linux {
core_static_link_libstd {
    QMAKE_LFLAGS += -static-libstdc++ -static-libgcc
    message(core_static_link_libstd)
}
plugin {
    QMAKE_CXXFLAGS += -fvisibility=hidden
    QMAKE_CFLAGS += -fvisibility=hidden

    TARGET_EXT = .so
}
}

core_mac {
plugin {
    QMAKE_CXXFLAGS += -fvisibility=hidden
    QMAKE_CFLAGS += -fvisibility=hidden
}
}

core_windows {
plugin {
    TARGET_EXT = .dll
}
}

core_disable_all_warnings {
    CONFIG += warn_off
}

# BUILD_PATHS
# MUST BE DEFINED CORE_ROOT_DIR
!core_no_dst {
DESTDIR     = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX
OBJECTS_DIR = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/obj
MOC_DIR     = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/moc
RCC_DIR     = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/rcc
UI_DIR      = $$PWD_ROOT_DIR/core_build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/ui
build_xp {
    OBJECTS_DIR = $$OBJECTS_DIR/xp
    MOC_DIR     = $$MOC_DIR/xp
    RCC_DIR     = $$RCC_DIR/xp
    UI_DIR      = $$UI_DIR/xp
}
}

CORE_BUILDS_LIBRARIES_PATH = $$CORE_ROOT_DIR/build/lib/$$CORE_BUILDS_PLATFORM_PREFIX
CORE_BUILDS_BINARY_PATH = $$CORE_ROOT_DIR/build/bin/$$CORE_BUILDS_PLATFORM_PREFIX

!isEmpty(OO_BUILD_BRANDING) {
    CORE_BUILDS_LIBRARIES_PATH = $$CORE_ROOT_DIR/build/$$OO_BUILD_BRANDING/lib/$$CORE_BUILDS_PLATFORM_PREFIX
    CORE_BUILDS_BINARY_PATH = $$CORE_ROOT_DIR/build/$$OO_BUILD_BRANDING/bin/$$CORE_BUILDS_PLATFORM_PREFIX
}

core_debug {
    CORE_BUILDS_LIBRARIES_PATH = $$CORE_BUILDS_LIBRARIES_PATH/debug
    CORE_BUILDS_BINARY_PATH = $$CORE_BUILDS_BINARY_PATH/debug
}

!isEmpty(OO_DESTDIR_BUILD_OVERRIDE) {
    CORE_BUILDS_LIBRARIES_PATH = $$OO_DESTDIR_BUILD_OVERRIDE
    CORE_BUILDS_BINARY_PATH = $$OO_DESTDIR_BUILD_OVERRIDE
}

plugin {
    DESTDIR = $$CORE_BUILDS_LIBRARIES_PATH
}
staticlib {
    DESTDIR = $$CORE_BUILDS_LIBRARIES_PATH
}

core_x2t {
core_windows {
    QMAKE_CXXFLAGS += /bigobj
} else {
    QMAKE_CXXFLAGS += -Wall -Wno-ignored-qualifiers
}

DEFINES += CRYPTOPP_DISABLE_ASM
}

core_ios:CONFIG+=support_bundle_dylibs

!support_bundle_dylibs:CONFIG-=bundle_dylibs

core_ios {
    bundle_dylibs {
        plugin {
            CONFIG -= plugin
            CONFIG += lib_bundle

            QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/
            #QMAKE_LFLAGS += -Xlinker -rpath -Xlinker @executable_path/Frameworks
            #QMAKE_LFLAGS += -Xlinker -rpath -Xlinker @loader_path/Frameworks

            # correct version to < 256
            VERSIONS = $$split(VERSION, ".")
            VERSION_1 = $$member(VERSIONS, 0)
            VERSION_2 = $$member(VERSIONS, 1)
            VERSION_3 = $$member(VERSIONS, 2)
            VERSION_4 = $$member(VERSIONS, 3)

            greaterThan(VERSION_1, 255): VERSION_1 = 255
            greaterThan(VERSION_2, 255): VERSION_2 = 255
            greaterThan(VERSION_3, 255): VERSION_3 = 255
            greaterThan(VERSION_4, 255): VERSION_4 = 255

            VERSION_CORRECT = $$VERSION_1
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_2)
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_3)
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
            VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_4)

            VERSION = $$VERSION_CORRECT
        }
    }
}

defineTest(ADD_DEPENDENCY) {
    libs = $$ARGS
    for(lib, libs) {
        CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH
        build_xp {
            isEqual(lib, doctrenderer):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
            isEqual(lib, ascdocumentscore):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
            isEqual(lib, videoplayer):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
            isEqual(lib, ooxmlsignature):CORE_BUILDS_LIBRARIES_PATH_DST=$$CORE_BUILDS_LIBRARIES_PATH/xp
        }
        !bundle_dylibs:LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH_DST -l$$lib
        bundle_dylibs:LIBS += -F$$CORE_BUILDS_LIBRARIES_PATH_DST -framework $$lib
    }
    export(LIBS)
}

ADD_INC_PATH = $$(ADDITIONAL_INCLUDE_PATH)
!isEmpty(ADD_INC_PATH):INCLUDEPATH += $$ADD_INC_PATH


INSTALLS target for Windows.

INSTALLS target for Windows.

win32 {
    target.path = /
    INSTALLS *= target
} else: osx {
    target.path = /
    #INSTALLS *= target
} else: ios {
} else: android {
} else: linux {
    # Set the rpath, otherwise we can't load the client applications without changing LD_LIBRARY_PATH
    QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,\$\$ORIGIN\'

    target.path = /opt/glimpse
    INSTALLS *= target
} else {
    error(No distribution for this platform defined)
}

# Setup universal translations
trs.path = $${target.path}/locales

for(locale, TRANSLATIONS) {
    qmfile = $$locale
    qmfile ~= s/\.ts/.qm/i

    trs.files += qmfile

    # Add only once but don't add if we don't run in the loop
    # otherwise make will throw errors
    INSTALLS *= trs
}

win32 {
} else: osx {
    target.path = /
    #INSTALLS *= target
} else: ios {
} else: android {
} else: linux {
    # Set the rpath, otherwise we can't load the client applications without changing LD_LIBRARY_PATH
    QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,\$\$ORIGIN\'

    target.path = /opt/glimpse
    INSTALLS *= target
} else {
    error(No distribution for this platform defined)
}

# Setup universal translations
trs.path = $${target.path}/locales

for(locale, TRANSLATIONS) {
    qmfile = $$locale
    qmfile ~= s/\.ts/.qm/i

    trs.files += qmfile

    # Add only once but don't add if we don't run in the loop
    # otherwise make will throw errors
    INSTALLS *= trs
}


Version 9.22

Version 9.22


Version 0.1.15

Version 0.1.15


Version 0.106

Version 0.106


Version 1.9

Version 1.9


Pumped up version.

Pumped up version.


Copy files in right place

Copy files in right place

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

#
#-- Depends on gstreamer, which can be found at: http://gstreamer.freedesktop.org/download/
#

LinuxBuild {
    CONFIG += link_pkgconfig
    packagesExist(gstreamer-1.0) {
        PKGCONFIG   += gstreamer-1.0  gstreamer-video-1.0
        CONFIG      += VideoEnabled
    }
} else:MacBuild {
    #- gstreamer framework installed by the gstreamer devel installer
    GST_ROOT = /Library/Frameworks/GStreamer.framework
    exists($$GST_ROOT) {
        CONFIG      += VideoEnabled
        INCLUDEPATH += $$GST_ROOT/Headers
        LIBS        += -F/Library/Frameworks -framework GStreamer
    }
} else:iOSBuild {
    #- gstreamer framework installed by the gstreamer iOS SDK installer (default to home directory)
    GST_ROOT = $$(HOME)/Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework
    exists($$GST_ROOT) {
        CONFIG      += VideoEnabled
        INCLUDEPATH += $$GST_ROOT/Headers
        LIBS        += -F$$(HOME)/Library/Developer/GStreamer/iPhone.sdk -framework GStreamer -liconv -lresolv
    }
} else:WindowsBuild {
    #- gstreamer installed by default under c:/gstreamer
    GST_ROOT = c:/gstreamer/1.0/x86
    exists($$GST_ROOT) {
        CONFIG      += VideoEnabled
        LIBS        += -L$$GST_ROOT/lib/gstreamer-1.0/static -lgstreamer-1.0 -lgstvideo-1.0 -lgstbase-1.0
        LIBS        += -L$$GST_ROOT/lib -lglib-2.0 -lintl -lgobject-2.0
        INCLUDEPATH += \
            $$GST_ROOT/include/gstreamer-1.0 \
            $$GST_ROOT/include/glib-2.0 \
            $$GST_ROOT/lib/gstreamer-1.0/include \
            $$GST_ROOT/lib/glib-2.0/include
        COPY_FILE_LIST = \
            $$GST_ROOT\\bin\\libffi-6.dll \
            $$GST_ROOT\\bin\\libglib-2.0-0.dll \
            $$GST_ROOT\\bin\\libgmodule-2.0-0.dll \
            $$GST_ROOT\\bin\\libgobject-2.0-0.dll \
            $$GST_ROOT\\bin\\libgstbase-1.0-0.dll \
            $$GST_ROOT\\bin\\libgstreamer-1.0-0.dll \
            $$GST_ROOT\\bin\\libgstvideo-1.0-0.dll \
            $$GST_ROOT\\bin\\libintl-8.dll \
            $$GST_ROOT\\bin\\liborc-0.4-0.dll \
            $$GST_ROOT\\bin\\libwinpthread-1.dll \
        DESTDIR_WIN = $$replace(DESTDIR, "/", "\\")
        for(COPY_FILE, COPY_FILE_LIST) {
            QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR_WIN\"
        }
        QMAKE_POST_LINK += $$escape_expand(\\n)
    }
} else:AndroidBuild {
    #- gstreamer assumed to be installed in $$PWD/../../android/gstreamer-1.0-android-armv7-1.5.2
    GST_ROOT = $$PWD/../../gstreamer-1.0-android-armv7-1.5.2
    exists($$GST_ROOT) {
        QMAKE_CXXFLAGS  += -pthread
        CONFIG          += VideoEnabled

        # We want to link these plugins statically
        LIBS += -L$$GST_ROOT/lib/gstreamer-1.0/static \
            -lgstvideo-1.0 \
            -lgstcoreelements \
            -lgstudp \
            -lgstrtp \
            -lgstx264 \
            -lgstlibav \
            -lgstvideoparsersbad

        # Rest of GStreamer dependencies
        LIBS += -L$$GST_ROOT/lib \
            -lgstfft-1.0 -lm  \
            -lgstnet-1.0 -lgio-2.0 \
            -lgstaudio-1.0 -lgstcodecparsers-1.0 -lgstbase-1.0 \
            -lgstreamer-1.0 -lgsttag-1.0 -lgstrtp-1.0 -lgstpbutils-1.0 \
            -lgstvideo-1.0 -lavformat -lavcodec -lavresample -lavutil -lx264 \
            -lbz2 -lgobject-2.0 \
            -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lorc-0.4 -liconv -lffi -lintl

        INCLUDEPATH += \
            $$GST_ROOT/include/gstreamer-1.0 \
            $$GST_ROOT/lib/gstreamer-1.0/include \
            $$GST_ROOT/include/glib-2.0 \
            $$GST_ROOT/lib/glib-2.0/include
    }
}

VideoEnabled {

    message("Including support for video streaming")

    DEFINES += \
        QGC_GST_STREAMING \
        GST_PLUGIN_BUILD_STATIC \
        QTGLVIDEOSINK_NAME=qt5glvideosink \
        QGC_VIDEOSINK_PLUGIN=qt5videosink

    INCLUDEPATH += \
        $$PWD/gstqtvideosink \
        $$PWD/gstqtvideosink/delegates \
        $$PWD/gstqtvideosink/painters \
        $$PWD/gstqtvideosink/utils \

    #-- QtGstreamer (gutted to our needs)

    HEADERS += \
        $$PWD/gstqtvideosink/delegates/basedelegate.h \
        $$PWD/gstqtvideosink/delegates/qtquick2videosinkdelegate.h \
        $$PWD/gstqtvideosink/delegates/qtvideosinkdelegate.h \
        $$PWD/gstqtvideosink/delegates/qwidgetvideosinkdelegate.h \
        $$PWD/gstqtvideosink/gstqtglvideosink.h \
        $$PWD/gstqtvideosink/gstqtglvideosinkbase.h \
        $$PWD/gstqtvideosink/gstqtquick2videosink.h \
        $$PWD/gstqtvideosink/gstqtvideosink.h \
        $$PWD/gstqtvideosink/gstqtvideosinkbase.h \
        $$PWD/gstqtvideosink/gstqtvideosinkmarshal.h \
        $$PWD/gstqtvideosink/gstqtvideosinkplugin.h \
        $$PWD/gstqtvideosink/gstqwidgetvideosink.h \
        $$PWD/gstqtvideosink/painters/abstractsurfacepainter.h \
        $$PWD/gstqtvideosink/painters/genericsurfacepainter.h \
        $$PWD/gstqtvideosink/painters/openglsurfacepainter.h \
        $$PWD/gstqtvideosink/painters/videomaterial.h \
        $$PWD/gstqtvideosink/painters/videonode.h \
        $$PWD/gstqtvideosink/utils/bufferformat.h \
        $$PWD/gstqtvideosink/utils/utils.h \
        $$PWD/gstqtvideosink/utils/glutils.h \

    SOURCES += \
        $$PWD/gstqtvideosink/delegates/basedelegate.cpp \
        $$PWD/gstqtvideosink/delegates/qtquick2videosinkdelegate.cpp \
        $$PWD/gstqtvideosink/delegates/qtvideosinkdelegate.cpp \
        $$PWD/gstqtvideosink/delegates/qwidgetvideosinkdelegate.cpp \
        $$PWD/gstqtvideosink/gstqtglvideosink.cpp \
        $$PWD/gstqtvideosink/gstqtglvideosinkbase.cpp \
        $$PWD/gstqtvideosink/gstqtvideosinkmarshal.c \
        $$PWD/gstqtvideosink/gstqtquick2videosink.cpp \
        $$PWD/gstqtvideosink/gstqtvideosink.cpp \
        $$PWD/gstqtvideosink/gstqtvideosinkbase.cpp \
        $$PWD/gstqtvideosink/gstqtvideosinkplugin.cpp \
        $$PWD/gstqtvideosink/gstqwidgetvideosink.cpp \
        $$PWD/gstqtvideosink/painters/genericsurfacepainter.cpp \
        $$PWD/gstqtvideosink/painters/openglsurfacepainter.cpp \
        $$PWD/gstqtvideosink/painters/videomaterial.cpp \
        $$PWD/gstqtvideosink/painters/videonode.cpp \
        $$PWD/gstqtvideosink/utils/bufferformat.cpp \
        $$PWD/gstqtvideosink/utils/utils.cpp \

} else {
    LinuxBuild|MacBuild|iOSBuild|WindowsBuild|AndroidBuild {
        message("Skipping support for video streaming (GStreamer libraries not installed)")
        MacBuild {
            message("  You can download it from http://gstreamer.freedesktop.org/data/pkg/osx/")
            message("  Select the devel package and install it (gstreamer-1.0-devel-1.x.x-x86_64.pkg)")
            message("  It will be installed in /Libraries/Frameworks")
        }
        LinuxBuild {
            message("  You can install it using apt-get")
            message("  sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-0:amd64 libgstreamer1.0-dev")
        }
        WindowsBuild {
            message("  You can download it from http://gstreamer.freedesktop.org/data/pkg/windows/")
            message("  Select the devel AND runtime packages and install them (x86, not the 64-Bit)")
            message("  It will be installed in C:/gstreamer. You need to update you PATH to point to the bin directory.")
        }
        AndroidBuild {
            message("  You can download it from http://gstreamer.freedesktop.org/data/pkg/android/")
            message("  Uncompress the archive into the qgc root source directory (same directory where qgroundcontrol.pro is found.")
        }
    } else {
        message("Skipping support for video streaming (Unsupported platform)")
    }
}

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

#
#-- Depends on gstreamer, which can be found at: http://gstreamer.freedesktop.org/download/
#

LinuxBuild {
    CONFIG += link_pkgconfig
    packagesExist(gstreamer-1.0) {
        PKGCONFIG   += gstreamer-1.0  gstreamer-video-1.0
        CONFIG      += VideoEnabled
    }
} else:MacBuild {
    #- gstreamer framework installed by the gstreamer devel installer
    GST_ROOT = /Library/Frameworks/GStreamer.framework
    exists($$GST_ROOT) {
        CONFIG      += VideoEnabled
        INCLUDEPATH += $$GST_ROOT/Headers
        LIBS        += -F/Library/Frameworks -framework GStreamer
    }
} else:iOSBuild {
    #- gstreamer framework installed by the gstreamer iOS SDK installer (default to home directory)
    GST_ROOT = $$(HOME)/Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework
    exists($$GST_ROOT) {
        CONFIG      += VideoEnabled
        INCLUDEPATH += $$GST_ROOT/Headers
        LIBS        += -F$$(HOME)/Library/Developer/GStreamer/iPhone.sdk -framework GStreamer -liconv -lresolv
    }
} else:WindowsBuild {
    #- gstreamer installed by default under c:/gstreamer
    GST_ROOT = c:/gstreamer/1.0/x86
    exists($$GST_ROOT) {
        CONFIG      += VideoEnabled
        LIBS        += -L$$GST_ROOT/lib/gstreamer-1.0/static -lgstreamer-1.0 -lgstvideo-1.0 -lgstbase-1.0
        LIBS        += -L$$GST_ROOT/lib -lglib-2.0 -lintl -lgobject-2.0
        INCLUDEPATH += \
            $$GST_ROOT/include/gstreamer-1.0 \
            $$GST_ROOT/include/glib-2.0 \
            $$GST_ROOT/lib/gstreamer-1.0/include \
            $$GST_ROOT/lib/glib-2.0/include
    }

    COPY_FILE_LIST = \
        $$GST_ROOT\\bin\\libffi-6.dll \
        $$GST_ROOT\\bin\\libglib-2.0-0.dll \
        $$GST_ROOT\\bin\\libgmodule-2.0-0.dll \
        $$GST_ROOT\\bin\\libgobject-2.0-0.dll \
        $$GST_ROOT\\bin\\libgstbase-1.0-0.dll \
        $$GST_ROOT\\bin\\libgstreamer-1.0-0.dll \
        $$GST_ROOT\\bin\\libgstvideo-1.0-0.dll \
        $$GST_ROOT\\bin\\libintl-8.dll \
        $$GST_ROOT\\bin\\liborc-0.4-0.dll \
        $$GST_ROOT\\bin\\libwinpthread-1.dll \

    DESTDIR_WIN = $$replace(DESTDIR, "/", "\\")

    for(COPY_FILE, COPY_FILE_LIST) {
        QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR_WIN\"
    }
    QMAKE_POST_LINK += $$escape_expand(\\n)

} else:AndroidBuild {
    #- gstreamer assumed to be installed in $$PWD/../../android/gstreamer-1.0-android-armv7-1.5.2
    GST_ROOT = $$PWD/../../gstreamer-1.0-android-armv7-1.5.2
    exists($$GST_ROOT) {
        QMAKE_CXXFLAGS  += -pthread
        CONFIG          += VideoEnabled

        # We want to link these plugins statically
        LIBS += -L$$GST_ROOT/lib/gstreamer-1.0/static \
            -lgstvideo-1.0 \
            -lgstcoreelements \
            -lgstudp \
            -lgstrtp \
            -lgstx264 \
            -lgstlibav \
            -lgstvideoparsersbad

        # Rest of GStreamer dependencies
        LIBS += -L$$GST_ROOT/lib \
            -lgstfft-1.0 -lm  \
            -lgstnet-1.0 -lgio-2.0 \
            -lgstaudio-1.0 -lgstcodecparsers-1.0 -lgstbase-1.0 \
            -lgstreamer-1.0 -lgsttag-1.0 -lgstrtp-1.0 -lgstpbutils-1.0 \
            -lgstvideo-1.0 -lavformat -lavcodec -lavresample -lavutil -lx264 \
            -lbz2 -lgobject-2.0 \
            -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lorc-0.4 -liconv -lffi -lintl

        INCLUDEPATH += \
            $$GST_ROOT/include/gstreamer-1.0 \
            $$GST_ROOT/lib/gstreamer-1.0/include \
            $$GST_ROOT/include/glib-2.0 \
            $$GST_ROOT/lib/glib-2.0/include
    }
}

VideoEnabled {

    message("Including support for video streaming")

    DEFINES += \
        QGC_GST_STREAMING \
        GST_PLUGIN_BUILD_STATIC \
        QTGLVIDEOSINK_NAME=qt5glvideosink \
        QGC_VIDEOSINK_PLUGIN=qt5videosink

    INCLUDEPATH += \
        $$PWD/gstqtvideosink \
        $$PWD/gstqtvideosink/delegates \
        $$PWD/gstqtvideosink/painters \
        $$PWD/gstqtvideosink/utils \

    #-- QtGstreamer (gutted to our needs)

    HEADERS += \
        $$PWD/gstqtvideosink/delegates/basedelegate.h \
        $$PWD/gstqtvideosink/delegates/qtquick2videosinkdelegate.h \
        $$PWD/gstqtvideosink/delegates/qtvideosinkdelegate.h \
        $$PWD/gstqtvideosink/delegates/qwidgetvideosinkdelegate.h \
        $$PWD/gstqtvideosink/gstqtglvideosink.h \
        $$PWD/gstqtvideosink/gstqtglvideosinkbase.h \
        $$PWD/gstqtvideosink/gstqtquick2videosink.h \
        $$PWD/gstqtvideosink/gstqtvideosink.h \
        $$PWD/gstqtvideosink/gstqtvideosinkbase.h \
        $$PWD/gstqtvideosink/gstqtvideosinkmarshal.h \
        $$PWD/gstqtvideosink/gstqtvideosinkplugin.h \
        $$PWD/gstqtvideosink/gstqwidgetvideosink.h \
        $$PWD/gstqtvideosink/painters/abstractsurfacepainter.h \
        $$PWD/gstqtvideosink/painters/genericsurfacepainter.h \
        $$PWD/gstqtvideosink/painters/openglsurfacepainter.h \
        $$PWD/gstqtvideosink/painters/videomaterial.h \
        $$PWD/gstqtvideosink/painters/videonode.h \
        $$PWD/gstqtvideosink/utils/bufferformat.h \
        $$PWD/gstqtvideosink/utils/utils.h \
        $$PWD/gstqtvideosink/utils/glutils.h \

    SOURCES += \
        $$PWD/gstqtvideosink/delegates/basedelegate.cpp \
        $$PWD/gstqtvideosink/delegates/qtquick2videosinkdelegate.cpp \
        $$PWD/gstqtvideosink/delegates/qtvideosinkdelegate.cpp \
        $$PWD/gstqtvideosink/delegates/qwidgetvideosinkdelegate.cpp \
        $$PWD/gstqtvideosink/gstqtglvideosink.cpp \
        $$PWD/gstqtvideosink/gstqtglvideosinkbase.cpp \
        $$PWD/gstqtvideosink/gstqtvideosinkmarshal.c \
        $$PWD/gstqtvideosink/gstqtquick2videosink.cpp \
        $$PWD/gstqtvideosink/gstqtvideosink.cpp \
        $$PWD/gstqtvideosink/gstqtvideosinkbase.cpp \
        $$PWD/gstqtvideosink/gstqtvideosinkplugin.cpp \
        $$PWD/gstqtvideosink/gstqwidgetvideosink.cpp \
        $$PWD/gstqtvideosink/painters/genericsurfacepainter.cpp \
        $$PWD/gstqtvideosink/painters/openglsurfacepainter.cpp \
        $$PWD/gstqtvideosink/painters/videomaterial.cpp \
        $$PWD/gstqtvideosink/painters/videonode.cpp \
        $$PWD/gstqtvideosink/utils/bufferformat.cpp \
        $$PWD/gstqtvideosink/utils/utils.cpp \

} else {
    LinuxBuild|MacBuild|iOSBuild|WindowsBuild|AndroidBuild {
        message("Skipping support for video streaming (GStreamer libraries not installed)")
        MacBuild {
            message("  You can download it from http://gstreamer.freedesktop.org/data/pkg/osx/")
            message("  Select the devel package and install it (gstreamer-1.0-devel-1.x.x-x86_64.pkg)")
            message("  It will be installed in /Libraries/Frameworks")
        }
        LinuxBuild {
            message("  You can install it using apt-get")
            message("  sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-0:amd64 libgstreamer1.0-dev")
        }
        WindowsBuild {
            message("  You can download it from http://gstreamer.freedesktop.org/data/pkg/windows/")
            message("  Select the devel AND runtime packages and install them (x86, not the 64-Bit)")
            message("  It will be installed in C:/gstreamer. You need to update you PATH to point to the bin directory.")
        }
        AndroidBuild {
            message("  You can download it from http://gstreamer.freedesktop.org/data/pkg/android/")
            message("  Uncompress the archive into the qgc root source directory (same directory where qgroundcontrol.pro is found.")
        }
    } else {
        message("Skipping support for video streaming (Unsupported platform)")
    }
}


Version 0.58

Version 0.58


Version 2.4

Version 2.4


Refactor autodepends.pri

Refactor autodepends.pri

#********************************************************************
# Copyright (C) 2014 Francisco Javier Paz Menendez
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#********************************************************************

# Get subproject .pro file path
defineReplace(subprojectPro) {
    subproject = $$1
    subproject_subdir = $$find($${subproject}.subdir, .*)
    subproject_pro_path = $$subproject_subdir/$${subproject}.pro

    return($$subproject_pro_path)
}

# Test if subproject is a library
defineTest(isLibrary) {
    subproject_pro_path = $$1
    subproject_template = $$fromfile($$subproject_pro_path, TEMPLATE)

    contains(subproject_template, lib) {
        return(true)
    } else {
        return(false)
    }
}

# Get linked libraries list
defineReplace(linkedLibraries) {
    subproject = $$1
    subproject_pro_path = $$subprojectPro($$subproject)
    subproject_libs_raw = $$fromfile($$subproject_pro_path, LIBS)
    subproject_libs_link = $$find(subproject_libs_raw, ^-l)
    subproject_libs_target = $$replace(subproject_libs_link, '-l', '')
    subproject_libs = $$unique(subproject_libs_target)

    return($$subproject_libs)
}

# Get subproject dependencies
defineReplace(subprojectDepends) {
    subproject = $$1
    linked_libraries = $$linkedLibraries($$subproject)

    # Insert linked libraries found in targets list into dependencies list
    for(lib_to_link, linked_libraries) {
        contains(LIB_TARGETS, $$lib_to_link) {
            target_and_subproject = $$find(TARGET_TO_SUBPROJECT, $$lib_to_link)
            subproject_depend = $$replace(target_and_subproject, $$lib_to_link:, '')
            subproject_depends += $$subproject_depend
        }
    }

    return($$subproject_depends)
}

# Test if a project has manually defined dependencies
defineTest(hasDefinedDepends) {
    subproject = $$1

    isEmpty($${subproject}.depends) {
        return(false)
    } else {
        return(true)
    }
}

# GENERATE DEPENDENCIES
# ---------------------

# Get list of library subprojects
for(SUBPROJECT, SUBDIRS) {
    SUBPROJECT_PRO = $$subprojectPro($$SUBPROJECT)

    isLibrary($$SUBPROJECT_PRO) {
        # Insert target in targets list and target:subproject list
        SUBPROJECT_TARGET = $$fromfile($$SUBPROJECT_PRO, TARGET)
        LIB_TARGETS += $$SUBPROJECT_TARGET
        TARGET_TO_SUBPROJECT += $$SUBPROJECT_TARGET:$$SUBPROJECT
    }
}

# Generate dependencies by matching linked libraries with targets list
for(SUBPROJECT, SUBDIRS) {
    # Skip subprojects with manually defined dependencies
    hasDefinedDepends($$SUBPROJECT): next()

    SUBPROJECT_DEPENDS = $$subprojectDepends($$SUBPROJECT)

    # Define subproject dependencies
    SUBPROJECT_DEPENDS_VAR = $$join(SUBPROJECT,,,'.depends')
    $$SUBPROJECT_DEPENDS_VAR = $$SUBPROJECT_DEPENDS
}

#********************************************************************
# Copyright (C) 2014 Francisco Javier Paz Menendez
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#********************************************************************

# Get list of library subprojects
for(SUBPROJECT, SUBDIRS) {
    # Subproject .pro file path
    SUBPROJECT_SUBDIR = $$find($${SUBPROJECT}.subdir, .*)
    SUBPROJECT_PRO = $$SUBPROJECT_SUBDIR/$${SUBPROJECT}.pro

    # Subproject type
    SUBPROJECT_TEMPLATE = $$fromfile($$SUBPROJECT_PRO, TEMPLATE)

    contains(SUBPROJECT_TEMPLATE, lib) {
        # Library subproject. Insert target in targets list and target:subproject list
        SUBPROJECT_TARGET = $$fromfile($$SUBPROJECT_PRO, TARGET)

        LIB_TARGETS += $$SUBPROJECT_TARGET
        TARGET_TO_SUBPROJECT += $$SUBPROJECT_TARGET:$$SUBPROJECT
    }
}

# Generate dependencies by matching linked libraries with targets list
for(SUBPROJECT, SUBDIRS) {
    # Skip subprojects with manually generated dependencies
    !isEmpty($${SUBPROJECT}.depends): next()

    # Subproject .pro file path
    SUBPROJECT_SUBDIR = $$find($${SUBPROJECT}.subdir, .*)
    SUBPROJECT_PRO = $$SUBPROJECT_SUBDIR/$${SUBPROJECT}.pro

    # Linked libraries list
    SUBPROJECT_LIBS_RAW = $$fromfile($$SUBPROJECT_PRO, LIBS)
    SUBPROJECT_LIBS_LINK = $$find(SUBPROJECT_LIBS_RAW, ^-l)
    SUBPROJECT_LIBS_TARGET = $$replace(SUBPROJECT_LIBS_LINK, '-l', '')
    SUBPROJECT_LIBS = $$unique(SUBPROJECT_LIBS_TARGET)

    # Clear dependencies list
    SUBPROJECT_DEPENDS =

    # Insert linked libraries found in targets list into dependencies list
    for(LIB_TO_LINK, SUBPROJECT_LIBS) {
        contains(LIB_TARGETS, $$LIB_TO_LINK) {
            TARGET_AND_SUBPROJECT = $$find(TARGET_TO_SUBPROJECT, $$LIB_TO_LINK)
            SUBPROJECT_DEPEND = $$replace(TARGET_AND_SUBPROJECT, $$LIB_TO_LINK:, '')
            SUBPROJECT_DEPENDS += $$SUBPROJECT_DEPEND
        }
    }

    # Declare subproject dependencies
    SUBPROJECT_DEPENDS_VAR = $$join(SUBPROJECT,,,'.depends')
    $$SUBPROJECT_DEPENDS_VAR = $$SUBPROJECT_DEPENDS
}


pkg.pri: check QT_CONFIG for no-pkg-config


Updated common.pri to match #10

Updated common.pri to match #10

LIBS        += -L$$PWD/../lib -leventdispatcher_libevent
INCLUDEPATH += $$PWD/../lib
DEPENDPATH  += $$PWD/../lib

SOURCES     += $$PWD/../eventdispatcher_libevent.cpp
HEADERS     += $$PWD/../eventdispatcher_libevent.h
INCLUDEPATH += $$PWD/../
DEPENDPATH  += $$PWD/../
CONFIG      += link_pkgconfig
PKGCONFIG   += libevent libevent_pthreads


Build fix

Build fix

Change-Id: I38ed5c003fe24ef376c4043a8b4ce17f7848d7bd
Reviewed-on: http://codereview.qt.nokia.com/646
Reviewed-by: Qt Sanity Bot <5581206bb7e0307f0d99eb71898ae6b694149ca5@ovi.com>
Reviewed-by: Tobias Hunger <012f8d714267bccc9d4766fbeace9f175fcc70c4@nokia.com>

include($$PWD/filemanager/filemanager.pri)
include (../config.pri)

QT += script \
    network

DEFINES += TEST_EXPORTS
INCLUDEPATH += $$PWD \
    $$PWD/include

include (instances/instances.pri)
include (../../../../share/qtcreator/qml/qmlpuppet/interfaces/interfaces.pri)
include (../../../../share/qtcreator/qml/qmlpuppet/commands/commands.pri)
include (../../../../share/qtcreator/qml/qmlpuppet/container/container.pri)

SOURCES += $$PWD/model/abstractview.cpp \
    $$PWD/model/rewriterview.cpp \
    $$PWD/metainfo/metainfo.cpp \
    $$PWD/metainfo/metainfoparser.cpp \
    $$PWD/metainfo/nodemetainfo.cpp \
    $$PWD/metainfo/itemlibraryinfo.cpp \
    $$PWD/metainfo/subcomponentmanager.cpp \
    $$PWD/model/internalproperty.cpp \
    $$PWD/model/model.cpp \
    $$PWD/model/modelnode.cpp \
    $$PWD/model/painteventfilter.cpp \
    $$PWD/model/internalnode.cpp \
    $$PWD/model/propertyparser.cpp \
    $$PWD/model/propertycontainer.cpp \
    $$PWD/pluginmanager/widgetpluginmanager.cpp \
    $$PWD/pluginmanager/widgetpluginpath.cpp \
    $$PWD/exceptions/exception.cpp \
    $$PWD/exceptions/invalidpropertyexception.cpp \
    $$PWD/exceptions/invalidmodelnodeexception.cpp \
    $$PWD/exceptions/invalidreparentingexception.cpp \
    $$PWD/exceptions/invalidmetainfoexception.cpp \
    $$PWD/exceptions/invalidargumentexception.cpp \
    $$PWD/exceptions/notimplementedexception.cpp \
    $$PWD/model/variantparser.cpp \
    $$PWD/exceptions/invalidmodelstateexception.cpp \
    $$PWD/exceptions/removebasestateexception.cpp \
    $$PWD/exceptions/invalididexception.cpp \
    $$PWD/model/propertynode.cpp \
    $$PWD/exceptions/invalidslideindexexception.cpp \
    $$PWD/model/import.cpp \
    $$PWD/exceptions/invalidqmlsourceexception.cpp \
    $$PWD/model/viewlogger.cpp \
    $$PWD/model/internalvariantproperty.cpp \
    $$PWD/model/internalnodelistproperty.cpp \
    $$PWD/model/variantproperty.cpp \
    $$PWD/model/nodelistproperty.cpp \
    $$PWD/model/abstractproperty.cpp \
    $$PWD/model/internalbindingproperty.cpp \
    $$PWD/model/bindingproperty.cpp \
    $$PWD/model/internalnodeproperty.cpp \
    $$PWD/model/internalnodeabstractproperty.cpp \
    $$PWD/model/nodeabstractproperty.cpp \
    $$PWD/model/nodeproperty.cpp \
    $$PWD/model/modeltotextmerger.cpp \
    $$PWD/model/texttomodelmerger.cpp \
    $$PWD/model/plaintexteditmodifier.cpp \
    $$PWD/model/componenttextmodifier.cpp \
    $$PWD/model/textmodifier.cpp \
    $$PWD/model/qmlmodelview.cpp \
    $$PWD/model/qmlitemnode.cpp \
    $$PWD/model/qmlstate.cpp \
    $$PWD/model/qmlchangeset.cpp \
    $$PWD/model/qmlmodelnodefacade.cpp \
    $$PWD/model/qmlobjectnode.cpp \
    $$PWD/model/qmlanchors.cpp \
    $$PWD/rewritertransaction.cpp \
    $$PWD/model/rewriteaction.cpp \
    $$PWD/model/modelnodepositionstorage.cpp \
    $$PWD/model/modelnodepositionrecalculator.cpp \
    $$PWD/model/rewriteactioncompressor.cpp \
    $$PWD/model/qmltextgenerator.cpp \
    $$PWD/model/modelmerger.cpp \
    $$PWD/exceptions/rewritingexception.cpp

HEADERS += $$PWD/include/corelib_global.h \
    $$PWD/include/abstractview.h \
    $$PWD/include/nodeinstanceview.h \
    $$PWD/include/rewriterview.h \
    $$PWD/include/metainfo.h \
    $$PWD/include/metainfoparser.h \
    $$PWD/include/nodemetainfo.h \
    $$PWD/include/itemlibraryinfo.h \
    $$PWD/model/internalproperty.h \
    $$PWD/include/modelnode.h \
    $$PWD/include/model.h \
    $$PWD/include/nodeproperty.h \
    $$PWD/include/subcomponentmanager.h \
    $$PWD/include/propertycontainer.h \
    $$PWD/model/internalnode_p.h \
    $$PWD/model/model_p.h \
    $$PWD/model/painteventfilter_p.h \
    $$PWD/model/propertyparser.h \
    $$PWD/pluginmanager/widgetpluginmanager.h \
    $$PWD/pluginmanager/widgetpluginpath.h \
    $$PWD/include/exception.h \
    $$PWD/include/invalidreparentingexception.h \
    $$PWD/include/invalidmetainfoexception.h \
    $$PWD/include/invalidargumentexception.h \
    $$PWD/include/notimplementedexception.h \
    $$PWD/include/invalidpropertyexception.h \
    $$PWD/include/invalidmodelstateexception.h \
    $$PWD/include/removebasestateexception.h \
    $$PWD/include/invalididexception.h \
    $$PWD/model/variantparser.h \
    $$PWD/include/propertynode.h \
    $$PWD/include/invalidslideindexexception.h \
    $$PWD/include/import.h \
    $$PWD/include/invalidqmlsourceexception.h \
    $$PWD/model/viewlogger.h \
    $$PWD/model/internalvariantproperty.h \
    $$PWD/model/internalnodelistproperty.h \
    $$PWD/include/variantproperty.h \
    $$PWD/include/nodelistproperty.h \
    $$PWD/include/abstractproperty.h \
    $$PWD/model/internalbindingproperty.h \
    $$PWD/include/bindingproperty.h \
    $$PWD/model/internalnodeproperty.h \
    $$PWD/model/internalnodeabstractproperty.h \
    $$PWD/include/nodeabstractproperty.h \
    $$PWD/include/plaintexteditmodifier.h \
    $$PWD/include/basetexteditmodifier.h \
    $$PWD/include/componenttextmodifier.h \
    $$PWD/include/textmodifier.h \
    $$PWD/model/modeltotextmerger.h \
    $$PWD/model/texttomodelmerger.h \
    $$PWD/include/qmlmodelview.h \
    $$PWD/include/qmlitemnode.h \
    $$PWD/include/qmlstate.h \
    $$PWD/include/qmlchangeset.h \
    $$PWD/include/qmlmodelnodefacade.h \
    $$PWD/include/forwardview.h \
    $$PWD/include/qmlobjectnode.h \
    $$PWD/include/qmlanchors.h \
    $$PWD/rewritertransaction.h \
    $$PWD/model/rewriteaction.h \
    $$PWD/include/modelnodepositionstorage.h \
    $$PWD/model/modelnodepositionrecalculator.h \
    $$PWD/model/rewriteactioncompressor.h \
    $$PWD/model/qmltextgenerator.h \
    $$PWD/include/modelmerger.h \
    $$PWD/include/mathutils.h \
    $$PWD/include/customnotifications.h \
    $$PWD/include/rewritingexception.h

contains(CONFIG, plugin) {
  # If core.pri has been included in the qmldesigner plugin
  SOURCES += $$PWD/model/basetexteditmodifier.cpp
  HEADERS += $$PWD/include/basetexteditmodifier.h
}

include($$PWD/filemanager/filemanager.pri)
include (../config.pri)

QT += script \
    network

DEFINES += TEST_EXPORTS
INCLUDEPATH += $$PWD \
    $$PWD/include

include (instances/instances.pri)
include (../../../tools/qmlpuppet/interfaces/interfaces.pri)
include (../../../tools/qmlpuppet/commands/commands.pri)
include (../../../tools/qmlpuppet/container/container.pri)

SOURCES += $$PWD/model/abstractview.cpp \
    $$PWD/model/rewriterview.cpp \
    $$PWD/metainfo/metainfo.cpp \
    $$PWD/metainfo/metainfoparser.cpp \
    $$PWD/metainfo/nodemetainfo.cpp \
    $$PWD/metainfo/itemlibraryinfo.cpp \
    $$PWD/metainfo/subcomponentmanager.cpp \
    $$PWD/model/internalproperty.cpp \
    $$PWD/model/model.cpp \
    $$PWD/model/modelnode.cpp \
    $$PWD/model/painteventfilter.cpp \
    $$PWD/model/internalnode.cpp \
    $$PWD/model/propertyparser.cpp \
    $$PWD/model/propertycontainer.cpp \
    $$PWD/pluginmanager/widgetpluginmanager.cpp \
    $$PWD/pluginmanager/widgetpluginpath.cpp \
    $$PWD/exceptions/exception.cpp \
    $$PWD/exceptions/invalidpropertyexception.cpp \
    $$PWD/exceptions/invalidmodelnodeexception.cpp \
    $$PWD/exceptions/invalidreparentingexception.cpp \
    $$PWD/exceptions/invalidmetainfoexception.cpp \
    $$PWD/exceptions/invalidargumentexception.cpp \
    $$PWD/exceptions/notimplementedexception.cpp \
    $$PWD/model/variantparser.cpp \
    $$PWD/exceptions/invalidmodelstateexception.cpp \
    $$PWD/exceptions/removebasestateexception.cpp \
    $$PWD/exceptions/invalididexception.cpp \
    $$PWD/model/propertynode.cpp \
    $$PWD/exceptions/invalidslideindexexception.cpp \
    $$PWD/model/import.cpp \
    $$PWD/exceptions/invalidqmlsourceexception.cpp \
    $$PWD/model/viewlogger.cpp \
    $$PWD/model/internalvariantproperty.cpp \
    $$PWD/model/internalnodelistproperty.cpp \
    $$PWD/model/variantproperty.cpp \
    $$PWD/model/nodelistproperty.cpp \
    $$PWD/model/abstractproperty.cpp \
    $$PWD/model/internalbindingproperty.cpp \
    $$PWD/model/bindingproperty.cpp \
    $$PWD/model/internalnodeproperty.cpp \
    $$PWD/model/internalnodeabstractproperty.cpp \
    $$PWD/model/nodeabstractproperty.cpp \
    $$PWD/model/nodeproperty.cpp \
    $$PWD/model/modeltotextmerger.cpp \
    $$PWD/model/texttomodelmerger.cpp \
    $$PWD/model/plaintexteditmodifier.cpp \
    $$PWD/model/componenttextmodifier.cpp \
    $$PWD/model/textmodifier.cpp \
    $$PWD/model/qmlmodelview.cpp \
    $$PWD/model/qmlitemnode.cpp \
    $$PWD/model/qmlstate.cpp \
    $$PWD/model/qmlchangeset.cpp \
    $$PWD/model/qmlmodelnodefacade.cpp \
    $$PWD/model/qmlobjectnode.cpp \
    $$PWD/model/qmlanchors.cpp \
    $$PWD/rewritertransaction.cpp \
    $$PWD/model/rewriteaction.cpp \
    $$PWD/model/modelnodepositionstorage.cpp \
    $$PWD/model/modelnodepositionrecalculator.cpp \
    $$PWD/model/rewriteactioncompressor.cpp \
    $$PWD/model/qmltextgenerator.cpp \
    $$PWD/model/modelmerger.cpp \
    $$PWD/exceptions/rewritingexception.cpp

HEADERS += $$PWD/include/corelib_global.h \
    $$PWD/include/abstractview.h \
    $$PWD/include/nodeinstanceview.h \
    $$PWD/include/rewriterview.h \
    $$PWD/include/metainfo.h \
    $$PWD/include/metainfoparser.h \
    $$PWD/include/nodemetainfo.h \
    $$PWD/include/itemlibraryinfo.h \
    $$PWD/model/internalproperty.h \
    $$PWD/include/modelnode.h \
    $$PWD/include/model.h \
    $$PWD/include/nodeproperty.h \
    $$PWD/include/subcomponentmanager.h \
    $$PWD/include/propertycontainer.h \
    $$PWD/model/internalnode_p.h \
    $$PWD/model/model_p.h \
    $$PWD/model/painteventfilter_p.h \
    $$PWD/model/propertyparser.h \
    $$PWD/pluginmanager/widgetpluginmanager.h \
    $$PWD/pluginmanager/widgetpluginpath.h \
    $$PWD/include/exception.h \
    $$PWD/include/invalidreparentingexception.h \
    $$PWD/include/invalidmetainfoexception.h \
    $$PWD/include/invalidargumentexception.h \
    $$PWD/include/notimplementedexception.h \
    $$PWD/include/invalidpropertyexception.h \
    $$PWD/include/invalidmodelstateexception.h \
    $$PWD/include/removebasestateexception.h \
    $$PWD/include/invalididexception.h \
    $$PWD/model/variantparser.h \
    $$PWD/include/propertynode.h \
    $$PWD/include/invalidslideindexexception.h \
    $$PWD/include/import.h \
    $$PWD/include/invalidqmlsourceexception.h \
    $$PWD/model/viewlogger.h \
    $$PWD/model/internalvariantproperty.h \
    $$PWD/model/internalnodelistproperty.h \
    $$PWD/include/variantproperty.h \
    $$PWD/include/nodelistproperty.h \
    $$PWD/include/abstractproperty.h \
    $$PWD/model/internalbindingproperty.h \
    $$PWD/include/bindingproperty.h \
    $$PWD/model/internalnodeproperty.h \
    $$PWD/model/internalnodeabstractproperty.h \
    $$PWD/include/nodeabstractproperty.h \
    $$PWD/include/plaintexteditmodifier.h \
    $$PWD/include/basetexteditmodifier.h \
    $$PWD/include/componenttextmodifier.h \
    $$PWD/include/textmodifier.h \
    $$PWD/model/modeltotextmerger.h \
    $$PWD/model/texttomodelmerger.h \
    $$PWD/include/qmlmodelview.h \
    $$PWD/include/qmlitemnode.h \
    $$PWD/include/qmlstate.h \
    $$PWD/include/qmlchangeset.h \
    $$PWD/include/qmlmodelnodefacade.h \
    $$PWD/include/forwardview.h \
    $$PWD/include/qmlobjectnode.h \
    $$PWD/include/qmlanchors.h \
    $$PWD/rewritertransaction.h \
    $$PWD/model/rewriteaction.h \
    $$PWD/include/modelnodepositionstorage.h \
    $$PWD/model/modelnodepositionrecalculator.h \
    $$PWD/model/rewriteactioncompressor.h \
    $$PWD/model/qmltextgenerator.h \
    $$PWD/include/modelmerger.h \
    $$PWD/include/mathutils.h \
    $$PWD/include/customnotifications.h \
    $$PWD/include/rewritingexception.h

contains(CONFIG, plugin) {
  # If core.pri has been included in the qmldesigner plugin
  SOURCES += $$PWD/model/basetexteditmodifier.cpp
  HEADERS += $$PWD/include/basetexteditmodifier.h
}


Version 8.23

Version 8.23


Version 0.15

Version 0.15


increase version

increase version


Version 8.31

Version 8.31


Version 0.88

Version 0.88


brcm-egl fix: do not remove previous include dirs

Change-Id: I5fef403fa99fc3ac1181cf0b7e149a5d3337a50d
Reviewed-by: Jørgen Lind <6105bb7d7ebdd613cef5835c4a38d29949bd95ac@digia.com>

PLUGIN_TYPE = waylandcompositors
load(qt_plugin)

QT = compositor compositor-private core-private gui-private

INCLUDEPATH += $$PWD
LIBS += -lwayland-server

for(p, QMAKE_LIBDIR_EGL) {
    exists($$p):LIBS += -L$$p
}

LIBS += $$QMAKE_LIBS_EGL
INCLUDEPATH += $$QMAKE_INCDIR_EGL

SOURCES += \
    $$PWD/brcmeglintegration.cpp \
    $$PWD/brcmbuffer.cpp

HEADERS += \
    $$PWD/brcmeglintegration.h \
    $$PWD/brcmbuffer.h

CONFIG += wayland-scanner
WAYLANDSERVERSOURCES += $$PWD/../../../extensions/brcm.xml

PLUGIN_TYPE = waylandcompositors
load(qt_plugin)

QT = compositor compositor-private core-private gui-private

INCLUDEPATH = $$PWD
LIBS += -lwayland-server

for(p, QMAKE_LIBDIR_EGL) {
    exists($$p):LIBS += -L$$p
}

LIBS += $$QMAKE_LIBS_EGL
INCLUDEPATH += $$QMAKE_INCDIR_EGL

SOURCES += \
    $$PWD/brcmeglintegration.cpp \
    $$PWD/brcmbuffer.cpp

HEADERS += \
    $$PWD/brcmeglintegration.h \
    $$PWD/brcmbuffer.h

CONFIG += wayland-scanner
WAYLANDSERVERSOURCES += $$PWD/../../../extensions/brcm.xml


Build: Add QtQuick.2 libs to OSX build

Build: Add QtQuick.2 libs to OSX build

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

QMAKE_POST_LINK += $$quote(echo "Copying files")

#
# Copy the application resources to the associated place alongside the application
#

COPY_RESOURCE_LIST = \
    $$BASEDIR/files \
    $$BASEDIR/qml \
    $$BASEDIR/data

WindowsBuild {
	DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
    COPY_RESOURCE_LIST = $$replace(COPY_RESOURCE_LIST, "/","\\")
    CONCATCMD = $$escape_expand(\\n)
}

LinuxBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
    CONCATCMD = &&
}

MacBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR/$${TARGET}.app/Contents/MacOS
    CONCATCMD = &&
}

for(COPY_DIR, COPY_RESOURCE_LIST):QMAKE_POST_LINK += $$CONCATCMD $$QMAKE_COPY_DIR $${COPY_DIR} $$DESTDIR_COPY_RESOURCE_LIST

#
# Perform platform specific setup
#
message(QTDIR $$[QT_INSTALL_PREFIX])
MacBuild {
    # Copy libraries and frameworks into app package
    QMAKE_POST_LINK += && $$QMAKE_COPY_DIR -L $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/Frameworks
    QMAKE_POST_LINK += && $$QMAKE_COPY_DIR -L $$[QT_INSTALL_PREFIX]/qml/QtQuick.2 $$DESTDIR/$${TARGET}.app/Contents/MacOS/qml/QtQuick.2

    # SDL Framework
    QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL.framework/Versions/A/SDL" "@executable_path/../Frameworks/SDL.framework/Versions/A/SDL" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
}

WindowsBuild {
	# Copy dependencies
	BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
	DESTDIR_WIN = $$replace(DESTDIR,"/","\\")

    QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY_DIR "$$(QTDIR)\\plugins" "$$DESTDIR_WIN")

    COPY_FILE_DESTDIR = $$DESTDIR_WIN
	DebugBuild: DLL_QT_DEBUGCHAR = "d"
    ReleaseBuild: DLL_QT_DEBUGCHAR = ""
    COPY_FILE_LIST = \
        $$BASEDIR_WIN\\libs\\lib\\sdl\\win32\\SDL.dll \
        $$BASEDIR_WIN\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \
        $$(QTDIR)\\bin\\Qt5WebKitWidgets$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5MultimediaWidgets$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Multimedia$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Gui$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Core$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\icuin51.dll \
        $$(QTDIR)\\bin\\icuuc51.dll \
        $$(QTDIR)\\bin\\icudt51.dll \
        $$(QTDIR)\\bin\\Qt5Network$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Widgets$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5OpenGL$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5PrintSupport$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5WebKit$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Quick$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Qml$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Sql$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Positioning$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Sensors$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Declarative$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5XmlPatterns$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Xml$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Script$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Svg$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Test$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5SerialPort$${DLL_QT_DEBUGCHAR}.dll

    for(COPY_FILE, COPY_FILE_LIST) {
        QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY "$$COPY_FILE" "$$COPY_FILE_DESTDIR")
    }

	ReleaseBuild {
		QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\$${TARGET}.exp")

		# Copy Visual Studio DLLs
		# Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
		# I'm not certain of the path for VS2008, so this only works for VS2010.
		win32-msvc2010 {
			QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(xcopy /D /Y "\"C:\\Program Files \(x86\)\\Microsoft Visual Studio 10.0\\VC\\redist\\x86\\Microsoft.VC100.CRT\\*.dll\""  "$$DESTDIR_WIN\\")
		}
	}
}

LinuxBuild {
        #Installer section
        BINDIR = $$PREFIX/bin
        DATADIR =$$PREFIX/share

        DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"

        #MAKE INSTALL - copy files
        INSTALLS += target datafiles desktopLink menuLink permFolders permFiles

        target.path =$$BINDIR

        datafiles.path = $$DATADIR/APMPlanner2
        datafiles.files += $$BASEDIR/files
        datafiles.files += $$BASEDIR/data
        datafiles.files += $$BASEDIR/qml

        #fix up file permissions. Bit of a hack job
        #permFolders.path = $$DATADIR/APMPlanner2
        #permFolders.commands += find $$DATADIR -type d -exec chmod 755 {} \\;
        #permFiles.path = $$DATADIR/APMPlanner2
        #permFiles.commands += find $$DATADIR -type f -exec chmod 644 {} \\;

        #create menu links
        desktopLink.path = $$DATADIR/menu
        desktopLink.files += $$BASEDIR/debian/apmplanner2
        menuLink.path = $$DATADIR/applications
        menuLink.files += $$BASEDIR/debian/apmplanner2.desktop
}

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

QMAKE_POST_LINK += $$quote(echo "Copying files")

#
# Copy the application resources to the associated place alongside the application
#

COPY_RESOURCE_LIST = \
    $$BASEDIR/files \
    $$BASEDIR/qml \
    $$BASEDIR/data

WindowsBuild {
	DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
    COPY_RESOURCE_LIST = $$replace(COPY_RESOURCE_LIST, "/","\\")
    CONCATCMD = $$escape_expand(\\n)
}

LinuxBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
    CONCATCMD = &&
}

MacBuild {
    DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR/$${TARGET}.app/Contents/MacOS
    CONCATCMD = &&
}

for(COPY_DIR, COPY_RESOURCE_LIST):QMAKE_POST_LINK += $$CONCATCMD $$QMAKE_COPY_DIR $${COPY_DIR} $$DESTDIR_COPY_RESOURCE_LIST

#
# Perform platform specific setup
#
MacBuild {
	# Copy non-standard libraries and frameworks into app package
    QMAKE_POST_LINK += && $$QMAKE_COPY_DIR -L $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/Frameworks

    # SDL Framework
    QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL.framework/Versions/A/SDL" "@executable_path/../Frameworks/SDL.framework/Versions/A/SDL" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
}

WindowsBuild {
	# Copy dependencies
	BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
	DESTDIR_WIN = $$replace(DESTDIR,"/","\\")

    QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY_DIR "$$(QTDIR)\\plugins" "$$DESTDIR_WIN")

    COPY_FILE_DESTDIR = $$DESTDIR_WIN
	DebugBuild: DLL_QT_DEBUGCHAR = "d"
    ReleaseBuild: DLL_QT_DEBUGCHAR = ""
    COPY_FILE_LIST = \
        $$BASEDIR_WIN\\libs\\lib\\sdl\\win32\\SDL.dll \
        $$BASEDIR_WIN\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \
        $$(QTDIR)\\bin\\Qt5WebKitWidgets$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5MultimediaWidgets$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Multimedia$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Gui$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Core$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\icuin51.dll \
        $$(QTDIR)\\bin\\icuuc51.dll \
        $$(QTDIR)\\bin\\icudt51.dll \
        $$(QTDIR)\\bin\\Qt5Network$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Widgets$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5OpenGL$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5PrintSupport$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5WebKit$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Quick$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Qml$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Sql$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Positioning$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Sensors$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Declarative$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5XmlPatterns$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Xml$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Script$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Svg$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5Test$${DLL_QT_DEBUGCHAR}.dll \
        $$(QTDIR)\\bin\\Qt5SerialPort$${DLL_QT_DEBUGCHAR}.dll

    for(COPY_FILE, COPY_FILE_LIST) {
        QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY "$$COPY_FILE" "$$COPY_FILE_DESTDIR")
    }

	ReleaseBuild {
		QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\$${TARGET}.exp")

		# Copy Visual Studio DLLs
		# Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
		# I'm not certain of the path for VS2008, so this only works for VS2010.
		win32-msvc2010 {
			QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(xcopy /D /Y "\"C:\\Program Files \(x86\)\\Microsoft Visual Studio 10.0\\VC\\redist\\x86\\Microsoft.VC100.CRT\\*.dll\""  "$$DESTDIR_WIN\\")
		}
	}
}

LinuxBuild {
        #Installer section
        BINDIR = $$PREFIX/bin
        DATADIR =$$PREFIX/share

        DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"

        #MAKE INSTALL - copy files
        INSTALLS += target datafiles desktopLink menuLink permFolders permFiles

        target.path =$$BINDIR

        datafiles.path = $$DATADIR/APMPlanner2
        datafiles.files += $$BASEDIR/files
        datafiles.files += $$BASEDIR/data
        datafiles.files += $$BASEDIR/qml

        #fix up file permissions. Bit of a hack job
        #permFolders.path = $$DATADIR/APMPlanner2
        #permFolders.commands += find $$DATADIR -type d -exec chmod 755 {} \\;
        #permFiles.path = $$DATADIR/APMPlanner2
        #permFiles.commands += find $$DATADIR -type f -exec chmod 644 {} \\;

        #create menu links
        desktopLink.path = $$DATADIR/menu
        desktopLink.files += $$BASEDIR/debian/apmplanner2
        menuLink.path = $$DATADIR/applications
        menuLink.files += $$BASEDIR/debian/apmplanner2.desktop
}


Transfer PLUGINDIR from $$LIBDIR/trikStudio/ to $$LIBDIR/trikStudio/plugins

# Copyright 2016 Anton Midyukov
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

unix:!macx {
	isEmpty(PREFIX) {
		PREFIX = /usr/local
	}

	contains(QMAKE_HOST.arch, x86_64) {LIBDIR="$$PREFIX/lib64"} else {LIBDIR="$$PREFIX/lib"}
	BINDIR = $$PREFIX/bin
	DATADIR = $$PREFIX/share
	PROGRAMDIR = $$DATADIR/trikStudio
	PLUGINDIR = $$LIBDIR/trikStudio/plugins
	CONFFILE = /etc/trikStudio.config

	#MAKE INSTALL

	res.path = $$PROGRAMDIR
	res.extra = install -Dp -m0755 bin/release/qreal $(INSTALL_ROOT)$$BINDIR/qreal;\
	install -Dp -m0755 installer/platform/trikStudio.sh $(INSTALL_ROOT)$$BINDIR/trikStudio;\
	test -d $(INSTALL_ROOT)$$LIBDIR/ || mkdir -p $(INSTALL_ROOT)$$LIBDIR/;\
	cp -a bin/release/*.so* $(INSTALL_ROOT)$$LIBDIR;\
	test -d $(INSTALL_ROOT)$$PLUGINDIR || mkdir -p $(INSTALL_ROOT)$$PLUGINDIR;\
	cp -a bin/release/plugins/* $(INSTALL_ROOT)$$PLUGINDIR/;\
	cp -a bin/release/translations $(INSTALL_ROOT)$$PROGRAMDIR/;\
	cp -a bin/release/help $(INSTALL_ROOT)$$PROGRAMDIR/;\
	cp -a bin/release/images $(INSTALL_ROOT)$$PROGRAMDIR/;\
	cp -a bin/release/examples $(INSTALL_ROOT)$$PROGRAMDIR/;\
	cp -a bin/release/splashscreen.png $(INSTALL_ROOT)$$PROGRAMDIR/images;\
	test -d $(INSTALL_ROOT)/etc || mkdir -p $(INSTALL_ROOT)/etc;\
	echo 'pathToLogs=.config/trikStudio/logs/' > $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToImages=$$PROGRAMDIR/images/iconset1/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToHelp=$$PROGRAMDIR/help/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToTranslations=$$PROGRAMDIR/translations/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToTrikRuntime=$$PROGRAMDIR/trikRuntime/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToPascalRuntime=$$PROGRAMDIR/trikSharp/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToGeneratorRoot=$$PROGRAMDIR/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToExamples=$$PROGRAMDIR/examples/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToEditorPlugins=$$PLUGINDIR/editors/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToToolPlugins=$$PLUGINDIR/tools/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToKitPlugins=$$PLUGINDIR/tools/kitPlugins/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToSplashscreen=$$PROGRAMDIR/images/splashscreen.png" >> $(INSTALL_ROOT)$$CONFFILE;\
	test -d $(INSTALL_ROOT)$$DATADIR/icons/hicolor/16x16/apps || mkdir -p $(INSTALL_ROOT)$$DATADIR/icons/hicolor/16x16/apps;\
	cp -a installer/images/trik-studio-16x16.png $(INSTALL_ROOT)$$DATADIR/icons/hicolor/16x16/apps/trikStudio.png;\
	test -d $(INSTALL_ROOT)$$DATADIR/icons/hicolor/32x32/apps || mkdir -p $(INSTALL_ROOT)$$DATADIR/icons/hicolor/32x32/apps;\
	cp -a installer/images/trik-studio-32x32.png $(INSTALL_ROOT)$$DATADIR/icons/hicolor/32x32/apps/trikStudio.png;\
	test -d $(INSTALL_ROOT)$$DATADIR/icons/hicolor/48x48/apps || mkdir -p $(INSTALL_ROOT)$$DATADIR/icons/hicolor/48x48/apps/;\
	cp -a installer/images/trik-studio-48x48.png $(INSTALL_ROOT)$$DATADIR/icons/hicolor/48x48/apps/trikStudio.png;\
	test -d $(INSTALL_ROOT)$$DATADIR/applications || mkdir -p $(INSTALL_ROOT)$$DATADIR/applications;\
	cp -a installer/platform/trikStudio.desktop.in $(INSTALL_ROOT)$$DATADIR/applications/trikStudio.desktop

	INSTALLS += res
}

# Copyright 2016 Anton Midyukov
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

unix:!macx {
	isEmpty(PREFIX) {
		PREFIX = /usr/local
	}

	contains(QMAKE_HOST.arch, x86_64) {LIBDIR="$$PREFIX/lib64"} else {LIBDIR="$$PREFIX/lib"}
	BINDIR = $$PREFIX/bin
	DATADIR = $$PREFIX/share
	PROGRAMDIR = $$DATADIR/trikStudio
	PLUGINDIR = $$LIBDIR/trikStudio
	CONFFILE = /etc/trikStudio.config

	#MAKE INSTALL

	res.path = $$PROGRAMDIR
	res.extra = install -Dp -m0755 bin/release/qreal $(INSTALL_ROOT)$$BINDIR/qreal;\
	install -Dp -m0755 installer/platform/trikStudio.sh $(INSTALL_ROOT)$$BINDIR/trikStudio;\
	test -d $(INSTALL_ROOT)$$LIBDIR/ || mkdir -p $(INSTALL_ROOT)$$LIBDIR/;\
	cp -a bin/release/*.so* $(INSTALL_ROOT)$$LIBDIR;\
	test -d $(INSTALL_ROOT)$$PLUGINDIR || mkdir -p $(INSTALL_ROOT)$$PLUGINDIR;\
	cp -a bin/release/plugins/* $(INSTALL_ROOT)$$PLUGINDIR/;\
	cp -a bin/release/translations $(INSTALL_ROOT)$$PROGRAMDIR/;\
	cp -a bin/release/help $(INSTALL_ROOT)$$PROGRAMDIR/;\
	cp -a bin/release/images $(INSTALL_ROOT)$$PROGRAMDIR/;\
	cp -a bin/release/examples $(INSTALL_ROOT)$$PROGRAMDIR/;\
	cp -a bin/release/splashscreen.png $(INSTALL_ROOT)$$PROGRAMDIR/images;\
	test -d $(INSTALL_ROOT)/etc || mkdir -p $(INSTALL_ROOT)/etc;\
	echo 'pathToLogs=.config/trikStudio/logs/' > $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToImages=$$PROGRAMDIR/images/iconset1/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToHelp=$$PROGRAMDIR/help/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToTranslations=$$PROGRAMDIR/translations/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToTrikRuntime=$$PROGRAMDIR/trikRuntime/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToPascalRuntime=$$PROGRAMDIR/trikSharp/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToGeneratorRoot=$$PROGRAMDIR/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToExamples=$$PROGRAMDIR/examples/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToEditorPlugins=$$PLUGINDIR/editors/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToToolPlugins=$$PLUGINDIR/tools/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToKitPlugins=$$PLUGINDIR/tools/kitPlugins/" >> $(INSTALL_ROOT)$$CONFFILE;\
	echo "pathToSplashscreen=$$PROGRAMDIR/images/splashscreen.png" >> $(INSTALL_ROOT)$$CONFFILE;\
	test -d $(INSTALL_ROOT)$$DATADIR/icons/hicolor/16x16/apps || mkdir -p $(INSTALL_ROOT)$$DATADIR/icons/hicolor/16x16/apps;\
	cp -a installer/images/trik-studio-16x16.png $(INSTALL_ROOT)$$DATADIR/icons/hicolor/16x16/apps/trikStudio.png;\
	test -d $(INSTALL_ROOT)$$DATADIR/icons/hicolor/32x32/apps || mkdir -p $(INSTALL_ROOT)$$DATADIR/icons/hicolor/32x32/apps;\
	cp -a installer/images/trik-studio-32x32.png $(INSTALL_ROOT)$$DATADIR/icons/hicolor/32x32/apps/trikStudio.png;\
	test -d $(INSTALL_ROOT)$$DATADIR/icons/hicolor/48x48/apps || mkdir -p $(INSTALL_ROOT)$$DATADIR/icons/hicolor/48x48/apps/;\
	cp -a installer/images/trik-studio-48x48.png $(INSTALL_ROOT)$$DATADIR/icons/hicolor/48x48/apps/trikStudio.png;\
	test -d $(INSTALL_ROOT)$$DATADIR/applications || mkdir -p $(INSTALL_ROOT)$$DATADIR/applications;\
	cp -a installer/platform/trikStudio.desktop.in $(INSTALL_ROOT)$$DATADIR/applications/trikStudio.desktop

	INSTALLS += res
}


Changes: The desktop background interface should also be installed

RevBy: TrustMe

# Input
HEADERS += homeapplication.h \
    windowinfo.h \
    home.h \
    desktop.h \
    desktopmodel.h \
    desktopview.h \
    desktopstyle.h \
    extendedbuttonview.h \
    extendedbuttonstyle.h \
    mainwindow.h \
    launcher.h \
    launcherview.h \
    launchermodel.h \
    launcherstyle.h \
    launcheraction.h \
    launcherbutton.h \
    launcherbuttonview.h \
    launcherbuttonmodel.h \
    launcherbuttonstyle.h \
    pagedpanning.h \
    pagedviewport.h \
    pagedviewportstyle.h \
    pagedviewportview.h \
    quicklaunchbar.h \
    quicklaunchbarmodel.h \
    quicklaunchbarview.h \
    quicklaunchbarstyle.h \
    switcher.h \
    switchermodel.h \
    switcherview.h \
    switcherstyle.h \
    switcherbutton.h \
    switcherbuttonmodel.h \
    switcherbuttonview.h \
    switcherbuttonstyle.h \
    switcherbuttonwithtitlebarview.h \
    switcherbuttonwithtitlebarstyle.h \
    transformlayoutanimation.h \
    transformlayoutanimationstyle.h \
    x11wrapper.h \
    launcherpage.h \
    launcherpageview.h \
    launcherpagestyle.h \
    launcherpagemodel.h \
    launcherdatastore.h \
    pagepositionindicatorview.h \
    pagepositionindicatorstyle.h \
    pagepositionindicatormodel.h \
    pagepositionindicator.h \
    homescreenservice.h \
    homescreenadaptor.h \
    homewindowmonitor.h \
    windowmonitor.h \
    applicationpackagemonitor.h \
    applicationpackagemonitorlistener.h \
    xeventlistener.h \
    launcherbuttonprogressindicatorview.h \
    launcherbuttonprogressindicatorstyle.h \
    launcherbuttonprogressindicator.h \
    launcherbuttonprogressindicatormodel.h
SOURCES += homeapplication.cpp \
    windowinfo.cpp \
    home.cpp \
    desktop.cpp \
    desktopview.cpp \
    extendedbuttonview.cpp \
    mainwindow.cpp \
    launcher.cpp \
    launcherview.cpp \
    launcheraction.cpp \
    launcherbutton.cpp \
    launcherbuttonview.cpp \
    pagedpanning.cpp \
    pagedviewport.cpp \
    pagedviewportview.cpp \
    quicklaunchbar.cpp \
    quicklaunchbarview.cpp \
    switcher.cpp \
    switcherview.cpp \
    switcherbutton.cpp \
    switcherbuttonview.cpp \
    switcherbuttonwithtitlebarview.cpp \
    transformlayoutanimation.cpp \
    x11wrapper.cpp \
    launcherpage.cpp \
    launcherpageview.cpp \
    launcherdatastore.cpp \
    pagepositionindicatorview.cpp \
    pagepositionindicator.cpp \
    homescreenservice.cpp \
    homescreenadaptor.cpp \
    homewindowmonitor.cpp \
    applicationpackagemonitor.cpp \
    applicationpackagemonitorlistener.cpp \
    xeventlistener.cpp \
    launcherbuttonprogressindicatorview.cpp \
    launcherbuttonprogressindicator.cpp
MODEL_HEADERS += desktopmodel.h \
    launcherbuttonmodel.h \
    launchermodel.h \
    quicklaunchbarmodel.h \
    switcherbuttonmodel.h \
    switchermodel.h \
    launcherpagemodel.h \
    pagepositionindicatormodel.h \
    launcherbuttonprogressindicatormodel.h
STYLE_HEADERS += desktopstyle.h \
    extendedbuttonstyle.h \
    launcherstyle.h \
    launcherbuttonstyle.h \
    launcherpagestyle.h \
    quicklaunchbarstyle.h \
    switcherbuttonstyle.h \
    switcherbuttonwithtitlebarstyle.h \
    switcherstyle.h \
    pagepositionindicatorstyle.h \
    pagedviewportstyle.h \
    transformlayoutanimationstyle.h \
    launcherbuttonprogressindicatorstyle.h
INSTALL_HEADERS += $$HEADERS \
    mdesktopbackgroundextensioninterface.h


QmlDesigner: V8 is not anymore present in 5.2

Change-Id: Ie154a02719f4706b9edc872767b137fe6f9977bc
Reviewed-by: Maurice Kalinowski <4a4c8e0f704a5a30e402fd2bb0da8c84a569e2df@digia.com>
Reviewed-by: Thomas Hartmann <588ee739c05aab7547907becfd1420d2b7316069@digia.com>
(cherry picked from commit 7be0100298b9132fa61760963db3c23db62ad81b)

QT += core gui widgets qml quick network
!isEmpty(QT.webkit.name) {
    QT += webkit
}

!isEmpty(QT.v8.name) {
    QT += v8
}

QT += core-private qml-private quick-private gui-private script-private

!isEmpty(QT.v8.name) {
    QT += v8-private
}

!macx {
    CONFIG += c++11
}

DEFINES += QWEAKPOINTER_ENABLE_ARROW

include (../instances/instances.pri)
include (instances/instances.pri)
include (../commands/commands.pri)
include (../container/container.pri)
include (../interfaces/interfaces.pri)

QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
!isEmpty(QT_BREAKPAD_ROOT_PATH) {
    include($$QT_BREAKPAD_ROOT_PATH/qtbreakpad.pri)
}

SOURCES +=  $$PWD/qml2puppetmain.cpp
RESOURCES +=  $$PWD/../qmlpuppet.qrc
DEFINES -= QT_NO_CAST_FROM_ASCII

OTHER_FILES += Info.plist.in
macx {
    isEmpty(QTCREATOR_PRI_INCLUDED) {
        # So this .pri file is used by
        # compiling the sources that were deployed to Qt Creator,
        # and the Info.plist was generated by static.pro at build time
        QMAKE_INFO_PLIST = $$PWD/Info.plist
    } else {
        # So this .pri file is used from Qt Creator source tree,
        # and we need to generate the Info.plist
        info.input = $$PWD/Info.plist.in
        info.output = $$DESTDIR/$${TARGET}.app/Contents/Info.plist
        QMAKE_SUBSTITUTES += info
    }
} else {
    target.path  = $$QTC_PREFIX/bin
    INSTALLS    += target
}

QT += core gui widgets qml quick network v8
!isEmpty(QT.webkit.name) {
    QT += webkit
}

QT += core-private qml-private quick-private gui-private script-private v8-private

!macx {
    CONFIG += c++11
}

DEFINES += QWEAKPOINTER_ENABLE_ARROW

include (../instances/instances.pri)
include (instances/instances.pri)
include (../commands/commands.pri)
include (../container/container.pri)
include (../interfaces/interfaces.pri)

QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
!isEmpty(QT_BREAKPAD_ROOT_PATH) {
    include($$QT_BREAKPAD_ROOT_PATH/qtbreakpad.pri)
}

SOURCES +=  $$PWD/qml2puppetmain.cpp
RESOURCES +=  $$PWD/../qmlpuppet.qrc
DEFINES -= QT_NO_CAST_FROM_ASCII

OTHER_FILES += Info.plist.in
macx {
    isEmpty(QTCREATOR_PRI_INCLUDED) {
        # So this .pri file is used by
        # compiling the sources that were deployed to Qt Creator,
        # and the Info.plist was generated by static.pro at build time
        QMAKE_INFO_PLIST = $$PWD/Info.plist
    } else {
        # So this .pri file is used from Qt Creator source tree,
        # and we need to generate the Info.plist
        info.input = $$PWD/Info.plist.in
        info.output = $$DESTDIR/$${TARGET}.app/Contents/Info.plist
        QMAKE_SUBSTITUTES += info
    }
} else {
    target.path  = $$QTC_PREFIX/bin
    INSTALLS    += target
}


edit mathUtils.pri

edit mathUtils.pri

HEADERS += \
	$$PWD/gaussNoise.h \

SOURCES += \
	$$PWD/gaussNoise.cpp \

HEADERS += \
	mathUtils/gaussNoise.h \

SOURCES += \
	mathUtils/gaussNoise.cpp \


fix build for standard DirectX install paths

Evaluate the environment variable DXSDK_DIR at qmake time.
This makes sure, the contents get properly quoted, even if the DirectX
SDK is installed into a path that contains spaces.

Change-Id: Id22f56448eef4d392af77e97f46308f1b486c7c7
Reviewed-by: Oswald Buddenhagen <6a8868beda3e139b5ac22b2534a23d3e6ba81819@digia.com>

INCLUDEPATH += $$PWD

DEFINES += QMEDIA_DIRECTSHOW_CAMERA

win32-g++: DEFINES += QT_NO_WMSDK

win32: DEFINES += _CRT_SECURE_NO_WARNINGS

HEADERS += \
    $$PWD/dscameraservice.h \
    $$PWD/dscameracontrol.h \
    $$PWD/dsvideorenderer.h \
    $$PWD/dsvideodevicecontrol.h \
    $$PWD/dsimagecapturecontrol.h \
    $$PWD/dscamerasession.h \
    $$PWD/directshowglobal.h

SOURCES += \
    $$PWD/dscameraservice.cpp \
    $$PWD/dscameracontrol.cpp \
    $$PWD/dsvideorenderer.cpp \
    $$PWD/dsvideodevicecontrol.cpp \
    $$PWD/dsimagecapturecontrol.cpp \
    $$PWD/dscamerasession.cpp

!isEmpty(QT.widgets.name) {
    HEADERS += $$PWD/dsvideowidgetcontrol.h
    SOURCES += $$PWD/dsvideowidgetcontrol.cpp
}

*-msvc*:INCLUDEPATH += $$(DXSDK_DIR)/include
LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32

INCLUDEPATH += $$PWD

DEFINES += QMEDIA_DIRECTSHOW_CAMERA

win32-g++: DEFINES += QT_NO_WMSDK

win32: DEFINES += _CRT_SECURE_NO_WARNINGS

HEADERS += \
    $$PWD/dscameraservice.h \
    $$PWD/dscameracontrol.h \
    $$PWD/dsvideorenderer.h \
    $$PWD/dsvideodevicecontrol.h \
    $$PWD/dsimagecapturecontrol.h \
    $$PWD/dscamerasession.h \
    $$PWD/directshowglobal.h

SOURCES += \
    $$PWD/dscameraservice.cpp \
    $$PWD/dscameracontrol.cpp \
    $$PWD/dsvideorenderer.cpp \
    $$PWD/dsvideodevicecontrol.cpp \
    $$PWD/dsimagecapturecontrol.cpp \
    $$PWD/dscamerasession.cpp

!isEmpty(QT.widgets.name) {
    HEADERS += $$PWD/dsvideowidgetcontrol.h
    SOURCES += $$PWD/dsvideowidgetcontrol.cpp
}

*-msvc*:INCLUDEPATH += $(DXSDK_DIR)/include
LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32