Commit 664ab2c4 authored by Eike Ziller's avatar Eike Ziller

Reduce dependencies for sdktool to QtCore

Explicitly pull in the sources that are needed from utils, instead of
linking against the library.
Also generate another copy of app_version.h for sdktool, so
it is not necessary to run qmake on src/app/ before building sdktool.
For Qbs, it already depends on the separate app_version_header product.

Change-Id: I102c3a928f88a6035640166035c1bca29b126068
Reviewed-by: Jake Petroules's avatarJake Petroules <jake.petroules@qt.io>
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent b91064f3
QTC_LIB_DEPENDS += \
utils
include(../../qtcreatortool.pri)
QT -= gui test
QT -= concurrent gui widgets testlib
isEmpty(PRECOMPILED_HEADER):PRECOMPILED_HEADER = $$PWD/../../shared/qtcreator_pch.h
UTILS = $$PWD/../../libs/utils
SOURCES += \
main.cpp \
addcmakeoperation.cpp \
......@@ -28,6 +27,11 @@ SOURCES += \
rmqtoperation.cpp \
rmtoolchainoperation.cpp \
settings.cpp \
$$UTILS/fileutils.cpp \
$$UTILS/hostosinfo.cpp \
$$UTILS/persistentsettings.cpp \
$$UTILS/qtcassert.cpp \
$$UTILS/savefile.cpp \
HEADERS += \
addcmakeoperation.h \
......@@ -49,6 +53,28 @@ HEADERS += \
rmqtoperation.h \
rmtoolchainoperation.h \
settings.h \
$$UTILS/fileutils.h \
$$UTILS/hostosinfo.h \
$$UTILS/persistentsettings.cpp \
$$UTILS/qtcassert.h \
$$UTILS/savefile.h \
macos {
OBJECTIVE_SOURCES += \
$$UTILS/fileutils_mac.mm \
HEADERS += \
$$UTILS/fileutils_mac.h \
LIBS += -framework Foundation
}
# Generate app_version.h also here, so building sdktool does not require
# running qmake on src/app/
appversion.input = $$PWD/../../app/app_version.h.in
appversion.output = $$OUT_PWD/app/app_version.h
QMAKE_SUBSTITUTES += appversion
INCLUDEPATH += $$OUT_PWD
macx:DEFINES += "DATA_PATH=\"\\\".\\\"\""
else:win32:DEFINES += "DATA_PATH=\"\\\"../share/qtcreator\\\"\""
......
......@@ -4,7 +4,6 @@ QtcTool {
name: "sdktool"
Depends { name: "Qt.core" }
Depends { name: "Utils" }
Depends { name: "app_version_header" }
cpp.defines: base.concat([qbs.targetOS.contains("macos")
......@@ -47,4 +46,16 @@ QtcTool {
"settings.cpp",
"settings.h",
]
Group {
name: "Utils"
prefix: "../../libs/utils/"
files: [
"fileutils.cpp", "fileutils.h",
"hostosinfo.cpp", "hostosinfo.h",
"persistentsettings.cpp", "persistentsettings.h",
"qtcassert.cpp", "qtcassert.h",
"savefile.cpp", "savefile.h"
]
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment