Enable C++11 on all platforms except Mac/release

This allows us to profit from the Qt extensions for C++11, and also
makes sure e.g. QTC_OVERRIDE is consistenly checked. We can't enable
it (yet) for Mac/release though to be able to deploy to 10.6 ..

Change-Id: Icd26ab5f971532ff10a892221c653987026ac88d
Reviewed-by: Eike Ziller <c142da16c73a95a82d35191bcc55b22835617128@digia.com>

!isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included")
QTCREATOR_PRI_INCLUDED = 1

QTCREATOR_VERSION = 3.0.81
QTCREATOR_COMPAT_VERSION = 3.0.81
BINARY_ARTIFACTS_BRANCH = master

# enable c++11 on everything but mac/release (breaks 10.6)
!macx|CONFIG(debug, debug|release): CONFIG += c++11

isEqual(QT_MAJOR_VERSION, 5) {

defineReplace(cleanPath) {
    return($$clean_path($$1))
}

defineReplace(targetPath) {
    return($$shell_path($$1))
}

} else { # qt5

defineReplace(cleanPath) {
    win32:1 ~= s|\\\\|/|g
    contains(1, ^/.*):pfx = /
    else:pfx =
    segs = $$split(1, /)
    out =
    for(seg, segs) {
        equals(seg, ..):out = $$member(out, 0, -2)
        else:!equals(seg, .):out += $$seg
    }
    return($$join(out, /, $$pfx))
}

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

} # qt5

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

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

isEqual(QT_MAJOR_VERSION, 5) {

# For use in custom compilers which just copy files
defineReplace(stripSrcDir) {
    return($$relative_path($$absolute_path($$1, $$OUT_PWD), $$_PRO_FILE_PWD_))
}

} else { # qt5

# For use in custom compilers which just copy files
win32:i_flag = i
defineReplace(stripSrcDir) {
    win32 {
        !contains(1, ^.:.*):1 = $$OUT_PWD/$$1
    } else {
        !contains(1, ^/.*):1 = $$OUT_PWD/$$1
    }
    out = $$cleanPath($$1)
    out ~= s|^$$re_escape($$_PRO_FILE_PWD_/)||$$i_flag
    return($$out)
}

} # qt5

!isEmpty(BUILD_TESTS):TEST = 1

isEmpty(TEST):CONFIG(debug, debug|release) {
    !debug_and_release|build_pass {
        TEST = 1
    }
}

isEmpty(IDE_LIBRARY_BASENAME) {
    IDE_LIBRARY_BASENAME = lib
}

equals(TEST, 1) {
    QT +=testlib
    DEFINES += WITH_TESTS
}

IDE_SOURCE_TREE = $$PWD
isEmpty(IDE_BUILD_TREE) {
    sub_dir = $$_PRO_FILE_PWD_
    sub_dir ~= s,^$$re_escape($$PWD),,
    IDE_BUILD_TREE = $$cleanPath($$OUT_PWD)
    IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
}
IDE_APP_PATH = $$IDE_BUILD_TREE/bin
macx {
    IDE_APP_TARGET   = "Qt Creator"
    IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DATA_PATH    = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DOC_PATH     = $$IDE_DATA_PATH/doc
    IDE_BIN_PATH     = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS
    copydata = 1
    !isEqual(QT_MAJOR_VERSION, 5) {
        # we use @rpath which is 10.5+
        # Qt5 doesn't support 10.5, and will set the minimum version to 10.6 or 10.7.
        QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
        QMAKE_LFLAGS *= -mmacosx-version-min=10.5
    }
} else {
    contains(TEMPLATE, vc.*):vcproj = 1
    IDE_APP_TARGET   = qtcreator
    IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH/plugins
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME
    IDE_DATA_PATH    = $$IDE_BUILD_TREE/share/qtcreator
    IDE_DOC_PATH     = $$IDE_BUILD_TREE/share/doc/qtcreator
    IDE_BIN_PATH     = $$IDE_APP_PATH
    !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
}

INCLUDEPATH += \
    $$IDE_BUILD_TREE/src \ # for <app/app_version.h>
    $$IDE_SOURCE_TREE/src/libs \
    $$IDE_SOURCE_TREE/tools

QTC_PLUGIN_DIRS += $$IDE_SOURCE_TREE/src/plugins
for(dir, QTC_PLUGIN_DIRS) {
    INCLUDEPATH += $$dir
}

CONFIG += depend_includepath

LIBS += -L$$IDE_LIBRARY_PATH

!isEmpty(vcproj) {
    DEFINES += IDE_LIBRARY_BASENAME=\"$$IDE_LIBRARY_BASENAME\"
} else {
    DEFINES += IDE_LIBRARY_BASENAME=\\\"$$IDE_LIBRARY_BASENAME\\\"
}

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

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

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

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

win32-msvc* {
    #Don't warn about sprintf, fopen etc being 'unsafe'
    DEFINES += _CRT_SECURE_NO_WARNINGS
    # Speed up startup time when debugging with cdb
    QMAKE_LFLAGS_DEBUG += /INCREMENTAL:NO
}

qt:greaterThan(QT_MAJOR_VERSION, 4) {
    contains(QT, core): QT += concurrent
    contains(QT, gui): QT += widgets
    DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x040900
}

QBSFILE = $$replace(_PRO_FILE_, \\.pro$, .qbs)
exists($$QBSFILE):OTHER_FILES += $$QBSFILE

# recursively resolve plugin deps
done_plugins =
for(ever) {
    isEmpty(QTC_PLUGIN_DEPENDS): \
        break()
    done_plugins += $$QTC_PLUGIN_DEPENDS
    for(dep, QTC_PLUGIN_DEPENDS) {
        dependencies_file =
        for(dir, QTC_PLUGIN_DIRS) {
            exists($$dir/$$dep/$${dep}_dependencies.pri) {
                dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
                break()
            }
        }
        isEmpty(dependencies_file): \
            error("Plugin dependency $$dep not found")
        include($$dependencies_file)
        LIBS += -l$$qtLibraryName($$QTC_PLUGIN_NAME)
    }
    QTC_PLUGIN_DEPENDS = $$unique(QTC_PLUGIN_DEPENDS)
    QTC_PLUGIN_DEPENDS -= $$unique(done_plugins)
}

# recursively resolve library deps
done_libs =
for(ever) {
    isEmpty(QTC_LIB_DEPENDS): \
        break()
    done_libs += $$QTC_LIB_DEPENDS
    for(dep, QTC_LIB_DEPENDS) {
        include($$PWD/src/libs/$$dep/$${dep}_dependencies.pri)
        LIBS += -l$$qtLibraryName($$QTC_LIB_NAME)
    }
    QTC_LIB_DEPENDS = $$unique(QTC_LIB_DEPENDS)
    QTC_LIB_DEPENDS -= $$unique(done_libs)
}

!isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included")
QTCREATOR_PRI_INCLUDED = 1

QTCREATOR_VERSION = 3.0.81
QTCREATOR_COMPAT_VERSION = 3.0.81
BINARY_ARTIFACTS_BRANCH = master

isEqual(QT_MAJOR_VERSION, 5) {

defineReplace(cleanPath) {
    return($$clean_path($$1))
}

defineReplace(targetPath) {
    return($$shell_path($$1))
}

} else { # qt5

defineReplace(cleanPath) {
    win32:1 ~= s|\\\\|/|g
    contains(1, ^/.*):pfx = /
    else:pfx =
    segs = $$split(1, /)
    out =
    for(seg, segs) {
        equals(seg, ..):out = $$member(out, 0, -2)
        else:!equals(seg, .):out += $$seg
    }
    return($$join(out, /, $$pfx))
}

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

} # qt5

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

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

isEqual(QT_MAJOR_VERSION, 5) {

# For use in custom compilers which just copy files
defineReplace(stripSrcDir) {
    return($$relative_path($$absolute_path($$1, $$OUT_PWD), $$_PRO_FILE_PWD_))
}

} else { # qt5

# For use in custom compilers which just copy files
win32:i_flag = i
defineReplace(stripSrcDir) {
    win32 {
        !contains(1, ^.:.*):1 = $$OUT_PWD/$$1
    } else {
        !contains(1, ^/.*):1 = $$OUT_PWD/$$1
    }
    out = $$cleanPath($$1)
    out ~= s|^$$re_escape($$_PRO_FILE_PWD_/)||$$i_flag
    return($$out)
}

} # qt5

!isEmpty(BUILD_TESTS):TEST = 1

isEmpty(TEST):CONFIG(debug, debug|release) {
    !debug_and_release|build_pass {
        TEST = 1
    }
}

isEmpty(IDE_LIBRARY_BASENAME) {
    IDE_LIBRARY_BASENAME = lib
}

equals(TEST, 1) {
    QT +=testlib
    DEFINES += WITH_TESTS
}

