Skip to content

Commit

Permalink
Take version from VERSION file
Browse files Browse the repository at this point in the history
This enables sharing of version between meson and CMake
  • Loading branch information
lunacd committed Jun 26, 2024
1 parent 12ce2fe commit fdd37e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- "CMakeLists.txt"
- "CMakePresets.json"
- ".github/workflows/cmake.yml"
- "VERSION"
pull_request:
branches: [main]
paths:
Expand All @@ -17,6 +18,7 @@ on:
- "CMakeLists.txt"
- "CMakePresets.json"
- ".github/workflows/cmake.yml"
- "VERSION"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.22)
file(READ VERSION VERSION)
string(STRIP ${VERSION} VERSION_STRIPPED)
project(
cps-config
LANGUAGES CXX
VERSION 0.01
VERSION ${VERSION_STRIPPED}
)

add_subdirectory(src)
Expand Down

0 comments on commit fdd37e4

Please sign in to comment.