File tree 3 files changed +46
-0
lines changed
3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,15 @@ jobs:
187
187
set(ENV{CXX} ${{ matrix.config.cxx }})
188
188
set(ENV{MACOSX_DEPLOYMENT_TARGET} "${{ env.MACOS_DEPLOYMENT_TARGET }}")
189
189
190
+ string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" version_match "$ENV{QT_CREATOR_VERSION}")
191
+ set(QT_CREATOR_VERSION_MAJOR "${CMAKE_MATCH_1}")
192
+ set(QT_CREATOR_VERSION_MINOR "${CMAKE_MATCH_2}")
193
+ set(QT_CREATOR_VERSION_PATCH "${CMAKE_MATCH_3}")
194
+
195
+ if(NOT version_match)
196
+ message(FATAL_ERROR "Failed to parse Qt Creator version string: $ENV{QT_CREATOR_VERSION}")
197
+ endif()
198
+
190
199
if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x")
191
200
execute_process(
192
201
COMMAND "${{ matrix.config.environment_script }}" && set
@@ -223,6 +232,9 @@ jobs:
223
232
--qt-path "${{ steps.qt.outputs.qt_dir }}"
224
233
--qtc-path "${{ steps.qt_creator.outputs.qtc_dir }}"
225
234
--output-path "$ENV{GITHUB_WORKSPACE}"
235
+ --add-config=-DQODEASSIST_QT_CREATOR_VERSION_MAJOR=${QT_CREATOR_VERSION_MAJOR}
236
+ --add-config=-DQODEASSIST_QT_CREATOR_VERSION_MINOR=${QT_CREATOR_VERSION_MINOR}
237
+ --add-config=-DQODEASSIST_QT_CREATOR_VERSION_PATCH=${QT_CREATOR_VERSION_PATCH}
226
238
RESULT_VARIABLE result
227
239
)
228
240
if (NOT result EQUAL 0)
Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
13
13
find_package (QtCreator REQUIRED COMPONENTS Core)
14
14
find_package (Qt6 COMPONENTS Core Gui Quick Widgets Network REQUIRED)
15
15
16
+ add_definitions (
17
+ -DQODEASSIST_QT_CREATOR_VERSION_MAJOR=${QODEASSIST_QT_CREATOR_VERSION_MAJOR}
18
+ -DQODEASSIST_QT_CREATOR_VERSION_MINOR=${QODEASSIST_QT_CREATOR_VERSION_MINOR}
19
+ -DQODEASSIST_QT_CREATOR_VERSION_PATCH=${QODEASSIST_QT_CREATOR_VERSION_PATCH}
20
+ )
21
+
16
22
add_subdirectory (llmcore)
17
23
add_subdirectory (settings)
18
24
add_subdirectory (logger)
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (C) 2025 Povilas Kanapickas <[email protected] >
3
+ *
4
+ * This file is part of QodeAssist.
5
+ *
6
+ * QodeAssist is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * QodeAssist is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License
17
+ * along with QodeAssist. If not, see <https://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ #pragma once
21
+
22
+ #include < QtGlobal>
23
+
24
+ #define QODEASSIST_QT_CREATOR_VERSION \
25
+ QT_VERSION_CHECK ( \
26
+ QODEASSIST_QT_CREATOR_VERSION_MAJOR, \
27
+ QODEASSIST_QT_CREATOR_VERSION_MINOR, \
28
+ QODEASSIST_QT_CREATOR_VERSION_PATCH)
You can’t perform that action at this time.
0 commit comments