IDE_SOURCE_TREE = $$PWD
isEmpty(IDE_BUILD_TREE) {
    sub_dir = $$_PRO_FILE_PWD_
    sub_dir ~= s,^$$re_escape($$PWD),,
    IDE_BUILD_TREE = $$cleanPath($$OUT_PWD)
    IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
}
IDE_APP_PATH = $$IDE_BUILD_TREE/bin
macx {
    IDE_APP_TARGET   = "Qt Creator"
    IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DATA_PATH    = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DOC_PATH     = $$IDE_DATA_PATH/doc
    IDE_BIN_PATH     = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS
    copydata = 1
    !isEqual(QT_MAJOR_VERSION, 5) {
        # we use @rpath which is 10.5+
        # Qt5 doesn't support 10.5, and will set the minimum version to 10.6 or 10.7.
        QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
        QMAKE_LFLAGS *= -mmacosx-version-min=10.5
    }
} else {
    contains(TEMPLATE, vc.*):vcproj = 1
    IDE_APP_TARGET   = qtcreator
    IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH/plugins
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME
    IDE_DATA_PATH    = $$IDE_BUILD_TREE/share/qtcreator
    IDE_DOC_PATH     = $$IDE_BUILD_TREE/share/doc/qtcreator
    IDE_BIN_PATH     = $$IDE_APP_PATH
    !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
}

INCLUDEPATH += \
    $$IDE_BUILD_TREE/src \ # for <app/app_version.h>
    $$IDE_SOURCE_TREE/src/libs \
    $$IDE_SOURCE_TREE/tools

QTC_PLUGIN_DIRS += $$IDE_SOURCE_TREE/src/plugins
for(dir, QTC_PLUGIN_DIRS) {
    INCLUDEPATH += $$dir
}

CONFIG += depend_includepath

LIBS += -L$$IDE_LIBRARY_PATH

!isEmpty(vcproj) {
    DEFINES += IDE_LIBRARY_BASENAME=\"$$IDE_LIBRARY_BASENAME\"
} else {
    DEFINES += IDE_LIBRARY_BASENAME=\\\"$$IDE_LIBRARY_BASENAME\\\"
}

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

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

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

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

win32-msvc* {
    #Don't warn about sprintf, fopen etc being 'unsafe'
    DEFINES += _CRT_SECURE_NO_WARNINGS
    # Speed up startup time when debugging with cdb
    QMAKE_LFLAGS_DEBUG += /INCREMENTAL:NO
}

qt:greaterThan(QT_MAJOR_VERSION, 4) {
    contains(QT, core): QT += concurrent
    contains(QT, gui): QT += widgets
    DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x040900
}

QBSFILE = $$replace(_PRO_FILE_, \\.pro$, .qbs)
exists($$QBSFILE):OTHER_FILES += $$QBSFILE

# recursively resolve plugin deps
done_plugins =
for(ever) {
    isEmpty(QTC_PLUGIN_DEPENDS): \
        break()
    done_plugins += $$QTC_PLUGIN_DEPENDS
    for(dep, QTC_PLUGIN_DEPENDS) {
        dependencies_file =
        for(dir, QTC_PLUGIN_DIRS) {
            exists($$dir/$$dep/$${dep}_dependencies.pri) {
                dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
                break()
            }
        }
        isEmpty(dependencies_file): \
            error("Plugin dependency $$dep not found")
        include($$dependencies_file)
        LIBS += -l$$qtLibraryName($$QTC_PLUGIN_NAME)
    }
    QTC_PLUGIN_DEPENDS = $$unique(QTC_PLUGIN_DEPENDS)
    QTC_PLUGIN_DEPENDS -= $$unique(done_plugins)
}

# recursively resolve library deps
done_libs =
for(ever) {
    isEmpty(QTC_LIB_DEPENDS): \
        break()
    done_libs += $$QTC_LIB_DEPENDS
    for(dep, QTC_LIB_DEPENDS) {
        include($$PWD/src/libs/$$dep/$${dep}_dependencies.pri)
        LIBS += -l$$qtLibraryName($$QTC_LIB_NAME)
    }
    QTC_LIB_DEPENDS = $$unique(QTC_LIB_DEPENDS)
    QTC_LIB_DEPENDS -= $$unique(done_libs)
}


Fall back to dylib copying since I can not get rpath to work

fmi_home = $${PWD}/FMILibrary

INCLUDEPATH *= $${fmi_home}/include
LIBS *= -L$${fmi_home}/lib -lfmilib_shared

macx {
  QMAKE_RPATHDIR *= $${fmi_home}/lib
  # TODO: I am unable to get RPATH to work on osx, so ugly copying the dylib file for now
  QMAKE_POST_LINK += $$QMAKE_COPY $$quote($${fmi_home}/lib/libfmilib_shared.dylib) $$quote($${PWD}/../bin) $$escape_expand(\\n\\t)
} else {
  # Note! The RPATH is absolute and only meant for dev builds in the IDE, on release runtime paths should be stripped
  QMAKE_RPATHDIR *= $${fmi_home}/lib
}

fmi_home = $${PWD}/FMILibrary

INCLUDEPATH *= $${fmi_home}/include
LIBS *= -L$${fmi_home}/lib -lfmilib_shared
# Note! The RPATH is absolute and only meant for dev builds in the IDE, on release runtime paths should be stripped
QMAKE_RPATHDIR *= $${fmi_home}/lib


ClangCodeModel: discard stderr during clang detection

Otherwise we get useless noise in the General Messages pane if clang
isn't installed.

Change-Id: I8d34f79f1054b87b8530fcf6f253524a4c73897c
Reviewed-by: Oswald Buddenhagen <6a8868beda3e139b5ac22b2534a23d3e6ba81819@digia.com>
Reviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@digia.com>

isEmpty(LLVM_INSTALL_DIR):LLVM_INSTALL_DIR=$$(LLVM_INSTALL_DIR)
LLVM_INSTALL_DIR ~= s,\\\\,/,g

DEFINES += CLANG_COMPLETION
DEFINES += CLANG_HIGHLIGHTING
#DEFINES += CLANG_INDEXING

defineReplace(findLLVMConfig) {
    LLVM_CONFIG_VARIANTS = \
        llvm-config llvm-config-3.2 llvm-config-3.3 llvm-config-3.4 \
        llvm-config-3.5 llvm-config-3.6 llvm-config-4.0 llvm-config-4.1

    # Prefer llvm-config* from LLVM_INSTALL_DIR
    !isEmpty(LLVM_INSTALL_DIR) {
        for(variant, LLVM_CONFIG_VARIANTS) {
            variant=$$LLVM_INSTALL_DIR/bin/$$variant
            exists($$variant) {
                return($$variant)
            }
        }
    }

    # Find llvm-config* in PATH
    ENV_PATH = $$(PATH)
    ENV_PATH = $$split(ENV_PATH, $$QMAKE_DIRLIST_SEP)
    for(variant, LLVM_CONFIG_VARIANTS) {
        for(path, ENV_PATH) {
            subvariant = $$path/$$variant
            exists($$subvariant) {
                return($$subvariant)
            }
        }
    }

    # Fallback
    return(llvm-config)
}

defineReplace(findClangOnWindows) {
    FILE_EXTS = a dll
    win32-msvc*: FILE_EXTS = lib dll
    for (suffix, $$list(lib bin)) {
        for (libname, $$list(clang libclang)) {
            for (ext, FILE_EXTS) {
                exists("$${LLVM_INSTALL_DIR}/$${suffix}/$${libname}.$${ext}")
                    return($${LLVM_INSTALL_DIR}/$${suffix}/)
            }
        }
    }
    error("Cannot find clang shared library at $${LLVM_INSTALL_DIR}")
}

win32 {
    LLVM_INCLUDEPATH = "$$LLVM_INSTALL_DIR/include"
    CLANG_LIB_PATH = $$findClangOnWindows()
    CLANG_LIB = clang
    !exists("$${CLANG_LIB_PATH}/clang.*"):CLANG_LIB = libclang

    LLVM_LIBS = -L"$${CLANG_LIB_PATH}" -l$${CLANG_LIB}
    LLVM_LIBS += -ladvapi32 -lshell32
    LLVM_VERSION = 3.4
}

unix {
    LLVM_CONFIG = $$findLLVMConfig()

    LLVM_VERSION = $$system($$LLVM_CONFIG --version 2>/dev/null)
    LLVM_VERSION = $$replace(LLVM_VERSION, ^(\\d+\\.\\d+).*$, \\1)
    message("... version $$LLVM_VERSION")

    LLVM_INCLUDEPATH = $$system($$LLVM_CONFIG --includedir 2>/dev/null)
    isEmpty(LLVM_INCLUDEPATH):LLVM_INCLUDEPATH=$$LLVM_INSTALL_DIR/include
    LLVM_LIBDIR = $$system($$LLVM_CONFIG --libdir 2>/dev/null)
    isEmpty(LLVM_LIBDIR):LLVM_LIBDIR=$$LLVM_INSTALL_DIR/lib

    exists ($${LLVM_LIBDIR}/libclang.*) {
        #message("LLVM was build with autotools")
        CLANG_LIB = clang
    } else {
        exists ($${LLVM_LIBDIR}/liblibclang.*) {
            #message("LLVM was build with CMake")
            CLANG_LIB = libclang
        } else {
            exists ($${LLVM_INSTALL_DIR}/lib/libclang.*) {
                #message("libclang placed separately from LLVM")
                CLANG_LIB = clang
                LLVM_LIBDIR = $${LLVM_INSTALL_DIR}/lib
                LLVM_INCLUDEPATH=$${LLVM_INSTALL_DIR}/include
            } else {
                error("Cannot find Clang shared library!")
            }
        }
    }

    LLVM_LIBS = -L$${LLVM_LIBDIR}
    LLVM_LIBS += -l$${CLANG_LIB}
}

