forked from qt-creator/qt-creator
revamp build system
now bin and share are not pegged to linking the executable any more, but are proper subdirs targets of their own. unforturnately, qmake is a bit tenacious, so we hack around a bit. :) more or less in passing by, i removed some superfluous trailing slashes and added path normalization as well.
This commit is contained in:
16
bin/bin.pro
Normal file
16
bin/bin.pro
Normal file
@@ -0,0 +1,16 @@
|
||||
IDE_BUILD_TREE = $$OUT_PWD/..
|
||||
|
||||
include(../qtcreator.pri)
|
||||
|
||||
TEMPLATE = app
|
||||
TARGET = $$IDE_APP_WRAPPER
|
||||
OBJECTS_DIR =
|
||||
|
||||
PRE_TARGETDEPS = $$PWD/qtcreator
|
||||
|
||||
QMAKE_LINK = cp $$PWD/qtcreator $@ && : IGNORE REST
|
||||
|
||||
QMAKE_CLEAN = $$IDE_APP_WRAPPER
|
||||
|
||||
target.path = /bin
|
||||
INSTALLS += target
|
@@ -1,4 +1,22 @@
|
||||
IDE_SOURCE_TREE = $$PWD/../
|
||||
IDE_SOURCE_TREE = $$PWD
|
||||
|
||||
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))
|
||||
}
|
||||
|
||||
defineReplace(targetPath) {
|
||||
win32:1 ~= s|/|\|g
|
||||
return($$1)
|
||||
}
|
||||
|
||||
isEmpty(TEST):CONFIG(debug, debug|release) {
|
||||
!debug_and_release|build_pass {
|
||||
@@ -18,33 +36,35 @@ equals(TEST, 1) {
|
||||
}
|
||||
|
||||
isEmpty(IDE_BUILD_TREE) {
|
||||
error("qworkbench.pri: including file must define IDE_BUILD_TREE (probably a relative path)")
|
||||
error("qtcreator.pri: including file must define IDE_BUILD_TREE (probably a relative path)")
|
||||
}
|
||||
IDE_BUILD_TREE = $$cleanPath($$IDE_BUILD_TREE)
|
||||
macx {
|
||||
IDE_APP_TARGET = QtCreator
|
||||
IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/bin/$${IDE_APP_TARGET}.app/Contents/PlugIns
|
||||
IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH
|
||||
IDE_DATA_PATH = $$IDE_BUILD_TREE/bin/$${IDE_APP_TARGET}.app/Contents/Resources
|
||||
contains(QT_CONFIG, ppc):CONFIG += ppc x86
|
||||
} else {
|
||||
win32 {
|
||||
IDE_APP_TARGET = qtcreator
|
||||
} else {
|
||||
IDE_APP_WRAPPER = qtcreator
|
||||
IDE_APP_TARGET = qtcreator.bin
|
||||
}
|
||||
IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator
|
||||
IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins/
|
||||
IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins
|
||||
IDE_DATA_PATH = $$IDE_BUILD_TREE/share/qtcreator
|
||||
}
|
||||
IDE_APP_PATH = $$IDE_BUILD_TREE/bin
|
||||
win32 {
|
||||
IDE_APP_TARGET = qtcreator
|
||||
IDE_LIBRARY_PATH ~= s|/+|\|
|
||||
IDE_APP_PATH ~= s|/+|\|
|
||||
}
|
||||
|
||||
INCLUDEPATH += \
|
||||
$$IDE_SOURCE_TREE/src/libs \
|
||||
$$IDE_SOURCE_TREE/tools \
|
||||
$$IDE_SOURCE_TREE/tools
|
||||
|
||||
DEPENDPATH += \
|
||||
$$IDE_SOURCE_TREE/src/libs \
|
||||
$$IDE_SOURCE_TREE/tools \
|
||||
$$IDE_SOURCE_TREE/tools
|
||||
|
||||
LIBS += -L$$IDE_LIBRARY_PATH
|
||||
|
||||
@@ -58,8 +78,8 @@ unix {
|
||||
debug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared
|
||||
release:MOC_DIR = $${OUT_PWD}/.moc/release-shared
|
||||
|
||||
RCC_DIR = $${OUT_PWD}/.rcc/
|
||||
UI_DIR = $${OUT_PWD}/.uic/
|
||||
RCC_DIR = $${OUT_PWD}/.rcc
|
||||
UI_DIR = $${OUT_PWD}/.uic
|
||||
}
|
||||
|
||||
linux-g++-* {
|
@@ -10,7 +10,8 @@ include(doc/doc.pri)
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS = src
|
||||
SUBDIRS = src share
|
||||
unix:!macx:!equals(_PRO_FILE_PWD_, $$OUT_PWD):SUBDIRS += bin
|
||||
|
||||
# for Qt Creator translations
|
||||
QTC_BUILD_ROOT = $$PWD
|
||||
|
74
share/qtcreator/static.pro
Normal file
74
share/qtcreator/static.pro
Normal file
@@ -0,0 +1,74 @@
|
||||
IDE_BUILD_TREE = $$OUT_PWD/../..
|
||||
|
||||
include(../../qtcreator.pri)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1
|
||||
|
||||
TEMPLATE = app
|
||||
TARGET = phony_target
|
||||
|
||||
isEmpty(vcproj) {
|
||||
QMAKE_LINK = : IGNORE REST
|
||||
OBJECTS_DIR =
|
||||
win32:CONFIG -= embed_manifest_exe
|
||||
} else {
|
||||
PHONY_DEPS = .
|
||||
phony_src.input = PHONY_DEPS
|
||||
phony_src.output = phony.c
|
||||
phony_src.commands = echo int main() { return 0; } > phony.c
|
||||
phony_src.CONFIG += combine
|
||||
QMAKE_EXTRA_COMPILERS += phony_src
|
||||
}
|
||||
|
||||
DATA_DIRS = \
|
||||
snippets \
|
||||
templates \
|
||||
designer \
|
||||
schemes \
|
||||
gdbmacros
|
||||
|
||||
macx|!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
|
||||
|
||||
for(data_dir, DATA_DIRS) {
|
||||
files = $$files($$PWD/$$data_dir/*.*, true)
|
||||
win32:files ~= s|\\\\|/|g
|
||||
FILES += $$files
|
||||
}
|
||||
|
||||
copy2build.input = FILES
|
||||
copy2build.output = $$IDE_DATA_PATH/${QMAKE_FUNC_FILE_IN_stripSrcDir}
|
||||
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
|
||||
}
|
||||
}
|
@@ -1,74 +0,0 @@
|
||||
macx {
|
||||
SNIPPETS.path = Contents/Resources
|
||||
SNIPPETS.files = $$PWD/qtcreator/snippets
|
||||
TEMPLATES.path = Contents/Resources
|
||||
TEMPLATES.files = $$PWD/qtcreator/templates
|
||||
DESIGNER.path = Contents/Resources
|
||||
DESIGNER.files = $$PWD/qtcreator/designer
|
||||
SCHEMES.path = Contents/Resources
|
||||
SCHEMES.files = $$PWD/qtcreator/schemes
|
||||
GDBDEBUGGER.path = Contents/Resources
|
||||
GDBDEBUGGER.files = $$PWD/qtcreator/gdbmacros
|
||||
RUNINTERMINAL.path = Contents/Resources
|
||||
RUNINTERMINAL.files = $$PWD/qtcreator/runInTerminal.command
|
||||
QMAKE_BUNDLE_DATA += SNIPPETS TEMPLATES DESIGNER SCHEMES GDBDEBUGGER RUNINTERMINAL
|
||||
QMAKE_INFO_PLIST = $$PWD/qtcreator/Info.plist
|
||||
} else {
|
||||
# make sure the resources are in place
|
||||
!exists($$OUT_PWD/app.pro) {
|
||||
# we are shadow build
|
||||
unix:SEPARATOR = ;
|
||||
win32:SEPARATOR = &
|
||||
COPYSRC = snippets \
|
||||
templates \
|
||||
designer \
|
||||
schemes \
|
||||
gdbmacros
|
||||
COPYDEST = $${OUT_PWD}/../../share/qtcreator
|
||||
win32:COPYDEST ~= s|/+|\|
|
||||
QMAKE_POST_LINK += $${QMAKE_MKDIR} $$COPYDEST $$SEPARATOR
|
||||
for(tmp,COPYSRC) {
|
||||
REALSRC = $$PWD/qtcreator/$$tmp
|
||||
REALDEST = $$COPYDEST/$$tmp
|
||||
win32:REALSRC ~= s|/+|\|
|
||||
win32:REALDEST ~= s|/+|\|
|
||||
QMAKE_POST_LINK += $${QMAKE_COPY_DIR} $${REALSRC} $${REALDEST} $$SEPARATOR
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
linux-* {
|
||||
keymaps.files += $$PWD/qtcreator/schemes/MS_Visual_C++.kms
|
||||
keymaps.files += $$PWD/qtcreator/schemes/Xcode.kms
|
||||
keymaps.path = /share/qtcreator/schemes
|
||||
|
||||
gdbsupport.files += $$PWD/qtcreator/gdbmacros/LICENSE.LGPL
|
||||
gdbsupport.files += $$PWD/qtcreator/gdbmacros/LGPL_EXCEPTION.TXT
|
||||
gdbsupport.files += $$PWD/qtcreator/gdbmacros/gdbmacros.cpp
|
||||
gdbsupport.files += $$PWD/qtcreator/gdbmacros/gdbmacros.pro
|
||||
gdbsupport.path = /share/qtcreator/gdbmacros
|
||||
|
||||
designertemplates.files += $$PWD/qtcreator/designer/templates.xml
|
||||
designertemplates.files += $$PWD/qtcreator/designer/templates/*
|
||||
designertemplates.path = /share/qtcreator/designer/templates
|
||||
|
||||
snippets.files += $$PWD/qtcreator/snippets/*.snp
|
||||
snippets.path = /share/qtcreator/snippets
|
||||
|
||||
projecttemplates.files += $$PWD/qtcreator/templates/qt4project/mywidget_form.h
|
||||
projecttemplates.files += $$PWD/qtcreator/templates/qt4project/main.cpp
|
||||
projecttemplates.files += $$PWD/qtcreator/templates/qt4project/mywidget.cpp
|
||||
projecttemplates.files += $$PWD/qtcreator/templates/qt4project/mywidget.h
|
||||
projecttemplates.files += $$PWD/qtcreator/templates/qt4project/widget.ui
|
||||
projecttemplates.files += $$PWD/qtcreator/templates/qt4project/mywidget_form.cpp
|
||||
projecttemplates.path = /share/qtcreator/templates/qt4project
|
||||
|
||||
INSTALLS += \
|
||||
keymaps \
|
||||
gdbsupport \
|
||||
designertemplates \
|
||||
snippets \
|
||||
projecttemplates
|
||||
|
||||
}
|
||||
|
2
share/share.pro
Normal file
2
share/share.pro
Normal file
@@ -0,0 +1,2 @@
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS = qtcreator/static.pro
|
@@ -1,6 +1,6 @@
|
||||
IDE_BUILD_TREE = $$OUT_PWD/../../
|
||||
IDE_BUILD_TREE = $$OUT_PWD/../..
|
||||
|
||||
include(../qworkbench.pri)
|
||||
include(../../qtcreator.pri)
|
||||
include(../shared/qtsingleapplication/qtsingleapplication.pri)
|
||||
|
||||
TEMPLATE = app
|
||||
@@ -18,6 +18,7 @@ win32 {
|
||||
|
||||
macx {
|
||||
ICON = qtcreator.icns
|
||||
QMAKE_INFO_PLIST = Info.plist
|
||||
}
|
||||
|
||||
macx {
|
||||
@@ -31,25 +32,6 @@ win32 {
|
||||
unix:!macx {
|
||||
LIBS *= -lExtensionSystem -lAggregation
|
||||
|
||||
# make sure the wrapper is in place
|
||||
!exists($$OUT_PWD/app.pro) {
|
||||
# we are shadow build
|
||||
COPYSRC = $$PWD/$$DESTDIR/$$IDE_APP_WRAPPER
|
||||
COPYDEST = $$OUT_PWD/$$DESTDIR/$$IDE_APP_WRAPPER
|
||||
win32:COPYSRC ~= s|/+|\|
|
||||
win32:COPYDEST ~= s|/+|\|
|
||||
unix:SEPARATOR = ;
|
||||
win32:SEPARATOR = &
|
||||
QMAKE_POST_LINK += $${QMAKE_COPY_FILE} $${COPYSRC} $${COPYDEST} $$SEPARATOR
|
||||
}
|
||||
|
||||
wrapper.files = $$OUT_PWD/$$DESTDIR/$$IDE_APP_WRAPPER
|
||||
wrapper.path = /bin
|
||||
|
||||
target.path = /bin
|
||||
|
||||
INSTALLS += target wrapper
|
||||
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
include(../../share/share.pri)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
IDE_BUILD_TREE=../../../
|
||||
include(../../qworkbench.pri)
|
||||
IDE_BUILD_TREE=../../..
|
||||
include(../../../qtcreator.pri)
|
||||
|
||||
TEMPLATE = app
|
||||
TARGET = qtcreator_process_stub
|
||||
|
@@ -1,5 +1,5 @@
|
||||
IDE_BUILD_TREE = $$OUT_PWD/../../../
|
||||
include(qworkbench.pri)
|
||||
IDE_BUILD_TREE = $$OUT_PWD/../../..
|
||||
include(../qtcreator.pri)
|
||||
|
||||
win32 {
|
||||
DLLDESTDIR = $$IDE_APP_PATH
|
||||
|
@@ -1,13 +1,13 @@
|
||||
isEmpty(IDE_BUILD_TREE) {
|
||||
IDE_BUILD_TREE = $$OUT_PWD/../../../
|
||||
IDE_BUILD_TREE = $$OUT_PWD/../../..
|
||||
}
|
||||
include(qworkbench.pri)
|
||||
include(../qtcreator.pri)
|
||||
|
||||
isEmpty(PROVIDER) {
|
||||
PROVIDER = Nokia
|
||||
}
|
||||
|
||||
DESTDIR = $$IDE_PLUGIN_PATH/$$PROVIDER/
|
||||
DESTDIR = $$IDE_PLUGIN_PATH/$$PROVIDER
|
||||
LIBS += -L$$DESTDIR
|
||||
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins
|
||||
DEPENDPATH += $$IDE_SOURCE_TREE/src/plugins
|
||||
|
@@ -1,5 +1,5 @@
|
||||
|
||||
QTCREATOR = ../../plugins/
|
||||
QTCREATOR = ../../plugins
|
||||
|
||||
TARGET = ../../../bin/qdebugger
|
||||
|
||||
@@ -115,9 +115,9 @@ SOURCES += \
|
||||
|
||||
|
||||
unix {
|
||||
OBJECTS_DIR = .tmp/
|
||||
MOC_DIR = .tmp/
|
||||
RCC_DIR = .tmp/
|
||||
UI_DIR = .tmp/
|
||||
OBJECTS_DIR = .tmp
|
||||
MOC_DIR = .tmp
|
||||
RCC_DIR = .tmp
|
||||
UI_DIR = .tmp
|
||||
}
|
||||
|
||||
|
@@ -8,7 +8,7 @@ TEMPLATE = app
|
||||
TARGET =
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += .
|
||||
DESTDIR = ./
|
||||
DESTDIR = .
|
||||
|
||||
# Input
|
||||
HEADERS += binpatch.h
|
||||
|
@@ -1,5 +1,5 @@
|
||||
|
||||
QTCREATOR = ../../plugins/
|
||||
QTCREATOR = ../../plugins
|
||||
|
||||
TARGET = ../../../bin/texteditor
|
||||
|
||||
@@ -39,8 +39,8 @@ SOURCES += \
|
||||
# $${QTCREATOR}/gdbdebugger/gdbdebugger.qrc
|
||||
|
||||
unix {
|
||||
OBJECTS_DIR = .tmp/
|
||||
MOC_DIR = .tmp/
|
||||
RCC_DIR = .tmp/
|
||||
UI_DIR = .tmp/
|
||||
OBJECTS_DIR = .tmp
|
||||
MOC_DIR = .tmp
|
||||
RCC_DIR = .tmp
|
||||
UI_DIR = .tmp
|
||||
}
|
||||
|
Reference in New Issue
Block a user