static.pro 3.98 KB
Newer Older
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
1
2
3
4
include(../../qtcreator.pri)

TEMPLATE = app
TARGET = phony_target
5
CONFIG -= qt sdk separate_debug_info gdb_dwarf_index
6
7
QT =
LIBS =
8
macx:CONFIG -= app_bundle
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
9
10

isEmpty(vcproj) {
11
    QMAKE_LINK = @: IGNORE THIS LINE
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
12
13
14
    OBJECTS_DIR =
    win32:CONFIG -= embed_manifest_exe
} else {
15
    CONFIG += console
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
16
17
18
    PHONY_DEPS = .
    phony_src.input = PHONY_DEPS
    phony_src.output = phony.c
19
    phony_src.variable_out = GENERATED_SOURCES
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
20
    phony_src.commands = echo int main() { return 0; } > phony.c
21
    phony_src.name = CREATE phony.c
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
22
23
24
25
26
    phony_src.CONFIG += combine
    QMAKE_EXTRA_COMPILERS += phony_src
}

DATA_DIRS = \
27
    welcomescreen \
28
    examplebrowser \
29
    snippets \
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
30
31
32
    templates \
    designer \
    schemes \
Roberto Raggi's avatar
Roberto Raggi committed
33
    styles \
34
    rss \
35
    debugger \
36
    qmldesigner \
37
    qmlicons \
38
    qml \
39
    qml-type-descriptions \
40
    generic-highlighter \
41
42
    glsl \
    cplusplus
43
macx: DATA_DIRS += scripts
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
44

45
46
47
for(data_dir, DATA_DIRS) {
    files = $$files($$PWD/$$data_dir/*, true)
    win32:files ~= s|\\\\|/|g
48
    # Info.plist.in are handled below
49
50
51
52
    for(file, files):!contains(file, ".*/Info\\.plist\\.in$"):!exists($$file/*):FILES += $$file
}
OTHER_FILES += $$FILES

53
# conditionally deployed data
54
!isEmpty(copydata) {
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
55
    copy2build.input = FILES
56
    copy2build.output = $$IDE_DATA_PATH/${QMAKE_FUNC_FILE_IN_stripSrcDir}
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
57
    isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS
58
59
    win32:copy2build.commands = $$QMAKE_COPY \"${QMAKE_FILE_IN}\" \"${QMAKE_FILE_OUT}\"
    unix:copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
60
61
62
63
64
    copy2build.name = COPY ${QMAKE_FILE_IN}
    copy2build.CONFIG += no_link
    QMAKE_EXTRA_COMPILERS += copy2build
}

65
!macx {
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
66
67
    for(data_dir, DATA_DIRS) {
        eval($${data_dir}.files = $$quote($$PWD/$$data_dir))
Daniel Molkentin's avatar
Daniel Molkentin committed
68
        eval($${data_dir}.path = $$QTC_PREFIX/share/qtcreator)
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
69
70
        INSTALLS += $$data_dir
    }
71
72
} else {
   # do version magic for app bundles
con's avatar
con committed
73
74
75
   dumpinfo.input = qml/qmldump/Info.plist.in
   dumpinfo.output = $$IDE_DATA_PATH/qml/qmldump/Info.plist
   QMAKE_SUBSTITUTES += dumpinfo
76
77
78
79
80
81
   puppetinfo.input = qml/qmlpuppet/qmlpuppet/Info.plist.in
   puppetinfo.output = $$IDE_DATA_PATH/qml/qmlpuppet/qmlpuppet/Info.plist
   QMAKE_SUBSTITUES += puppetinfo
   puppet2info.input = qml/qmlpuppet/qml2puppet/Info.plist.in
   puppet2info.output = $$IDE_DATA_PATH/qml/qmlpuppet/qml2puppet/Info.plist
   QMAKE_SUBSTITUES += puppetinfo
con's avatar
con committed
82
}
83
84
85
86
87
88
89
90
91
92
93
94
95
96

SRCRESOURCEDIR = $$IDE_SOURCE_TREE/src/share/qtcreator/
defineReplace(stripSrcResourceDir) {
    win32 {
        !contains(1, ^.:.*):1 = $$OUT_PWD/$$1
    } else {
        !contains(1, ^/.*):1 = $$OUT_PWD/$$1
    }
    out = $$cleanPath($$1)
    out ~= s|^$$re_escape($$SRCRESOURCEDIR)||$$i_flag
    return($$out)
}

# files that are to be unconditionally "deployed" to the build dir from src/share to share
97
98
DATA_DIRS = \
    externaltools
99
100
101
DATA_FILES_SRC = \
    externaltools/lrelease.xml \
    externaltools/lupdate.xml \
102
    externaltools/sort.xml \
103
104
    externaltools/qmlviewer.xml \
    externaltools/qmlscene.xml
105
106
107
108
109
110
111
unix {
    macx:DATA_FILES_SRC += externaltools/vi_mac.xml
    else:DATA_FILES_SRC += externaltools/vi.xml
} else {
    DATA_FILES_SRC += externaltools/notepad_win.xml
}
for(file, DATA_FILES_SRC):DATA_FILES += $${SRCRESOURCEDIR}$$file
112
OTHER_FILES += $$DATA_FILES
113
114
115
116
117
118
119
120
unconditionalCopy2build.input = DATA_FILES
unconditionalCopy2build.output = $$IDE_DATA_PATH/${QMAKE_FUNC_FILE_IN_stripSrcResourceDir}
isEmpty(vcproj):unconditionalCopy2build.variable_out = PRE_TARGETDEPS
win32:unconditionalCopy2build.commands = $$QMAKE_COPY \"${QMAKE_FILE_IN}\" \"${QMAKE_FILE_OUT}\"
unix:unconditionalCopy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
unconditionalCopy2build.name = COPY ${QMAKE_FILE_IN}
unconditionalCopy2build.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += unconditionalCopy2build
121
122
123
124

!macx {
    for(data_dir, DATA_DIRS) {
        eval($${data_dir}.files = $$IDE_DATA_PATH/$$data_dir)
Daniel Molkentin's avatar
Daniel Molkentin committed
125
        eval($${data_dir}.path = $$QTC_PREFIX/share/qtcreator)
126
127
128
129
        eval($${data_dir}.CONFIG += no_check_exist)
        INSTALLS += $$data_dir
    }
}