DEFINES += CLANG_VERSION=\\\"$${LLVM_VERSION}\\\"
DEFINES += "\"CLANG_RESOURCE_DIR=\\\"$${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include\\\"\""

isEmpty(LLVM_INSTALL_DIR):LLVM_INSTALL_DIR=$$(LLVM_INSTALL_DIR)
LLVM_INSTALL_DIR ~= s,\\\\,/,g

DEFINES += CLANG_COMPLETION
DEFINES += CLANG_HIGHLIGHTING
#DEFINES += CLANG_INDEXING

defineReplace(findLLVMConfig) {
    LLVM_CONFIG_VARIANTS = \
        llvm-config llvm-config-3.2 llvm-config-3.3 llvm-config-3.4 \
        llvm-config-3.5 llvm-config-3.6 llvm-config-4.0 llvm-config-4.1

    # Prefer llvm-config* from LLVM_INSTALL_DIR
    !isEmpty(LLVM_INSTALL_DIR) {
        for(variant, LLVM_CONFIG_VARIANTS) {
            variant=$$LLVM_INSTALL_DIR/bin/$$variant
            exists($$variant) {
                return($$variant)
            }
        }
    }

    # Find llvm-config* in PATH
    ENV_PATH = $$(PATH)
    ENV_PATH = $$split(ENV_PATH, $$QMAKE_DIRLIST_SEP)
    for(variant, LLVM_CONFIG_VARIANTS) {
        for(path, ENV_PATH) {
            subvariant = $$path/$$variant
            exists($$subvariant) {
                return($$subvariant)
            }
        }
    }

    # Fallback
    return(llvm-config)
}

defineReplace(findClangOnWindows) {
    FILE_EXTS = a dll
    win32-msvc*: FILE_EXTS = lib dll
    for (suffix, $$list(lib bin)) {
        for (libname, $$list(clang libclang)) {
            for (ext, FILE_EXTS) {
                exists("$${LLVM_INSTALL_DIR}/$${suffix}/$${libname}.$${ext}")
                    return($${LLVM_INSTALL_DIR}/$${suffix}/)
            }
        }
    }
    error("Cannot find clang shared library at $${LLVM_INSTALL_DIR}")
}

win32 {
    LLVM_INCLUDEPATH = "$$LLVM_INSTALL_DIR/include"
    CLANG_LIB_PATH = $$findClangOnWindows()
    CLANG_LIB = clang
    !exists("$${CLANG_LIB_PATH}/clang.*"):CLANG_LIB = libclang

    LLVM_LIBS = -L"$${CLANG_LIB_PATH}" -l$${CLANG_LIB}
    LLVM_LIBS += -ladvapi32 -lshell32
    LLVM_VERSION = 3.4
}

unix {
    LLVM_CONFIG = $$findLLVMConfig()

    LLVM_VERSION = $$system($$LLVM_CONFIG --version)
    LLVM_VERSION = $$replace(LLVM_VERSION, ^(\\d+\\.\\d+).*$, \\1)
    message("... version $$LLVM_VERSION")

    LLVM_INCLUDEPATH = $$system($$LLVM_CONFIG --includedir)
    isEmpty(LLVM_INCLUDEPATH):LLVM_INCLUDEPATH=$$LLVM_INSTALL_DIR/include
    LLVM_LIBDIR = $$system($$LLVM_CONFIG --libdir)
    isEmpty(LLVM_LIBDIR):LLVM_LIBDIR=$$LLVM_INSTALL_DIR/lib

    exists ($${LLVM_LIBDIR}/libclang.*) {
        #message("LLVM was build with autotools")
        CLANG_LIB = clang
    } else {
        exists ($${LLVM_LIBDIR}/liblibclang.*) {
            #message("LLVM was build with CMake")
            CLANG_LIB = libclang
        } else {
            exists ($${LLVM_INSTALL_DIR}/lib/libclang.*) {
                #message("libclang placed separately from LLVM")
                CLANG_LIB = clang
                LLVM_LIBDIR = $${LLVM_INSTALL_DIR}/lib
                LLVM_INCLUDEPATH=$${LLVM_INSTALL_DIR}/include
            } else {
                error("Cannot find Clang shared library!")
            }
        }
    }

    LLVM_LIBS = -L$${LLVM_LIBDIR}
    LLVM_LIBS += -l$${CLANG_LIB}
}

DEFINES += CLANG_VERSION=\\\"$${LLVM_VERSION}\\\"
DEFINES += "\"CLANG_RESOURCE_DIR=\\\"$${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include\\\"\""


version bump 2.2.85 -> 2.3.0

version bump 2.2.85 -> 2.3.0

Change-Id: I0c62f4f1f637b48ae9d332ac4d6a255a9792ad28
Reviewed-on: http://codereview.qt.nokia.com/3394
Reviewed-by: hjk <6fac1c92f5b9c7890a04d7f8a9d8912d16355eac@ovi.com>

!isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included")
QTCREATOR_PRI_INCLUDED = 1

QTCREATOR_VERSION = 2.3.0

defineReplace(cleanPath) {
    win32:1 ~= s|\\\\|/|g
    contains(1, ^/.*):pfx = /
    else:pfx =
    segs = $$split(1, /)
    out =
    for(seg, segs) {
        equals(seg, ..):out = $$member(out, 0, -2)
        else:!equals(seg, .):out += $$seg
    }
    return($$join(out, /, $$pfx))
}

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

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

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)
        }
    }
    return(false)
}

# For use in custom compilers which just copy files
win32:i_flag = i
defineReplace(stripSrcDir) {
    win32 {
        !contains(1, ^.:.*):1 = $$OUT_PWD/$$1
    } else {
        !contains(1, ^/.*):1 = $$OUT_PWD/$$1
    }
    out = $$cleanPath($$1)
    out ~= s|^$$re_escape($$PWD/)||$$i_flag
    return($$out)
}

isEmpty(TEST):CONFIG(debug, debug|release) {
    !debug_and_release|build_pass {
        TEST = 1
    }
}

isEmpty(IDE_LIBRARY_BASENAME) {
    IDE_LIBRARY_BASENAME = lib
}

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

equals(TEST, 1) {
    QT +=testlib
    DEFINES += WITH_TESTS
}

IDE_SOURCE_TREE = $$PWD
isEmpty(IDE_BUILD_TREE) {
    sub_dir = $$_PRO_FILE_PWD_
    sub_dir ~= s,^$$re_escape($$PWD),,
    IDE_BUILD_TREE = $$cleanPath($$OUT_PWD)
    IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
}
IDE_APP_PATH = $$IDE_BUILD_TREE/bin
macx {
    IDE_APP_TARGET   = "Qt Creator"
    IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DATA_PATH    = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DOC_PATH     = $$IDE_DATA_PATH/doc
    IDE_BIN_PATH     = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS
    contains(QT_CONFIG, ppc):CONFIG += ppc x86
    copydata = 1
    isEmpty(TIGER_COMPAT_MODE):TIGER_COMPAT_MODE=$$(QTC_TIGER_COMPAT)
    isEmpty(TIGER_COMPAT_MODE) {
        QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
        QMAKE_LFLAGS *= -mmacosx-version-min=10.5
    }
} else {
    win32 {
        contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1
        IDE_APP_TARGET   = qtcreator
    } else {
        IDE_APP_TARGET   = qtcreator
    }
    IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH/plugins
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME
    IDE_DATA_PATH    = $$IDE_BUILD_TREE/share/qtcreator
    IDE_DOC_PATH     = $$IDE_BUILD_TREE/share/doc/qtcreator
    IDE_BIN_PATH     = $$IDE_APP_PATH
    !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
}

INCLUDEPATH += \
    $$IDE_SOURCE_TREE/src/libs \
    $$IDE_SOURCE_TREE/tools \
    $$IDE_SOURCE_TREE/src/plugins

CONFIG += depend_includepath

LIBS += -L$$IDE_LIBRARY_PATH

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

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

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

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

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

!isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included")
QTCREATOR_PRI_INCLUDED = 1

QTCREATOR_VERSION = 2.2.85

defineReplace(cleanPath) {
    win32:1 ~= s|\\\\|/|g
    contains(1, ^/.*):pfx = /
    else:pfx =
    segs = $$split(1, /)
    out =
    for(seg, segs) {
        equals(seg, ..):out = $$member(out, 0, -2)
        else:!equals(seg, .):out += $$seg
    }
    return($$join(out, /, $$pfx))
}

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

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

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)
        }
    }
    return(false)
}

# For use in custom compilers which just copy files
win32:i_flag = i
defineReplace(stripSrcDir) {
    win32 {
        !contains(1, ^.:.*):1 = $$OUT_PWD/$$1
    } else {
        !contains(1, ^/.*):1 = $$OUT_PWD/$$1
    }
    out = $$cleanPath($$1)
    out ~= s|^$$re_escape($$PWD/)||$$i_flag
    return($$out)
}

isEmpty(TEST):CONFIG(debug, debug|release) {
    !debug_and_release|build_pass {
        TEST = 1
    }
}

isEmpty(IDE_LIBRARY_BASENAME) {
    IDE_LIBRARY_BASENAME = lib
}

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

