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()