Skip to content

Commit

Permalink
Use simplified Slint binary packages
Browse files Browse the repository at this point in the history
The slint compiler is now a separate automatic download.
  • Loading branch information
tronical committed Aug 29, 2024
1 parent ac3bf09 commit a503e8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
14 changes: 4 additions & 10 deletions stm32h735g-dk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,14 @@ function(try_download_prebuilt_slint_binary slint_version rust_target)
cmake_parse_arguments(option "" "GITHUB_RELEASE" "" ${ARGN})

if (DEFINED option_GITHUB_RELEASE)
set(github_release "${option_GITHUB_RELEASE}")
set(SLINT_GITHUB_RELEASE "${option_GITHUB_RELEASE}" CACHE STRING "GitHub Release to use for Slint Binary Artifact Downloads")
else()
set(github_release "${slint_version}")
set(SLINT_GITHUB_RELEASE "${slint_version}" CACHE STRING "GitHub Release to use for Slint Binary Artifact Downloads")
endif()

if(CMAKE_HOST_WIN32)
set(package_system_name "win32-MinGW")
else()
set(package_system_name "${CMAKE_HOST_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}")
endif()

set(prebuilt_archive_filename "Slint-cpp-${slint_version}-${package_system_name}-${rust_target}.tar.gz")
set(prebuilt_archive_filename "Slint-cpp-${slint_version}-Linux-x86_64-${rust_target}.tar.gz")
set(download_target_path "${CMAKE_BINARY_DIR}/slint-prebuilt/")
set(download_url "https://github.com/slint-ui/slint/releases/download/${github_release}/${prebuilt_archive_filename}")
set(download_url "https://github.com/slint-ui/slint/releases/download/${SLINT_GITHUB_RELEASE}/${prebuilt_archive_filename}")

file(MAKE_DIRECTORY "${download_target_path}")
message(STATUS "Downloading pre-built Slint binary ${download_url}")
Expand Down
14 changes: 4 additions & 10 deletions stm32h747i-disco/CM7/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,14 @@ function(try_download_prebuilt_slint_binary slint_version rust_target)
cmake_parse_arguments(option "" "GITHUB_RELEASE" "" ${ARGN})

if (DEFINED option_GITHUB_RELEASE)
set(github_release "${option_GITHUB_RELEASE}")
set(SLINT_GITHUB_RELEASE "${option_GITHUB_RELEASE}" CACHE STRING "GitHub Release to use for Slint Binary Artifact Downloads")
else()
set(github_release "${slint_version}")
set(SLINT_GITHUB_RELEASE "${slint_version}" CACHE STRING "GitHub Release to use for Slint Binary Artifact Downloads")
endif()

if(CMAKE_HOST_WIN32)
set(package_system_name "win32-MinGW")
else()
set(package_system_name "${CMAKE_HOST_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}")
endif()

set(prebuilt_archive_filename "Slint-cpp-${slint_version}-${package_system_name}-${rust_target}.tar.gz")
set(prebuilt_archive_filename "Slint-cpp-${slint_version}-Linux-x86_64-${rust_target}.tar.gz")
set(download_target_path "${CMAKE_BINARY_DIR}/slint-prebuilt/")
set(download_url "https://github.com/slint-ui/slint/releases/download/${github_release}/${prebuilt_archive_filename}")
set(download_url "https://github.com/slint-ui/slint/releases/download/${SLINT_GITHUB_RELEASE}/${prebuilt_archive_filename}")

file(MAKE_DIRECTORY "${download_target_path}")
message(STATUS "Downloading pre-built Slint binary ${download_url}")
Expand Down

0 comments on commit a503e8a

Please sign in to comment.