equals(TEST, 1) {
    QT +=testlib
    DEFINES += WITH_TESTS
}

IDE_SOURCE_TREE = $$PWD
isEmpty(IDE_BUILD_TREE) {
    sub_dir = $$_PRO_FILE_PWD_
    sub_dir ~= s,^$$re_escape($$PWD),,
    IDE_BUILD_TREE = $$cleanPath($$OUT_PWD)
    IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
}
IDE_APP_PATH = $$IDE_BUILD_TREE/bin
macx {
    IDE_APP_TARGET   = "Qt Creator"
    IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DATA_PATH    = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
    IDE_DOC_PATH     = $$IDE_DATA_PATH/doc
    IDE_BIN_PATH     = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS
    contains(QT_CONFIG, ppc):CONFIG += ppc x86
    copydata = 1
    isEmpty(TIGER_COMPAT_MODE):TIGER_COMPAT_MODE=$$(QTC_TIGER_COMPAT)
    isEmpty(TIGER_COMPAT_MODE) {
        QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
        QMAKE_LFLAGS *= -mmacosx-version-min=10.5
    }
} else {
    win32 {
        contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1
        IDE_APP_TARGET   = qtcreator
    } else {
        IDE_APP_TARGET   = qtcreator
    }
    IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator
    IDE_PLUGIN_PATH  = $$IDE_LIBRARY_PATH/plugins
    IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME
    IDE_DATA_PATH    = $$IDE_BUILD_TREE/share/qtcreator
    IDE_DOC_PATH     = $$IDE_BUILD_TREE/share/doc/qtcreator
    IDE_BIN_PATH     = $$IDE_APP_PATH
    !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
}

INCLUDEPATH += \
    $$IDE_SOURCE_TREE/src/libs \
    $$IDE_SOURCE_TREE/tools \
    $$IDE_SOURCE_TREE/src/plugins

CONFIG += depend_includepath

LIBS += -L$$IDE_LIBRARY_PATH

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

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

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

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

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


Added dependence on enum_flags.h header.

CONFIG += c++11

INCLUDEPATH += $$sprelay_source_dir/src/external/enum_flags/src

HEADERS += \
    $$sprelay_source_dir/src/external/enum_flags/src/enum_flags/enum_flags.h

defineReplace(copyToDir) {
    base = $$1
    files = $$2
    dest_dir = $$3
    link =
    destination_dirs =

    # create directory structure at first
    for(file, files) {
        out_filename = $$clean_path($$dest_dir/$$file)
        destination_parent = $$shell_path($$dirname(out_filename))
        !contains(destination_dirs, $$destination_parent) {
            destination_dirs += $$destination_parent
            link += $$sprintf($$QMAKE_MKDIR_CMD, "$$destination_parent") $$escape_expand(\\n\\t)
        }
    }
    for(file, files) {
        link += $$QMAKE_COPY $$shell_path($$clean_path($$base/$$file)) $$shell_path($$clean_path($$dest_dir/$$file)) \
            $$escape_expand(\\n\\t)
    }
    return($$link)
}

CONFIG += c++11

INCLUDEPATH += $$PWD/src/external/enum_flags/src

defineReplace(copyToDir) {
    base = $$1
    files = $$2
    dest_dir = $$3
    link =
    destination_dirs =

    # create directory structure at first
    for(file, files) {
        out_filename = $$clean_path($$dest_dir/$$file)
        destination_parent = $$shell_path($$dirname(out_filename))
        !contains(destination_dirs, $$destination_parent) {
            destination_dirs += $$destination_parent
            link += $$sprintf($$QMAKE_MKDIR_CMD, "$$destination_parent") $$escape_expand(\\n\\t)
        }
    }
    for(file, files) {
        link += $$QMAKE_COPY $$shell_path($$clean_path($$base/$$file)) $$shell_path($$clean_path($$dest_dir/$$file)) \
            $$escape_expand(\\n\\t)
    }
    return($$link)
}


QmlJSDebug: List QtScript as explicit dependency

mingw/4.7.1 does not add QtScript otherwise to the list of files to link against.

# This file is part of Qt Creator
# It enables debugging of Qt Quick applications

QT += declarative script
INCLUDEPATH += $$PWD/include

DEBUGLIB=QmlJSDebugger
CONFIG(debug, debug|release) {
    windows:DEBUGLIB = QmlJSDebuggerd
}
LIBS += -L$$PWD -l$$DEBUGLIB

# This file is part of Qt Creator
# It enables debugging of Qt Quick applications

QT += declarative
INCLUDEPATH += $$PWD/include

DEBUGLIB=QmlJSDebugger
CONFIG(debug, debug|release) {
    windows:DEBUGLIB = QmlJSDebuggerd
}
LIBS += -L$$PWD -l$$DEBUGLIB


Adding symbian libs again with -llib now

INCLUDEPATH += $$PWD/proj/include

SOURCES += $$PWD/proj/PJ_aeqd.c \
        $$PWD/proj/PJ_gnom.c \
        $$PWD/proj/PJ_laea.c \
        $$PWD/proj/PJ_mod_ster.c \
        $$PWD/proj/PJ_nsper.c \
        $$PWD/proj/PJ_nzmg.c \
        $$PWD/proj/PJ_ortho.c \
        $$PWD/proj/PJ_stere.c \
        $$PWD/proj/PJ_sterea.c \
        $$PWD/proj/PJ_aea.c \
        $$PWD/proj/PJ_bipc.c \
        $$PWD/proj/PJ_bonne.c \
        $$PWD/proj/PJ_eqdc.c \
        $$PWD/proj/PJ_imw_p.c \
        $$PWD/proj/PJ_krovak.c \
        $$PWD/proj/PJ_lcc.c \
        $$PWD/proj/PJ_poly.c \
        $$PWD/proj/PJ_rpoly.c \
        $$PWD/proj/PJ_sconics.c \
        $$PWD/proj/proj_rouss.c \
        $$PWD/proj/PJ_cass.c \
        $$PWD/proj/PJ_cc.c \
        $$PWD/proj/PJ_cea.c \
        $$PWD/proj/PJ_eqc.c \
        $$PWD/proj/PJ_gall.c \
        $$PWD/proj/PJ_labrd.c \
        $$PWD/proj/PJ_lsat.c \
        $$PWD/proj/PJ_merc.c \
        $$PWD/proj/PJ_mill.c \
        $$PWD/proj/PJ_ocea.c \
        $$PWD/proj/PJ_omerc.c \
        $$PWD/proj/PJ_somerc.c \
        $$PWD/proj/PJ_tcc.c \
        $$PWD/proj/PJ_tcea.c \
        $$PWD/proj/PJ_tmerc.c \
        $$PWD/proj/PJ_airy.c \
        $$PWD/proj/PJ_aitoff.c \
        $$PWD/proj/PJ_august.c \
        $$PWD/proj/PJ_bacon.c \
        $$PWD/proj/PJ_chamb.c \
        $$PWD/proj/PJ_hammer.c \
        $$PWD/proj/PJ_lagrng.c \
        $$PWD/proj/PJ_larr.c \
        $$PWD/proj/PJ_lask.c \
        $$PWD/proj/PJ_nocol.c \
        $$PWD/proj/PJ_ob_tran.c \
        $$PWD/proj/PJ_oea.c \
        $$PWD/proj/PJ_tpeqd.c \
        $$PWD/proj/PJ_vandg.c \
        $$PWD/proj/PJ_vandg2.c \
        $$PWD/proj/PJ_vandg4.c \
        $$PWD/proj/PJ_wag7.c \
        $$PWD/proj/PJ_lcca.c \
        $$PWD/proj/PJ_geos.c \
        $$PWD/proj/PJ_boggs.c \
        $$PWD/proj/PJ_collg.c \
        $$PWD/proj/PJ_crast.c \
        $$PWD/proj/PJ_denoy.c \
        $$PWD/proj/PJ_eck1.c \
        $$PWD/proj/PJ_eck2.c \
        $$PWD/proj/PJ_eck3.c \
        $$PWD/proj/PJ_eck4.c \
        $$PWD/proj/PJ_eck5.c \
        $$PWD/proj/PJ_fahey.c \
        $$PWD/proj/PJ_fouc_s.c \
        $$PWD/proj/PJ_gins8.c \
        $$PWD/proj/PJ_gstmerc.c \
        $$PWD/proj/PJ_gn_sinu.c \
        $$PWD/proj/PJ_goode.c \
        $$PWD/proj/PJ_hatano.c \
        $$PWD/proj/PJ_loxim.c \
        $$PWD/proj/PJ_mbt_fps.c \
        $$PWD/proj/PJ_mbtfpp.c \
        $$PWD/proj/PJ_mbtfpq.c \
        $$PWD/proj/PJ_moll.c \
        $$PWD/proj/PJ_nell.c \
        $$PWD/proj/PJ_nell_h.c \
        $$PWD/proj/PJ_putp2.c \
        $$PWD/proj/PJ_putp3.c \
        $$PWD/proj/PJ_putp4p.c \
        $$PWD/proj/PJ_putp5.c \
        $$PWD/proj/PJ_putp6.c \
        $$PWD/proj/PJ_robin.c \
        $$PWD/proj/PJ_sts.c \
        $$PWD/proj/PJ_urm5.c \
        $$PWD/proj/PJ_urmfps.c \
        $$PWD/proj/PJ_wag2.c \
        $$PWD/proj/PJ_wag3.c \
        $$PWD/proj/PJ_wink1.c \
        $$PWD/proj/PJ_wink2.c \
        $$PWD/proj/pj_latlong.c \
        $$PWD/proj/pj_geocent.c \
        $$PWD/proj/aasincos.c \
        $$PWD/proj/adjlon.c \
        $$PWD/proj/bch2bps.c \
        $$PWD/proj/bchgen.c \
        $$PWD/proj/biveval.c \
        $$PWD/proj/dmstor.c \
        $$PWD/proj/mk_cheby.c \
        $$PWD/proj/pj_auth.c \
        $$PWD/proj/pj_deriv.c \
        $$PWD/proj/pj_ell_set.c \
        $$PWD/proj/pj_ellps.c \
        $$PWD/proj/pj_errno.c \
        $$PWD/proj/pj_factors.c \
        $$PWD/proj/pj_fwd.c \
        $$PWD/proj/pj_init.c \
        $$PWD/proj/pj_inv.c \
        $$PWD/proj/pj_list.c \
        $$PWD/proj/pj_malloc.c \
        $$PWD/proj/pj_mlfn.c \
        $$PWD/proj/pj_msfn.c \
        $$PWD/proj/proj_mdist.c \
        $$PWD/proj/pj_open_lib_qt.cpp \
	$$PWD/proj/pj_param.c \
        $$PWD/proj/pj_phi2.c \
        $$PWD/proj/pj_pr_list.c \
        $$PWD/proj/pj_qsfn.c \
        $$PWD/proj/pj_strerrno.c \
        $$PWD/proj/pj_tsfn.c \
        $$PWD/proj/pj_units.c \
        $$PWD/proj/pj_zpoly1.c \
        $$PWD/proj/rtodms.c \
        $$PWD/proj/vector1.c \
        $$PWD/proj/pj_release.c \
        $$PWD/proj/pj_gauss.c \
        $$PWD/proj/nad_cvt.c \
        $$PWD/proj/nad_init.c \
        $$PWD/proj/nad_intr.c \
        $$PWD/proj/emess.c \
        $$PWD/proj/pj_apply_gridshift.c \
        $$PWD/proj/pj_datums.c \
        $$PWD/proj/pj_datum_set.c \
        $$PWD/proj/pj_transform.c \
        $$PWD/proj/geocent.c \
        $$PWD/proj/pj_utils.c \
        $$PWD/proj/pj_gridinfo.c \
        $$PWD/proj/pj_gridlist.c \
        $$PWD/proj/pj_mutex.c \
        $$PWD/proj/pj_initcache.c

