From 7d06ab04dc78bfc7389745ed29068be41dc4b527 Mon Sep 17 00:00:00 2001 From: Petr Mironychev <9195189+Palm1r@users.noreply.github.com> Date: Thu, 27 Mar 2025 00:29:23 +0100 Subject: [PATCH] feat: Add RunQtCreator target --- CMakeLists.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 661f9c7..57cb91a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,3 +102,20 @@ add_qtc_plugin(QodeAssist CodeHandler.hpp CodeHandler.cpp UpdateStatusWidget.hpp UpdateStatusWidget.cpp ) + +get_target_property(QtCreatorCorePath QtCreator::Core LOCATION) +find_program(QtCreatorExecutable + NAMES + qtcreator "Qt Creator" + PATHS + "${QtCreatorCorePath}/../../../bin" + "${QtCreatorCorePath}/../../../MacOS" + NO_DEFAULT_PATH +) +if (QtCreatorExecutable) + add_custom_target(RunQtCreator + COMMAND ${QtCreatorExecutable} -pluginpath $ + DEPENDS QodeAssist + ) + set_target_properties(RunQtCreator PROPERTIES FOLDER "qtc_runnable") +endif()