fix: Make build CMakeLists.txt standalone (#123)

Previously it depended on QODEASSIST_QT_CREATOR_VERSION_* flags being
passed to cmake during build process. Making it standalone saves time
for the users.
This commit is contained in:
Povilas Kanapickas
2025-03-10 18:00:07 +02:00
committed by GitHub
parent 3839d6896c
commit 7dd8b3d085
2 changed files with 12 additions and 12 deletions

View File

@ -193,15 +193,6 @@ jobs:
set(ENV{CXX} ${{ matrix.config.cxx }})
set(ENV{MACOSX_DEPLOYMENT_TARGET} "${{ env.MACOS_DEPLOYMENT_TARGET }}")
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" version_match "$ENV{QT_CREATOR_VERSION}")
set(QT_CREATOR_VERSION_MAJOR "${CMAKE_MATCH_1}")
set(QT_CREATOR_VERSION_MINOR "${CMAKE_MATCH_2}")
set(QT_CREATOR_VERSION_PATCH "${CMAKE_MATCH_3}")
if(NOT version_match)
message(FATAL_ERROR "Failed to parse Qt Creator version string: $ENV{QT_CREATOR_VERSION}")
endif()
if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x")
execute_process(
COMMAND "${{ matrix.config.environment_script }}" && set
@ -238,9 +229,6 @@ jobs:
--qt-path "${{ steps.qt.outputs.qt_dir }}"
--qtc-path "${{ steps.qt_creator.outputs.qtc_dir }}"
--output-path "$ENV{GITHUB_WORKSPACE}"
--add-config=-DQODEASSIST_QT_CREATOR_VERSION_MAJOR=${QT_CREATOR_VERSION_MAJOR}
--add-config=-DQODEASSIST_QT_CREATOR_VERSION_MINOR=${QT_CREATOR_VERSION_MINOR}
--add-config=-DQODEASSIST_QT_CREATOR_VERSION_PATCH=${QT_CREATOR_VERSION_PATCH}
RESULT_VARIABLE result
)
if (NOT result EQUAL 0)