unix {
  DEFINES += MUTEX_pthread
}

symbian {
  LIBS += -llibpthread -llibm
}

win32 {
  DEFINES += MUTEX_win32
}

RESOURCES += $$PWD/proj/data.qrc

INCLUDEPATH += $$PWD/proj/include

SOURCES += $$PWD/proj/PJ_aeqd.c \
        $$PWD/proj/PJ_gnom.c \
        $$PWD/proj/PJ_laea.c \
        $$PWD/proj/PJ_mod_ster.c \
        $$PWD/proj/PJ_nsper.c \
        $$PWD/proj/PJ_nzmg.c \
        $$PWD/proj/PJ_ortho.c \
        $$PWD/proj/PJ_stere.c \
        $$PWD/proj/PJ_sterea.c \
        $$PWD/proj/PJ_aea.c \
        $$PWD/proj/PJ_bipc.c \
        $$PWD/proj/PJ_bonne.c \
        $$PWD/proj/PJ_eqdc.c \
        $$PWD/proj/PJ_imw_p.c \
        $$PWD/proj/PJ_krovak.c \
        $$PWD/proj/PJ_lcc.c \
        $$PWD/proj/PJ_poly.c \
        $$PWD/proj/PJ_rpoly.c \
        $$PWD/proj/PJ_sconics.c \
        $$PWD/proj/proj_rouss.c \
        $$PWD/proj/PJ_cass.c \
        $$PWD/proj/PJ_cc.c \
        $$PWD/proj/PJ_cea.c \
        $$PWD/proj/PJ_eqc.c \
        $$PWD/proj/PJ_gall.c \
        $$PWD/proj/PJ_labrd.c \
        $$PWD/proj/PJ_lsat.c \
        $$PWD/proj/PJ_merc.c \
        $$PWD/proj/PJ_mill.c \
        $$PWD/proj/PJ_ocea.c \
        $$PWD/proj/PJ_omerc.c \
        $$PWD/proj/PJ_somerc.c \
        $$PWD/proj/PJ_tcc.c \
        $$PWD/proj/PJ_tcea.c \
        $$PWD/proj/PJ_tmerc.c \
        $$PWD/proj/PJ_airy.c \
        $$PWD/proj/PJ_aitoff.c \
        $$PWD/proj/PJ_august.c \
        $$PWD/proj/PJ_bacon.c \
        $$PWD/proj/PJ_chamb.c \
        $$PWD/proj/PJ_hammer.c \
        $$PWD/proj/PJ_lagrng.c \
        $$PWD/proj/PJ_larr.c \
        $$PWD/proj/PJ_lask.c \
        $$PWD/proj/PJ_nocol.c \
        $$PWD/proj/PJ_ob_tran.c \
        $$PWD/proj/PJ_oea.c \
        $$PWD/proj/PJ_tpeqd.c \
        $$PWD/proj/PJ_vandg.c \
        $$PWD/proj/PJ_vandg2.c \
        $$PWD/proj/PJ_vandg4.c \
        $$PWD/proj/PJ_wag7.c \
        $$PWD/proj/PJ_lcca.c \
        $$PWD/proj/PJ_geos.c \
        $$PWD/proj/PJ_boggs.c \
        $$PWD/proj/PJ_collg.c \
        $$PWD/proj/PJ_crast.c \
        $$PWD/proj/PJ_denoy.c \
        $$PWD/proj/PJ_eck1.c \
        $$PWD/proj/PJ_eck2.c \
        $$PWD/proj/PJ_eck3.c \
        $$PWD/proj/PJ_eck4.c \
        $$PWD/proj/PJ_eck5.c \
        $$PWD/proj/PJ_fahey.c \
        $$PWD/proj/PJ_fouc_s.c \
        $$PWD/proj/PJ_gins8.c \
        $$PWD/proj/PJ_gstmerc.c \
        $$PWD/proj/PJ_gn_sinu.c \
        $$PWD/proj/PJ_goode.c \
        $$PWD/proj/PJ_hatano.c \
        $$PWD/proj/PJ_loxim.c \
        $$PWD/proj/PJ_mbt_fps.c \
        $$PWD/proj/PJ_mbtfpp.c \
        $$PWD/proj/PJ_mbtfpq.c \
        $$PWD/proj/PJ_moll.c \
        $$PWD/proj/PJ_nell.c \
        $$PWD/proj/PJ_nell_h.c \
        $$PWD/proj/PJ_putp2.c \
        $$PWD/proj/PJ_putp3.c \
        $$PWD/proj/PJ_putp4p.c \
        $$PWD/proj/PJ_putp5.c \
        $$PWD/proj/PJ_putp6.c \
        $$PWD/proj/PJ_robin.c \
        $$PWD/proj/PJ_sts.c \
        $$PWD/proj/PJ_urm5.c \
        $$PWD/proj/PJ_urmfps.c \
        $$PWD/proj/PJ_wag2.c \
        $$PWD/proj/PJ_wag3.c \
        $$PWD/proj/PJ_wink1.c \
        $$PWD/proj/PJ_wink2.c \
        $$PWD/proj/pj_latlong.c \
        $$PWD/proj/pj_geocent.c \
        $$PWD/proj/aasincos.c \
        $$PWD/proj/adjlon.c \
        $$PWD/proj/bch2bps.c \
        $$PWD/proj/bchgen.c \
        $$PWD/proj/biveval.c \
        $$PWD/proj/dmstor.c \
        $$PWD/proj/mk_cheby.c \
        $$PWD/proj/pj_auth.c \
        $$PWD/proj/pj_deriv.c \
        $$PWD/proj/pj_ell_set.c \
        $$PWD/proj/pj_ellps.c \
        $$PWD/proj/pj_errno.c \
        $$PWD/proj/pj_factors.c \
        $$PWD/proj/pj_fwd.c \
        $$PWD/proj/pj_init.c \
        $$PWD/proj/pj_inv.c \
        $$PWD/proj/pj_list.c \
        $$PWD/proj/pj_malloc.c \
        $$PWD/proj/pj_mlfn.c \
        $$PWD/proj/pj_msfn.c \
        $$PWD/proj/proj_mdist.c \
        $$PWD/proj/pj_open_lib_qt.cpp \
	$$PWD/proj/pj_param.c \
        $$PWD/proj/pj_phi2.c \
        $$PWD/proj/pj_pr_list.c \
        $$PWD/proj/pj_qsfn.c \
        $$PWD/proj/pj_strerrno.c \
        $$PWD/proj/pj_tsfn.c \
        $$PWD/proj/pj_units.c \
        $$PWD/proj/pj_zpoly1.c \
        $$PWD/proj/rtodms.c \
        $$PWD/proj/vector1.c \
        $$PWD/proj/pj_release.c \
        $$PWD/proj/pj_gauss.c \
        $$PWD/proj/nad_cvt.c \
        $$PWD/proj/nad_init.c \
        $$PWD/proj/nad_intr.c \
        $$PWD/proj/emess.c \
        $$PWD/proj/pj_apply_gridshift.c \
        $$PWD/proj/pj_datums.c \
        $$PWD/proj/pj_datum_set.c \
        $$PWD/proj/pj_transform.c \
        $$PWD/proj/geocent.c \
        $$PWD/proj/pj_utils.c \
        $$PWD/proj/pj_gridinfo.c \
        $$PWD/proj/pj_gridlist.c \
        $$PWD/proj/pj_mutex.c \
        $$PWD/proj/pj_initcache.c

