diff options
author | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-07-03 16:05:06 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-09-30 08:55:27 +0000 |
commit | 6dca1499ac867a3a66d5d1210918ec1f8ff0652c (patch) | |
tree | b6ae6f9d03f40bfbc8fca7909ebcd1406bcd30cd /qtcreator.pri | |
parent | b42bd585c4d3a6c86efb5bc5ee0ec9f00a239dcf (diff) | |
download | qt-creator-6dca1499ac867a3a66d5d1210918ec1f8ff0652c.tar.gz |
Allow different destination directory than Qt Creator build directory
This is useful for compiling and packaging plugins separately from Qt
Creator, where we want to keep the structure of the compilation result
the same as, but separately from, the Qt Creator build directory.
Change-Id: I307f119fc7901e00790ec85bfb01cc3ba5fa6e85
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'qtcreator.pri')
-rw-r--r-- | qtcreator.pri | 50 |
1 files changed, 36 insertions, 14 deletions
diff --git a/qtcreator.pri b/qtcreator.pri index 0d3f68feb8..2f0ae9ed3d 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -73,26 +73,43 @@ isEmpty(IDE_BUILD_TREE) { IDE_BUILD_TREE = $$clean_path($$OUT_PWD) IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,, } + IDE_APP_PATH = $$IDE_BUILD_TREE/bin -macx { +osx { IDE_APP_TARGET = "Qt Creator" - IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Frameworks - IDE_PLUGIN_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns - IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources - IDE_DATA_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources + + IDE_APP_BUNDLE = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app + + # set output path if not set manually + isEmpty(IDE_OUTPUT_PATH): IDE_OUTPUT_PATH = $$IDE_APP_BUNDLE/Contents + + IDE_LIBRARY_PATH = $$IDE_OUTPUT_PATH/Frameworks + IDE_PLUGIN_PATH = $$IDE_OUTPUT_PATH/PlugIns + IDE_LIBEXEC_PATH = $$IDE_OUTPUT_PATH/Resources + IDE_DATA_PATH = $$IDE_OUTPUT_PATH/Resources IDE_DOC_PATH = $$IDE_DATA_PATH/doc - IDE_BIN_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS + IDE_BIN_PATH = $$IDE_OUTPUT_PATH/MacOS copydata = 1 + + LINK_LIBRARY_PATH = $$IDE_APP_BUNDLE/Contents/Frameworks + LINK_PLUGIN_PATH = $$IDE_APP_BUNDLE/Contents/PlugIns } else { contains(TEMPLATE, vc.*):vcproj = 1 IDE_APP_TARGET = qtcreator - IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator + + # target output path if not set manually + isEmpty(IDE_OUTPUT_PATH): IDE_OUTPUT_PATH = $$IDE_BUILD_TREE + + IDE_LIBRARY_PATH = $$IDE_OUTPUT_PATH/$$IDE_LIBRARY_BASENAME/qtcreator IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins - IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME - IDE_DATA_PATH = $$IDE_BUILD_TREE/share/qtcreator - IDE_DOC_PATH = $$IDE_BUILD_TREE/share/doc/qtcreator - IDE_BIN_PATH = $$IDE_APP_PATH - !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1 + IDE_LIBEXEC_PATH = $$IDE_OUTPUT_PATH/bin # FIXME + IDE_DATA_PATH = $$IDE_OUTPUT_PATH/share/qtcreator + IDE_DOC_PATH = $$IDE_OUTPUT_PATH/share/doc/qtcreator + IDE_BIN_PATH = $$IDE_OUTPUT_PATH/bin + !isEqual(IDE_SOURCE_TREE, $$IDE_OUTPUT_PATH):copydata = 1 + + LINK_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator + LINK_PLUGIN_PATH = $$LINK_LIBRARY_PATH/plugins } INCLUDEPATH += \ @@ -111,7 +128,8 @@ CONFIG += \ depend_includepath \ no_include_pwd -LIBS += -L$$IDE_LIBRARY_PATH +LIBS *= -L$$LINK_LIBRARY_PATH # Qt Creator libraries +exists($$IDE_LIBRARY_PATH): LIBS *= -L$$IDE_LIBRARY_PATH # library path from output path !isEmpty(vcproj) { DEFINES += IDE_LIBRARY_BASENAME=\"$$IDE_LIBRARY_BASENAME\" @@ -149,7 +167,11 @@ qt { QBSFILE = $$replace(_PRO_FILE_, \\.pro$, .qbs) exists($$QBSFILE):DISTFILES += $$QBSFILE -!isEmpty(QTC_PLUGIN_DEPENDS):LIBS *= -L$$IDE_PLUGIN_PATH +!isEmpty(QTC_PLUGIN_DEPENDS) { + LIBS *= -L$$IDE_PLUGIN_PATH # plugin path from output directory + LIBS *= -L$$LINK_PLUGIN_PATH # when output path is different from Qt Creator build directory +} + # recursively resolve plugin deps done_plugins = for(ever) { |