static.pro 2.01 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 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
    examplebrowser \
28
    snippets \
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
29
30
31
    templates \
    designer \
    schemes \
Roberto Raggi's avatar
Roberto Raggi committed
32
    styles \
33
    rss \
34
    gdbmacros \
35
    qmldesigner \
36
    qmlicons \
37
    qml \
38
    qml-type-descriptions \
39
40
    generic-highlighter \
    glsl
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
41

42
!isEmpty(copydata) {
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
43
44

    for(data_dir, DATA_DIRS) {
45
        files = $$files($$PWD/$$data_dir/*, true)
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
46
        win32:files ~= s|\\\\|/|g
47
        for(file, files):!exists($$file/*):FILES += $$file
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
48
49
    }

50
    macx:OTHER_FILES += $$FILES
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
51
    copy2build.input = FILES
52
    copy2build.output = $$IDE_DATA_PATH/${QMAKE_FUNC_FILE_IN_stripSrcDir}
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
53
    isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS
54
55
    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
56
57
58
59
60
61
62
    copy2build.name = COPY ${QMAKE_FILE_IN}
    copy2build.CONFIG += no_link
    QMAKE_EXTRA_COMPILERS += copy2build

    macx {
        run_in_term.target = $$IDE_DATA_PATH/runInTerminal.command
        run_in_term.depends = $$PWD/runInTerminal.command
63
        run_in_term.commands = $$QMAKE_COPY \"$<\" \"$@\"
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
64
65
66
67
68
69
        QMAKE_EXTRA_TARGETS += run_in_term
        PRE_TARGETDEPS += $$run_in_term.target
        QMAKE_CLEAN += $$run_in_term.target
    }
}

70
!macx {
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
71
72
73
74
75
76
    for(data_dir, DATA_DIRS) {
        eval($${data_dir}.files = $$quote($$PWD/$$data_dir))
        eval($${data_dir}.path = /share/qtcreator)
        INSTALLS += $$data_dir
    }
}