unix {
  DEFINES += MUTEX_pthread
}

win32 {
  DEFINES += MUTEX_win32
}

RESOURCES += $$PWD/proj/data.qrc


Use CONFIG+=packaged when building official packages from git

include(../compiler.pri)

VERSION		= 1.2.0
DIST		= mumble.pri Message.h PacketDataStream.h CryptState.h Timer.h Version.h OSInfo.h SSL.h Mumble.proto
CONFIG		+= qt thread debug_and_release warn_on
DEFINES		*= MUMBLE_VERSION_STRING=$$VERSION
INCLUDEPATH	+= $$PWD .
VPATH		+= $$PWD
HEADERS		*= ACL.h Group.h Channel.h Connection.h User.h Net.h
SOURCES 	*= Mumble.pb.cc ACL.cpp Group.cpp Channel.cpp Connection.cpp User.cpp Timer.cpp CryptState.cpp OSInfo.cpp Net.cpp SSL.cpp
PROTOBUF	*= ../Mumble.proto

pb.output = ${QMAKE_FILE_BASE}.pb.cc
pb.commands = protoc --cpp_out=. -I. -I.. ${QMAKE_FILE_NAME}
pb.input = PROTOBUF
pb.CONFIG *= no_link

CONFIG(packaged) {
	MUMDEFVER = $$find(DEFINES, "MUMBLE_VERSION=")
	count(MUMDEFVER, 0) {
		DEFINES	*= MUMBLE_VERSION=$$VERSION
	}
}

win32 {
	INCLUDEPATH *= /dev/protobuf-2.2.0/vsprojects/include /dev/protobuf-2.2.0/src
	CONFIG(debug, debug|release) {
		LIBPATH *= /dev/protobuf-2.2.0/vsprojects/Debug
	} else {
		LIBPATH *= /dev/protobuf-2.2.0/vsprojects/Release
	}
	INCLUDEPATH *= /dev/OpenSSL/include
	LIBPATH	*= /dev/OpenSSL/lib

	LIBS *= -llibprotobuf -lcrypt32 -lws2_32 -llibeay32
	LIBS *= -ldelayimp -lQwave -delayload:Qwave.DLL
}

unix {
	UNAME=$$system(uname -s)

	CONFIG *= link_pkgconfig
	LIBS *= -lprotobuf

	contains(UNAME, FreeBSD) {
		LIBS *= -lcrypto
	} else {
		PKGCONFIG *= openssl
	}
}

QMAKE_EXTRA_COMPILERS *= pb

CONFIG(debug, debug|release) {
  CONFIG += console
  LIBPATH	+= ../../debug
  DESTDIR	= ../../debug
}

CONFIG(release, debug|release) {
  LIBPATH	+= ../../release
  DESTDIR	= ../../release
}

include(../compiler.pri)

VERSION		= 1.2.0
DIST		= mumble.pri Message.h PacketDataStream.h CryptState.h Timer.h Version.h OSInfo.h SSL.h Mumble.proto
CONFIG		+= qt thread debug_and_release warn_on
DEFINES		*= MUMBLE_VERSION_STRING=$$VERSION
INCLUDEPATH	+= $$PWD .
VPATH		+= $$PWD
HEADERS		*= ACL.h Group.h Channel.h Connection.h User.h Net.h
SOURCES 	*= Mumble.pb.cc ACL.cpp Group.cpp Channel.cpp Connection.cpp User.cpp Timer.cpp CryptState.cpp OSInfo.cpp Net.cpp SSL.cpp
PROTOBUF	*= ../Mumble.proto

pb.output = ${QMAKE_FILE_BASE}.pb.cc
pb.commands = protoc --cpp_out=. -I. -I.. ${QMAKE_FILE_NAME}
pb.input = PROTOBUF
pb.CONFIG *= no_link

win32 {
	INCLUDEPATH *= /dev/protobuf-2.2.0/vsprojects/include /dev/protobuf-2.2.0/src
	CONFIG(debug, debug|release) {
		LIBPATH *= /dev/protobuf-2.2.0/vsprojects/Debug
	} else {
		LIBPATH *= /dev/protobuf-2.2.0/vsprojects/Release
	}
	INCLUDEPATH *= /dev/OpenSSL/include
	LIBPATH	*= /dev/OpenSSL/lib

	LIBS *= -llibprotobuf -lcrypt32 -lws2_32 -llibeay32
	LIBS *= -ldelayimp -lQwave -delayload:Qwave.DLL
}

unix {
	UNAME=$$system(uname -s)

	CONFIG *= link_pkgconfig
	LIBS *= -lprotobuf

	contains(UNAME, FreeBSD) {
		LIBS *= -lcrypto
	} else {
		PKGCONFIG *= openssl
	}
}

QMAKE_EXTRA_COMPILERS *= pb

CONFIG(debug, debug|release) {
  CONFIG += console
  LIBPATH	+= ../../debug
  DESTDIR	= ../../debug
}

CONFIG(release, debug|release) {
  LIBPATH	+= ../../release
  DESTDIR	= ../../release
}


Fixed build under Windows

Fixed build under Windows

# Copyright 2007-2015 QReal Research Group
#
# 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.

QT += widgets xml

DEFINES += TWO_D_MODEL_LIBRARY

links(qrkernel qslog qrutils qrgui-tool-plugin-interface qrgui-controller robots-utils robots-kit-base)
includes(plugins/robots/common/kitBase)
includes(plugins/robots/utils qrtext)

TRANSLATIONS = \
	$$PWD/../../../../qrtranslations/ru/plugins/robots/twoDModel_ru.ts \
	$$PWD/../../../../qrtranslations/fr/plugins/robots/twoDModel_fr.ts \

HEADERS += \
	$$PWD/include/twoDModel/twoDModelDeclSpec.h \
	$$PWD/include/twoDModel/engine/twoDModelControlInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelDisplayInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelDisplayWidget.h \
	$$PWD/include/twoDModel/engine/twoDModelEngineFacade.h \
	$$PWD/include/twoDModel/engine/twoDModelEngineInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelGuiFacade.h \
	$$PWD/include/twoDModel/engine/view/twoDModelWidget.h \
	$$PWD/include/twoDModel/engine/model/constants.h \
	$$PWD/include/twoDModel/engine/model/model.h \
	$$PWD/include/twoDModel/engine/model/worldModel.h \
	$$PWD/include/twoDModel/engine/model/timeline.h \
	$$PWD/include/twoDModel/engine/model/robotModel.h \
	$$PWD/include/twoDModel/engine/model/sensorsConfiguration.h \
	$$PWD/include/twoDModel/engine/model/settings.h \
	$$PWD/include/twoDModel/robotModel/twoDRobotModel.h \
	$$PWD/include/twoDModel/robotModel/parts/button.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorBlue.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorFull.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorGreen.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorPassive.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorRed.h \
	$$PWD/include/twoDModel/robotModel/parts/display.h \
	$$PWD/include/twoDModel/robotModel/parts/encoderSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/lightSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/motor.h \
	$$PWD/include/twoDModel/robotModel/parts/rangeSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/touchSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/gyroscope.h \
	$$PWD/include/twoDModel/robotModel/parts/accelerometer.h \
	$$PWD/include/twoDModel/robotModel/parts/marker.h \
	$$PWD/include/twoDModel/blocks/markerDownBlock.h \
	$$PWD/include/twoDModel/blocks/markerUpBlock.h \

