Fix cmake project parameters

This commit is contained in:
ReenigneArcher 2022-05-06 14:39:26 -04:00
parent 49bfd2ba1f
commit a3e3da3136
3 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ jobs:
- name: Check CMakeLists.txt Version
run: |
version=$(grep -o -E '^project\(Sunshine \[VERSION [0-9]+\.[0-9]+\.[0-9]+\]' CMakeLists.txt | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+')
version=$(grep -o -E '^project\(Sunshine VERSION [0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+')
echo "cmakelists_version=${version}" >> $GITHUB_ENV
- name: Compare CMakeList.txt Version

View File

@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.0)
project(Sunshine [VERSION 0.13.0]
[DESCRIPTION Sunshine is a Gamestream host for Moonlight.]
[HOMEPAGE_URL https://sunshinestream.github.io]
project(Sunshine VERSION 0.13.0
DESCRIPTION "Sunshine is a Gamestream host for Moonlight."
HOMEPAGE_URL "https://sunshinestream.github.io"
)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

View File

@ -27,7 +27,7 @@ author = 'ReenigneArcher'
# The full version, including alpha/beta/rc tags
with open(os.path.join(root_dir, 'CMakeLists.txt'), 'r') as f:
version = re.search(r"project\(Sunshine \[VERSION ((\d+)\.(\d+)\.(\d+))\]", str(f.read())).group(1)
version = re.search(r"project\(Sunshine VERSION ((\d+)\.(\d+)\.(\d+))", str(f.read())).group(1)
"""
To use cmake method for obtaining version instead of regex,
1. Within CMakeLists.txt add the following line without backticks: