static.pro 1.65 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
6
7
QT =
LIBS =
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
8
9

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

DATA_DIRS = \
    snippets \
    templates \
    designer \
    schemes \
    gdbmacros

32
!isEmpty(copydata) {
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
33
34
35
36
37
38
39
40

    for(data_dir, DATA_DIRS) {
        files = $$files($$PWD/$$data_dir/*.*, true)
        win32:files ~= s|\\\\|/|g
        FILES += $$files
    }

    copy2build.input = FILES
41
    copy2build.output = $$IDE_DATA_PATH/${QMAKE_FUNC_FILE_IN_stripSrcDir}
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
    isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS
    copy2build.commands = $$QMAKE_COPY \"${QMAKE_FILE_IN}\" \"${QMAKE_FILE_OUT}\"
    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
        run_in_term.commands = $$QMAKE_COPY $< $@
        QMAKE_EXTRA_TARGETS += run_in_term
        PRE_TARGETDEPS += $$run_in_term.target
        QMAKE_CLEAN += $$run_in_term.target
    }
}

unix:!macx {
    for(data_dir, DATA_DIRS) {
        eval($${data_dir}.files = $$quote($$PWD/$$data_dir))
        eval($${data_dir}.path = /share/qtcreator)
        INSTALLS += $$data_dir
    }
}