HEADERS += \
	$$PWD/src/engine/twoDModelEngineApi.h \
	$$PWD/src/engine/view/nullTwoDModelDisplayWidget.h \
	$$PWD/src/engine/view/scene/twoDModelScene.h \
	$$PWD/src/engine/view/scene/fakeScene.h \
	$$PWD/src/engine/view/scene/robotItem.h \
	$$PWD/src/engine/view/scene/sensorItem.h \
	$$PWD/src/engine/view/scene/sonarSensorItem.h \
	$$PWD/src/engine/view/parts/palette.h \
	$$PWD/src/engine/view/parts/actionsBox.h \
	$$PWD/src/engine/view/parts/gridParameters.h \
	$$PWD/src/engine/view/parts/detailsTab.h \
	$$PWD/src/engine/view/parts/colorItemPopup.h \
	$$PWD/src/engine/view/parts/robotItemPopup.h \
	$$PWD/src/engine/view/parts/speedPopup.h \
	$$PWD/src/engine/view/parts/ruler.h \
	$$PWD/src/engine/constraints/constraintsChecker.h \
	$$PWD/src/engine/constraints/details/defines.h \
	$$PWD/src/engine/constraints/details/constraintsParser.h \
	$$PWD/src/engine/constraints/details/event.h \
	$$PWD/src/engine/constraints/details/conditionsFactory.h \
	$$PWD/src/engine/constraints/details/triggersFactory.h \
	$$PWD/src/engine/constraints/details/valuesFactory.h \
	$$PWD/src/engine/model/modelTimer.h \
	$$PWD/src/engine/model/physics/physicsEngineBase.h \
	$$PWD/src/engine/model/physics/simplePhysicsEngine.h \
	$$PWD/src/engine/model/physics/realisticPhysicsEngine.h \
	$$PWD/src/engine/items/solidItem.h \
	$$PWD/src/engine/items/wallItem.h \
	$$PWD/src/engine/items/stylusItem.h \
	$$PWD/src/engine/items/lineItem.h \
	$$PWD/src/engine/items/curveItem.h \
	$$PWD/src/engine/items/colorFieldItem.h \
	$$PWD/src/engine/items/rectangleItem.h \
	$$PWD/src/engine/items/ellipseItem.h \
	$$PWD/src/engine/items/startPosition.h \
	$$PWD/src/engine/items/regions/regionItem.h \
	$$PWD/src/engine/items/regions/ellipseRegion.h \
	$$PWD/src/engine/items/regions/rectangularRegion.h \
	$$PWD/src/engine/items/regions/boundRegion.h \
	$$PWD/src/engine/commands/createWorldItemCommand.h \
	$$PWD/src/engine/commands/removeWorldItemCommand.h \
	$$PWD/src/engine/commands/removeWorldItemsCommand.h \
	$$PWD/src/engine/commands/createRemoveWorldItemImplementation.h \
	$$PWD/src/engine/commands/createSensorCommand.h \
	$$PWD/src/engine/commands/removeSensorCommand.h \
	$$PWD/src/engine/commands/createRemoveSensorImplementation.h \
	$$PWD/src/engine/commands/changePropertyCommand.h \
	$$PWD/src/engine/commands/reshapeCommand.h \
	$$PWD/src/robotModel/nullTwoDRobotModel.h \

SOURCES += \
	$$PWD/src/engine/twoDModelEngineFacade.cpp \
	$$PWD/src/engine/twoDModelEngineApi.cpp \
	$$PWD/src/engine/twoDModelGuiFacade.cpp \
	$$PWD/src/engine/view/twoDModelWidget.cpp \
	$$PWD/src/engine/view/twoDModelDisplayWidget.cpp \
	$$PWD/src/engine/view/nullTwoDModelDisplayWidget.cpp \
	$$PWD/src/engine/view/scene/twoDModelScene.cpp \
	$$PWD/src/engine/view/scene/fakeScene.cpp \
	$$PWD/src/engine/view/scene/robotItem.cpp \
	$$PWD/src/engine/view/scene/sensorItem.cpp \
	$$PWD/src/engine/view/scene/sonarSensorItem.cpp \
	$$PWD/src/engine/view/parts/palette.cpp \
	$$PWD/src/engine/view/parts/actionsBox.cpp \
	$$PWD/src/engine/view/parts/gridParameters.cpp \
	$$PWD/src/engine/view/parts/detailsTab.cpp \
	$$PWD/src/engine/view/parts/colorItemPopup.cpp \
	$$PWD/src/engine/view/parts/robotItemPopup.cpp \
	$$PWD/src/engine/view/parts/speedPopup.cpp \
	$$PWD/src/engine/view/parts/ruler.cpp \
	$$PWD/src/engine/model/model.cpp \
	$$PWD/src/engine/model/settings.cpp \
	$$PWD/src/engine/model/robotModel.cpp \
	$$PWD/src/engine/model/modelTimer.cpp \
	$$PWD/src/engine/model/sensorsConfiguration.cpp \
	$$PWD/src/engine/model/worldModel.cpp \
	$$PWD/src/engine/model/timeline.cpp \
	$$PWD/src/engine/model/physics/physicsEngineBase.cpp \
	$$PWD/src/engine/model/physics/simplePhysicsEngine.cpp \
	$$PWD/src/engine/model/physics/realisticPhysicsEngine.cpp \
	$$PWD/src/engine/items/solidItem.cpp \
	$$PWD/src/engine/items/wallItem.cpp \
	$$PWD/src/engine/items/stylusItem.cpp \
	$$PWD/src/engine/items/lineItem.cpp \
	$$PWD/src/engine/items/curveItem.cpp \
	$$PWD/src/engine/items/colorFieldItem.cpp \
	$$PWD/src/engine/items/rectangleItem.cpp \
	$$PWD/src/engine/items/ellipseItem.cpp \
	$$PWD/src/engine/items/startPosition.cpp \
	$$PWD/src/engine/items/regions/regionItem.cpp \
	$$PWD/src/engine/items/regions/ellipseRegion.cpp \
	$$PWD/src/engine/items/regions/rectangularRegion.cpp \
	$$PWD/src/engine/items/regions/boundRegion.cpp \
	$$PWD/src/engine/constraints/constraintsChecker.cpp \
	$$PWD/src/engine/constraints/details/constraintsParser.cpp \
	$$PWD/src/engine/constraints/details/event.cpp \
	$$PWD/src/engine/constraints/details/conditionsFactory.cpp \
	$$PWD/src/engine/constraints/details/triggersFactory.cpp \
	$$PWD/src/engine/constraints/details/valuesFactory.cpp \
	$$PWD/src/engine/commands/createWorldItemCommand.cpp \
	$$PWD/src/engine/commands/removeWorldItemCommand.cpp \
	$$PWD/src/engine/commands/removeWorldItemsCommand.cpp \
	$$PWD/src/engine/commands/createRemoveWorldItemImplementation.cpp \
	$$PWD/src/engine/commands/createSensorCommand.cpp \
	$$PWD/src/engine/commands/removeSensorCommand.cpp \
	$$PWD/src/engine/commands/createRemoveSensorImplementation.cpp \
	$$PWD/src/engine/commands/changePropertyCommand.cpp \
	$$PWD/src/engine/commands/reshapeCommand.cpp \
	$$PWD/src/robotModel/twoDRobotModel.cpp \
	$$PWD/src/robotModel/nullTwoDRobotModel.cpp \
	$$PWD/src/robotModel/parts/button.cpp \
	$$PWD/src/robotModel/parts/colorSensorBlue.cpp \
	$$PWD/src/robotModel/parts/colorSensorFull.cpp \
	$$PWD/src/robotModel/parts/colorSensorGreen.cpp \
	$$PWD/src/robotModel/parts/colorSensorPassive.cpp \
	$$PWD/src/robotModel/parts/colorSensorRed.cpp \
	$$PWD/src/robotModel/parts/display.cpp \
	$$PWD/src/robotModel/parts/encoderSensor.cpp \
	$$PWD/src/robotModel/parts/lightSensor.cpp \
	$$PWD/src/robotModel/parts/motor.cpp \
	$$PWD/src/robotModel/parts/rangeSensor.cpp \
	$$PWD/src/robotModel/parts/touchSensor.cpp \
	$$PWD/src/robotModel/parts/gyroscope.cpp \
	$$PWD/src/robotModel/parts/accelerometer.cpp \
	$$PWD/src/robotModel/parts/marker.cpp \
	$$PWD/src/blocks/markerDownBlock.cpp \
	$$PWD/src/blocks/markerUpBlock.cpp \

FORMS += \
	$$PWD/src/engine/view/twoDModelWidget.ui \

# Copyright 2007-2015 QReal Research Group
#
# 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.

QT += widgets xml

DEFINES += TWO_D_MODEL_LIBRARY

links(qrkernel qslog qrutils qrgui-tool-plugin-interface robots-utils robots-kit-base)
includes(plugins/robots/common/kitBase)
includes(plugins/robots/utils qrtext)

TRANSLATIONS = \
	$$PWD/../../../../qrtranslations/ru/plugins/robots/twoDModel_ru.ts \
	$$PWD/../../../../qrtranslations/fr/plugins/robots/twoDModel_fr.ts \

HEADERS += \
	$$PWD/include/twoDModel/twoDModelDeclSpec.h \
	$$PWD/include/twoDModel/engine/twoDModelControlInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelDisplayInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelDisplayWidget.h \
	$$PWD/include/twoDModel/engine/twoDModelEngineFacade.h \
	$$PWD/include/twoDModel/engine/twoDModelEngineInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelGuiFacade.h \
	$$PWD/include/twoDModel/engine/view/twoDModelWidget.h \
	$$PWD/include/twoDModel/engine/model/constants.h \
	$$PWD/include/twoDModel/engine/model/model.h \
	$$PWD/include/twoDModel/engine/model/worldModel.h \
	$$PWD/include/twoDModel/engine/model/timeline.h \
	$$PWD/include/twoDModel/engine/model/robotModel.h \
	$$PWD/include/twoDModel/engine/model/sensorsConfiguration.h \
	$$PWD/include/twoDModel/engine/model/settings.h \
	$$PWD/include/twoDModel/robotModel/twoDRobotModel.h \
	$$PWD/include/twoDModel/robotModel/parts/button.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorBlue.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorFull.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorGreen.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorPassive.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorRed.h \
	$$PWD/include/twoDModel/robotModel/parts/display.h \
	$$PWD/include/twoDModel/robotModel/parts/encoderSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/lightSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/motor.h \
	$$PWD/include/twoDModel/robotModel/parts/rangeSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/touchSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/gyroscope.h \
	$$PWD/include/twoDModel/robotModel/parts/accelerometer.h \
	$$PWD/include/twoDModel/robotModel/parts/marker.h \
	$$PWD/include/twoDModel/blocks/markerDownBlock.h \
	$$PWD/include/twoDModel/blocks/markerUpBlock.h \

