diff --git a/src/tools/sdktool/CMakeLists.txt b/src/tools/sdktool/CMakeLists.txt index cdd9d50f147..76040f4ba00 100644 --- a/src/tools/sdktool/CMakeLists.txt +++ b/src/tools/sdktool/CMakeLists.txt @@ -40,9 +40,11 @@ endif() set(UtilsSourcesDir "../../libs/utils") +file(RELATIVE_PATH DATA_PATH "/${IDE_LIBEXEC_PATH}" "/${IDE_DATA_PATH}") + add_qtc_executable(sdktool ${DESTINATION} - DEFINES DATA_PATH=\"${IDE_DATA_PATH}\" + DEFINES DATA_PATH=\"${DATA_PATH}\" DEPENDS Qt5::Core INCLUDES "${UtilsSourcesDir}/../" diff --git a/src/tools/sdktool/main.cpp b/src/tools/sdktool/main.cpp index c1ecb287461..0a07b1157cf 100644 --- a/src/tools/sdktool/main.cpp +++ b/src/tools/sdktool/main.cpp @@ -79,6 +79,14 @@ void printHelp(const std::vector> &operations) std::cout << " --help|-h Print this help text" << std::endl; std::cout << " --sdkpath=PATH|-s PATH Set the path to the SDK files" << std::endl << std::endl; + std::cout << "Default sdkpath is \"" + << qPrintable(QDir::cleanPath( + Utils::FilePath::fromString(QCoreApplication::applicationDirPath()) + .pathAppended(DATA_PATH) + .toUserOutput())) + << "\"" << std::endl + << std::endl; + std::cout << "OPERATION:" << std::endl; std::cout << " One of:" << std::endl; for (const std::unique_ptr &o : operations)