chore: Add support for Qt Creator version to the plugin build script (#87)

This will allow to add code conditional on the Qt Creator version to the
plugin codebase. The Qt Creator version will be passed from the build
script automatically. This will also allow to easily extend the Github
Actions job matrix to create releases for more than one Qt Creator
version.

Using QT_VERSION_CHECK allows to reuse existing Qt patterns of checking
versions.

Code has been tested by invoking QODEASSIST_QT_CREATOR_VERSION in code.
This commit is contained in:
Povilas Kanapickas
2025-03-04 12:17:19 +02:00
committed by GitHub
parent 3b188740e8
commit d8a01504a3
3 changed files with 46 additions and 0 deletions

View File

@ -13,6 +13,12 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
find_package(QtCreator REQUIRED COMPONENTS Core)
find_package(Qt6 COMPONENTS Core Gui Quick Widgets Network REQUIRED)
add_definitions(
-DQODEASSIST_QT_CREATOR_VERSION_MAJOR=${QODEASSIST_QT_CREATOR_VERSION_MAJOR}
-DQODEASSIST_QT_CREATOR_VERSION_MINOR=${QODEASSIST_QT_CREATOR_VERSION_MINOR}
-DQODEASSIST_QT_CREATOR_VERSION_PATCH=${QODEASSIST_QT_CREATOR_VERSION_PATCH}
)
add_subdirectory(llmcore)
add_subdirectory(settings)
add_subdirectory(logger)