mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-03 21:24:17 +00:00
Unify Slint project version in CMake build
This commit is contained in:
parent
40bad67f11
commit
069b157143
3 changed files with 3 additions and 6 deletions
1
.github/workflows/upgrade_version.yaml
vendored
1
.github/workflows/upgrade_version.yaml
vendored
|
|
@ -24,7 +24,6 @@ jobs:
|
||||||
|
|
||||||
# Update the version in CmakeLists.txt
|
# Update the version in CmakeLists.txt
|
||||||
sed -i 's/ VERSION [0-9]*\.[0-9]*\.[0-9]*$/ VERSION ${{ github.event.inputs.new_version }}/' api/cpp/CMakeLists.txt
|
sed -i 's/ VERSION [0-9]*\.[0-9]*\.[0-9]*$/ VERSION ${{ github.event.inputs.new_version }}/' api/cpp/CMakeLists.txt
|
||||||
sed -i 's/SLINT_VERSION [0-9]*\.[0-9]*\.[0-9]*$/SLINT_VERSION ${{ github.event.inputs.new_version }}/' api/cpp/CMakeLists.txt
|
|
||||||
sed -i "s/(CPACK_PACKAGE_VERSION_MAJOR [0-9]*)/(CPACK_PACKAGE_VERSION_MAJOR `echo ${{ github.event.inputs.new_version }} | sed "s/\([0-9]*\)\.\([0-9]*\).\([0-9]*\)/\1/"`)/" api/cpp/CMakeLists.txt
|
sed -i "s/(CPACK_PACKAGE_VERSION_MAJOR [0-9]*)/(CPACK_PACKAGE_VERSION_MAJOR `echo ${{ github.event.inputs.new_version }} | sed "s/\([0-9]*\)\.\([0-9]*\).\([0-9]*\)/\1/"`)/" api/cpp/CMakeLists.txt
|
||||||
sed -i "s/(CPACK_PACKAGE_VERSION_MINOR [0-9]*)/(CPACK_PACKAGE_VERSION_MINOR `echo ${{ github.event.inputs.new_version }} | sed "s/\([0-9]*\)\.\([0-9]*\).\([0-9]*\)/\2/"`)/" api/cpp/CMakeLists.txt
|
sed -i "s/(CPACK_PACKAGE_VERSION_MINOR [0-9]*)/(CPACK_PACKAGE_VERSION_MINOR `echo ${{ github.event.inputs.new_version }} | sed "s/\([0-9]*\)\.\([0-9]*\).\([0-9]*\)/\2/"`)/" api/cpp/CMakeLists.txt
|
||||||
sed -i "s/(CPACK_PACKAGE_VERSION_PATCH [0-9]*)/(CPACK_PACKAGE_VERSION_PATCH `echo ${{ github.event.inputs.new_version }} | sed "s/\([0-9]*\)\.\([0-9]*\).\([0-9]*\)/\3/"`)/" api/cpp/CMakeLists.txt
|
sed -i "s/(CPACK_PACKAGE_VERSION_PATCH [0-9]*)/(CPACK_PACKAGE_VERSION_PATCH `echo ${{ github.event.inputs.new_version }} | sed "s/\([0-9]*\)\.\([0-9]*\).\([0-9]*\)/\3/"`)/" api/cpp/CMakeLists.txt
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
cmake_minimum_required(VERSION 3.21)
|
cmake_minimum_required(VERSION 3.21)
|
||||||
# Select C++ and C as languages, as Corrosion needs ${CMAKE_C_COMPILER}
|
# Select C++ and C as languages, as Corrosion needs ${CMAKE_C_COMPILER}
|
||||||
# for linking
|
# for linking
|
||||||
project(Slint HOMEPAGE_URL "https://slint.dev/" LANGUAGES C CXX VERSION 1.0.0)
|
project(Slint HOMEPAGE_URL "https://slint.dev/" LANGUAGES C CXX VERSION 1.8.0)
|
||||||
|
|
||||||
include(FeatureSummary)
|
include(FeatureSummary)
|
||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
|
|
@ -436,8 +436,6 @@ if(SLINT_BUILD_RUNTIME)
|
||||||
cmake_path(GET _slint_compiler_location FILENAME SLINT_COMPILER_FILE_NAME)
|
cmake_path(GET _slint_compiler_location FILENAME SLINT_COMPILER_FILE_NAME)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(SLINT_VERSION 1.8.0)
|
|
||||||
|
|
||||||
configure_package_config_file("cmake/SlintConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Slint/SlintConfig.cmake" INSTALL_DESTINATION lib/cmake/Slint)
|
configure_package_config_file("cmake/SlintConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Slint/SlintConfig.cmake" INSTALL_DESTINATION lib/cmake/Slint)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|
@ -445,7 +443,7 @@ if(SLINT_BUILD_RUNTIME)
|
||||||
|
|
||||||
write_basic_package_version_file(
|
write_basic_package_version_file(
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Slint/SlintConfigVersion.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Slint/SlintConfigVersion.cmake
|
||||||
VERSION 1.8.0
|
VERSION ${PROJECT_VERSION}
|
||||||
COMPATIBILITY SameMinorVersion
|
COMPATIBILITY SameMinorVersion
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ add_library(@slint_cpp_impl@ @cmake_lib_type@ IMPORTED)
|
||||||
set_target_properties(@slint_cpp_impl@ PROPERTIES @SLINT_LIB_PROPERTIES@)
|
set_target_properties(@slint_cpp_impl@ PROPERTIES @SLINT_LIB_PROPERTIES@)
|
||||||
|
|
||||||
function(_slint_download_compiler_and_cache)
|
function(_slint_download_compiler_and_cache)
|
||||||
set(SLINT_GITHUB_RELEASE @SLINT_VERSION@ CACHE STRING "GitHub Release to use for Slint Binary Artifact Downloads")
|
set(SLINT_GITHUB_RELEASE @PROJECT_VERSION@ CACHE STRING "GitHub Release to use for Slint Binary Artifact Downloads")
|
||||||
|
|
||||||
if (CMAKE_HOST_WIN32)
|
if (CMAKE_HOST_WIN32)
|
||||||
set(compiler_exe_suffix ".exe")
|
set(compiler_exe_suffix ".exe")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue