diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2019-06-11 17:51:17 +0200 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2019-06-12 11:11:39 +0000 |
commit | 25bd5976bad71e30dda89693127bad825c24e3e1 (patch) | |
tree | e5ad708fd3c6a014d8b454cf6fc7854dba22a780 /src/tools | |
parent | a093dfc65c519c32a7273b70ef6af7b460363518 (diff) |
CMake build: Make sdktool use parts of Utils
Change-Id: I88ab8ab89951bb8966fcc48b7d4ee416015ab8e5
Fixes: QTCREATORBUG-22550
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/sdktool/CMakeLists.txt | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/src/tools/sdktool/CMakeLists.txt b/src/tools/sdktool/CMakeLists.txt index 3be2fb4f7d..3997c9763c 100644 --- a/src/tools/sdktool/CMakeLists.txt +++ b/src/tools/sdktool/CMakeLists.txt @@ -1,8 +1,9 @@ -# TODO: Do not depend on Utils! Include relevant files instead. +get_target_property(UtilsSourcesDir Utils SOURCES_DIR) add_qtc_executable(sdktool DEFINES DATA_PATH=\"${IDE_DATA_PATH}\" - DEPENDS Qt5::Core Utils app_version + DEPENDS Qt5::Core app_version + INCLUDES "${UtilsSourcesDir}/../" SOURCES addabiflavor.cpp addabiflavor.h addcmakeoperation.cpp addcmakeoperation.h @@ -26,3 +27,33 @@ add_qtc_executable(sdktool rmtoolchainoperation.cpp rmtoolchainoperation.h settings.cpp settings.h ) + +extend_qtc_target(sdktool + SOURCES_PREFIX "${UtilsSourcesDir}" + DEFINES QTCREATOR_UTILS_STATIC_LIB + SOURCES + environment.cpp environment.h + fileutils.cpp fileutils.h + hostosinfo.cpp hostosinfo.h + persistentsettings.cpp persistentsettings.h + qtcassert.cpp qtcassert.h + qtcprocess.cpp qtcprocess.h + savefile.cpp savefile.h + stringutils.cpp stringutils.h +) + +extend_qtc_target(sdktool CONDITION APPLE + SOURCES_PREFIX "${UtilsSourcesDir}" + SOURCES + fileutils_mac.mm fileutils_mac.h + DEPENDS + ${FWFoundation} +) + +extend_qtc_target(sdktool CONDITION WIN32 + DEPENDS + user32 iphlpapi ws2_32 shell32 + DEFINES + _UNICODE UNICODE + _CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS +) |