diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2012-02-15 15:56:22 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-02-15 21:57:41 +0100 |
commit | 5672fa8fd3bd6b09125d9e143a7bb277cea2e87f (patch) | |
tree | c945b6ad76bd8c8f6af8b520cf3ce72ef298d4b5 /static.pro |
Long live qbs!
Change-Id: I412793e868919a9ac99611616f292e7047f1ebcf
Diffstat (limited to 'static.pro')
-rw-r--r-- | static.pro | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/static.pro b/static.pro new file mode 100644 index 000000000..35168f08a --- /dev/null +++ b/static.pro @@ -0,0 +1,70 @@ +TEMPLATE = app +TARGET = phony_target +CONFIG -= qt separate_debug_info gdb_dwarf_index +QT = +LIBS = +macx:CONFIG -= app_bundle + +isEmpty(vcproj) { + QMAKE_LINK = @: IGNORE THIS LINE + OBJECTS_DIR = + win32:CONFIG -= embed_manifest_exe +} else { + CONFIG += console + PHONY_DEPS = . + phony_src.input = PHONY_DEPS + phony_src.output = phony.c + phony_src.variable_out = GENERATED_SOURCES + phony_src.commands = echo int main() { return 0; } > phony.c + phony_src.name = CREATE phony.c + phony_src.CONFIG += combine + QMAKE_EXTRA_COMPILERS += phony_src +} + +DATA_DIRS = share/qbs/imports share/qbs/modules +win32:DATA_FILES = bin/ibmsvc.xml bin/ibqbs.bat + +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)) +} + +# 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) +} + +!isEqual(PWD, $$OUT_PWD) { + for(data_dir, DATA_DIRS) { + files = $$files($$PWD/$$data_dir/*, true) + win32:files ~= s|\\\\|/|g + for(file, files):!exists($$file/*):FILES += $$file + } + FILES += $$DATA_FILES + + OTHER_FILES += $$FILES + copy2build.input = FILES + copy2build.output = ${QMAKE_FUNC_FILE_IN_stripSrcDir} + isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS + win32:copy2build.commands = $$QMAKE_COPY \"${QMAKE_FILE_IN}\" \"${QMAKE_FILE_OUT}\" + unix:copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} + copy2build.name = COPY ${QMAKE_FILE_IN} + copy2build.CONFIG += no_link + QMAKE_EXTRA_COMPILERS += copy2build +} |