qtcreator.pro 3.33 KB
Newer Older
Eike Ziller's avatar
Eike Ziller committed
1 2
include(qtcreator.pri)

3
#version check qt
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
4
!minQtVersion(4, 8, 0) {
5
    message("Cannot build Qt Creator with Qt version $${QT_VERSION}.")
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
6
    error("Use at least Qt 4.8.0.")
7 8
}

Daniel Molkentin's avatar
Daniel Molkentin committed
9
include(doc/doc.pri)
10

con's avatar
con committed
11 12 13
TEMPLATE  = subdirs
CONFIG   += ordered

14
SUBDIRS = src share lib/qtcreator/qtcomponents
15
unix:!macx:!isEmpty(copydata):SUBDIRS += bin
Orgad Shaneh's avatar
Orgad Shaneh committed
16
!isEmpty(BUILD_TESTS):SUBDIRS += tests
Eike Ziller's avatar
Eike Ziller committed
17 18

OTHER_FILES += dist/copyright_template.txt \
19 20 21
    $$files(dist/changes-*) \
    qtcreator.qbp \
    qbs/pluginspec/pluginspec.qbs
22

23
qmake_cache = $$targetPath($$IDE_BUILD_TREE/.qmake.cache)
24 25 26 27
equals(QMAKE_DIR_SEP, /): {
    maybe_quote = "\""
    maybe_backslash = "\\"
}
28 29
system("echo $${maybe_quote}$${LITERAL_HASH} config for qmake$${maybe_quote} > $$qmake_cache")
# Make sure the qbs dll ends up alongside the Creator executable.
30
exists(src/shared/qbs/qbs.pro) {
31
    system("echo QBS_DLLDESTDIR = $${IDE_BUILD_TREE}/bin >> $$qmake_cache")
32 33
    system("echo QBS_DESTDIR = $${maybe_backslash}\"$${IDE_LIBRARY_PATH}$${maybe_backslash}\" >> $$qmake_cache")
    system("echo QBSLIBDIR = $${maybe_backslash}\"$${IDE_LIBRARY_PATH}$${maybe_backslash}\" >> $$qmake_cache")
34 35
}

36 37 38
contains(QT_ARCH, i386): ARCHITECTURE = x86
else: ARCHITECTURE = $$QT_ARCH

39 40
macx: PLATFORM = "mac"
else:win32: PLATFORM = "windows"
41
else:linux-*: PLATFORM = "linux-$${ARCHITECTURE}"
42 43 44 45
else: PLATFORM = "unknown"

PATTERN = $${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)

46 47
macx {
    APPBUNDLE = "$$OUT_PWD/bin/Qt Creator.app"
48
    BINDIST_SOURCE = "$$OUT_PWD/bin/Qt Creator.app"
Eike Ziller's avatar
Eike Ziller committed
49
    BINDIST_INSTALLER_SOURCE = $$BINDIST_SOURCE
50
    deployqt.commands = $$PWD/scripts/deployqtHelper_mac.sh \"$${APPBUNDLE}\" \"$$[QT_INSTALL_TRANSLATIONS]\" \"$$[QT_INSTALL_PLUGINS]\"
51
    codesign.commands = codesign -s \"$(SIGNING_IDENTITY)\" $(SIGNING_FLAGS) \"$${APPBUNDLE}\"
52
    dmg.commands = $$PWD/scripts/makedmg.sh $$OUT_PWD/bin qt-creator-$${PATTERN}.dmg
53
    dmg.depends = deployqt
54
    QMAKE_EXTRA_TARGETS += codesign dmg
55
} else {
56
    BINDIST_SOURCE = "$(INSTALL_ROOT)$$QTC_PREFIX"
Eike Ziller's avatar
Eike Ziller committed
57
    BINDIST_INSTALLER_SOURCE = "$$BINDIST_SOURCE/*"
Daniel Molkentin's avatar
Daniel Molkentin committed
58
    deployqt.commands = $$PWD/scripts/deployqt.py -i \"$(INSTALL_ROOT)$$QTC_PREFIX\"
59
    deployqt.depends = install
Daniel Molkentin's avatar
Daniel Molkentin committed
60 61
    win32 {
        deployartifacts.depends = install
Daniel Molkentin's avatar
Daniel Molkentin committed
62
        deployartifacts.commands = git clone "git://gitorious.org/qt-creator/binary-artifacts.git"&& xcopy /s /q /y /i "binary-artifacts\\win32" \"$(INSTALL_ROOT)$$QTC_PREFIX\"&& rmdir /s /q binary-artifacts
Daniel Molkentin's avatar
Daniel Molkentin committed
63 64
        QMAKE_EXTRA_TARGETS += deployartifacts
    }
65 66
}

67 68 69 70 71 72
INSTALLER_ARCHIVE_FROM_ENV = $$(INSTALLER_ARCHIVE)
isEmpty(INSTALLER_ARCHIVE_FROM_ENV) {
    INSTALLER_ARCHIVE = $$OUT_PWD/qt-creator-$${PATTERN}-installer-archive.7z
} else {
    INSTALLER_ARCHIVE = $$OUT_PWD/$$(INSTALLER_ARCHIVE)
}
Eike Ziller's avatar
Eike Ziller committed
73 74

bindist.depends = deployqt
75
bindist.commands = 7z a -mx9 $$OUT_PWD/qt-creator-$${PATTERN}.7z \"$$BINDIST_SOURCE\"
Eike Ziller's avatar
Eike Ziller committed
76
bindist_installer.depends = deployqt
77
bindist_installer.commands = 7z a -mx9 $${INSTALLER_ARCHIVE} \"$$BINDIST_INSTALLER_SOURCE\"
Eike Ziller's avatar
Eike Ziller committed
78
installer.depends = bindist_installer
79
installer.commands = $$PWD/scripts/packageIfw.py -i \"$(IFW_PATH)\" -v $${QTCREATOR_VERSION} -a \"$${INSTALLER_ARCHIVE}\" "qt-creator-$${PATTERN}"
Daniel Molkentin's avatar
Daniel Molkentin committed
80

81 82 83
win32 {
    deployqt.commands ~= s,/,\\\\,g
    bindist.commands ~= s,/,\\\\,g
Eike Ziller's avatar
Eike Ziller committed
84 85
    bindist_installer.commands ~= s,/,\\\\,g
    installer.commands ~= s,/,\\\\,g
86
}
87

Eike Ziller's avatar
Eike Ziller committed
88
QMAKE_EXTRA_TARGETS += deployqt bindist bindist_installer installer