HEADERS += \
	$$PWD/src/engine/twoDModelEngineApi.h \
	$$PWD/src/engine/view/nullTwoDModelDisplayWidget.h \
	$$PWD/src/engine/view/scene/twoDModelScene.h \
	$$PWD/src/engine/view/scene/fakeScene.h \
	$$PWD/src/engine/view/scene/robotItem.h \
	$$PWD/src/engine/view/scene/sensorItem.h \
	$$PWD/src/engine/view/scene/sonarSensorItem.h \
	$$PWD/src/engine/view/parts/palette.h \
	$$PWD/src/engine/view/parts/actionsBox.h \
	$$PWD/src/engine/view/parts/gridParameters.h \
	$$PWD/src/engine/view/parts/detailsTab.h \
	$$PWD/src/engine/view/parts/colorItemPopup.h \
	$$PWD/src/engine/view/parts/robotItemPopup.h \
	$$PWD/src/engine/view/parts/speedPopup.h \
	$$PWD/src/engine/view/parts/ruler.h \
	$$PWD/src/engine/constraints/constraintsChecker.h \
	$$PWD/src/engine/constraints/details/defines.h \
	$$PWD/src/engine/constraints/details/constraintsParser.h \
	$$PWD/src/engine/constraints/details/event.h \
	$$PWD/src/engine/constraints/details/conditionsFactory.h \
	$$PWD/src/engine/constraints/details/triggersFactory.h \
	$$PWD/src/engine/constraints/details/valuesFactory.h \
	$$PWD/src/engine/model/modelTimer.h \
	$$PWD/src/engine/model/physics/physicsEngineBase.h \
	$$PWD/src/engine/model/physics/simplePhysicsEngine.h \
	$$PWD/src/engine/model/physics/realisticPhysicsEngine.h \
	$$PWD/src/engine/items/solidItem.h \
	$$PWD/src/engine/items/wallItem.h \
	$$PWD/src/engine/items/stylusItem.h \
	$$PWD/src/engine/items/lineItem.h \
	$$PWD/src/engine/items/curveItem.h \
	$$PWD/src/engine/items/colorFieldItem.h \
	$$PWD/src/engine/items/rectangleItem.h \
	$$PWD/src/engine/items/ellipseItem.h \
	$$PWD/src/engine/items/startPosition.h \
	$$PWD/src/engine/items/regions/regionItem.h \
	$$PWD/src/engine/items/regions/ellipseRegion.h \
	$$PWD/src/engine/items/regions/rectangularRegion.h \
	$$PWD/src/engine/items/regions/boundRegion.h \
	$$PWD/src/engine/commands/createWorldItemCommand.h \
	$$PWD/src/engine/commands/removeWorldItemCommand.h \
	$$PWD/src/engine/commands/removeWorldItemsCommand.h \
	$$PWD/src/engine/commands/createRemoveWorldItemImplementation.h \
	$$PWD/src/engine/commands/createSensorCommand.h \
	$$PWD/src/engine/commands/removeSensorCommand.h \
	$$PWD/src/engine/commands/createRemoveSensorImplementation.h \
	$$PWD/src/engine/commands/changePropertyCommand.h \
	$$PWD/src/engine/commands/reshapeCommand.h \
	$$PWD/src/robotModel/nullTwoDRobotModel.h \

SOURCES += \
	$$PWD/src/engine/twoDModelEngineFacade.cpp \
	$$PWD/src/engine/twoDModelEngineApi.cpp \
	$$PWD/src/engine/twoDModelGuiFacade.cpp \
	$$PWD/src/engine/view/twoDModelWidget.cpp \
	$$PWD/src/engine/view/twoDModelDisplayWidget.cpp \
	$$PWD/src/engine/view/nullTwoDModelDisplayWidget.cpp \
	$$PWD/src/engine/view/scene/twoDModelScene.cpp \
	$$PWD/src/engine/view/scene/fakeScene.cpp \
	$$PWD/src/engine/view/scene/robotItem.cpp \
	$$PWD/src/engine/view/scene/sensorItem.cpp \
	$$PWD/src/engine/view/scene/sonarSensorItem.cpp \
	$$PWD/src/engine/view/parts/palette.cpp \
	$$PWD/src/engine/view/parts/actionsBox.cpp \
	$$PWD/src/engine/view/parts/gridParameters.cpp \
	$$PWD/src/engine/view/parts/detailsTab.cpp \
	$$PWD/src/engine/view/parts/colorItemPopup.cpp \
	$$PWD/src/engine/view/parts/robotItemPopup.cpp \
	$$PWD/src/engine/view/parts/speedPopup.cpp \
	$$PWD/src/engine/view/parts/ruler.cpp \
	$$PWD/src/engine/model/model.cpp \
	$$PWD/src/engine/model/settings.cpp \
	$$PWD/src/engine/model/robotModel.cpp \
	$$PWD/src/engine/model/modelTimer.cpp \
	$$PWD/src/engine/model/sensorsConfiguration.cpp \
	$$PWD/src/engine/model/worldModel.cpp \
	$$PWD/src/engine/model/timeline.cpp \
	$$PWD/src/engine/model/physics/physicsEngineBase.cpp \
	$$PWD/src/engine/model/physics/simplePhysicsEngine.cpp \
	$$PWD/src/engine/model/physics/realisticPhysicsEngine.cpp \
	$$PWD/src/engine/items/solidItem.cpp \
	$$PWD/src/engine/items/wallItem.cpp \
	$$PWD/src/engine/items/stylusItem.cpp \
	$$PWD/src/engine/items/lineItem.cpp \
	$$PWD/src/engine/items/curveItem.cpp \
	$$PWD/src/engine/items/colorFieldItem.cpp \
	$$PWD/src/engine/items/rectangleItem.cpp \
	$$PWD/src/engine/items/ellipseItem.cpp \
	$$PWD/src/engine/items/startPosition.cpp \
	$$PWD/src/engine/items/regions/regionItem.cpp \
	$$PWD/src/engine/items/regions/ellipseRegion.cpp \
	$$PWD/src/engine/items/regions/rectangularRegion.cpp \
	$$PWD/src/engine/items/regions/boundRegion.cpp \
	$$PWD/src/engine/constraints/constraintsChecker.cpp \
	$$PWD/src/engine/constraints/details/constraintsParser.cpp \
	$$PWD/src/engine/constraints/details/event.cpp \
	$$PWD/src/engine/constraints/details/conditionsFactory.cpp \
	$$PWD/src/engine/constraints/details/triggersFactory.cpp \
	$$PWD/src/engine/constraints/details/valuesFactory.cpp \
	$$PWD/src/engine/commands/createWorldItemCommand.cpp \
	$$PWD/src/engine/commands/removeWorldItemCommand.cpp \
	$$PWD/src/engine/commands/removeWorldItemsCommand.cpp \
	$$PWD/src/engine/commands/createRemoveWorldItemImplementation.cpp \
	$$PWD/src/engine/commands/createSensorCommand.cpp \
	$$PWD/src/engine/commands/removeSensorCommand.cpp \
	$$PWD/src/engine/commands/createRemoveSensorImplementation.cpp \
	$$PWD/src/engine/commands/changePropertyCommand.cpp \
	$$PWD/src/engine/commands/reshapeCommand.cpp \
	$$PWD/src/robotModel/twoDRobotModel.cpp \
	$$PWD/src/robotModel/nullTwoDRobotModel.cpp \
	$$PWD/src/robotModel/parts/button.cpp \
	$$PWD/src/robotModel/parts/colorSensorBlue.cpp \
	$$PWD/src/robotModel/parts/colorSensorFull.cpp \
	$$PWD/src/robotModel/parts/colorSensorGreen.cpp \
	$$PWD/src/robotModel/parts/colorSensorPassive.cpp \
	$$PWD/src/robotModel/parts/colorSensorRed.cpp \
	$$PWD/src/robotModel/parts/display.cpp \
	$$PWD/src/robotModel/parts/encoderSensor.cpp \
	$$PWD/src/robotModel/parts/lightSensor.cpp \
	$$PWD/src/robotModel/parts/motor.cpp \
	$$PWD/src/robotModel/parts/rangeSensor.cpp \
	$$PWD/src/robotModel/parts/touchSensor.cpp \
	$$PWD/src/robotModel/parts/gyroscope.cpp \
	$$PWD/src/robotModel/parts/accelerometer.cpp \
	$$PWD/src/robotModel/parts/marker.cpp \
	$$PWD/src/blocks/markerDownBlock.cpp \
	$$PWD/src/blocks/markerUpBlock.cpp \

FORMS += \
	$$PWD/src/engine/view/twoDModelWidget.ui \