Skip to content

Commit

Permalink
chore: fetch QtCreator into version-specific directory
Browse files Browse the repository at this point in the history
  • Loading branch information
gikari committed Dec 3, 2022
1 parent 1092c56 commit 11730ce
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
6 changes: 4 additions & 2 deletions external/qtcreator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### Download and install Qt Creator
set(QTC_DIST_PATH "${PROJECT_SOURCE_DIR}/external/qtcreator/dist-${CMAKE_SYSTEM_NAME}")
include("version.cmake")

set(QTC_DIST_PATH
"${PROJECT_SOURCE_DIR}/external/qtcreator/dist-${CMAKE_SYSTEM_NAME}-${QT_CREATOR_VERSION}")
if (NOT EXISTS "${QTC_DIST_PATH}")
execute_process(COMMAND
${CMAKE_COMMAND} -P "${PROJECT_SOURCE_DIR}/tools/DownloadQtCreator.cmake"
Expand Down
2 changes: 2 additions & 0 deletions external/qtcreator/version.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(QT_CREATOR_VERSION "4.15.2")
set(QT_CREATOR_SNAPSHOT "")
9 changes: 6 additions & 3 deletions tools/DownloadQtCreator.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
set(QT_CREATOR_VERSION "4.15.2")
set(QT_CREATOR_SNAPSHOT "")
set(QTC_EXT_DIR "${CMAKE_CURRENT_LIST_DIR}/../external/qtcreator")

# Fetch Qt Creator Version
include("${QTC_EXT_DIR}/version.cmake")

# Notify CI about Qt Creator version
file(APPEND $ENV{GITHUB_OUTPUT} "qtc_ver=${QT_CREATOR_VERSION}")
Expand All @@ -22,7 +24,8 @@ elseif ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin")
set(qtc_platform "mac_x64")
endif()

set(QTC_DIST_DIR "${CMAKE_CURRENT_LIST_DIR}/../external/qtcreator/dist-${CMAKE_HOST_SYSTEM_NAME}")
set(QTC_DIST_DIR "${QTC_EXT_DIR}/dist-${CMAKE_HOST_SYSTEM_NAME}-${QT_CREATOR_VERSION}")

file(MAKE_DIRECTORY "${QTC_DIST_DIR}")

message(STATUS "Downloading Qt Creator from ${qtc_base_url}/${qtc_platform}...")
Expand Down
3 changes: 2 additions & 1 deletion tools/ci/Package.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
set(QTC_DIR "${CMAKE_CURRENT_LIST_DIR}/../../external/qtcreator/dist-${CMAKE_HOST_SYSTEM_NAME}")
set(QTC_EXT_DIR "${CMAKE_CURRENT_LIST_DIR}/../../external/qtcreator")
set(QTC_DIR "${QTC_EXT_DIR}/dist-${CMAKE_HOST_SYSTEM_NAME}-$ENV{QT_CREATOR_VERSION}")

set(build_plugin_py "scripts/build_plugin.py")
foreach(dir "share/qtcreator/scripts" "Qt Creator.app/Contents/Resources/scripts" "Contents/Resources/scripts")
Expand Down

0 comments on commit 11730ce

Please sign in to comment.